What would it take to recreate LittleBigPlanet inside UE4?

Alright, so, I haven’t used UE4 since 4.8, so I decided to try it again with 4.12. I know a basic understanding of blueprints and landscapes and a bit of materials. Not much else. So, as a way to learn the engine a bit more I want to try to recreate a game called LittleBigPlanet, released in 2009 for the , in Unreal Engine 4.

If you don’t know what LittleBigPlanet is, it’s basically what would happen if you took Unreal Engine 4, turned it into a game, gave it lots of pre-made assets, materials, blueprint scripts, etc, made it cartoony and give it a fun story with bright characters and amazing looking levels, then you basically let the community do what they want with it, creating their own levels, and even their own games, sitting on their couch on the . Pretty cool! And, in LBP2 and above they actually added a logic system that is very similar to Blueprint - you can script different objects in your level to do things just by placing nodes on a circuit board, and wiring them all together into a network. You could do anything from making a button turn on a light when you walk on it to making entire recreations of triple-A titles, with the only limitation being that LittleBigPlanet has a limited level size and until LittleBigPlanet 3, it only had 3 layers that you could actually put objects that are interactive on.

So my question is, what would it take to achieve the following:

  1. Creation of levels in-game
  2. The ability to expose meshes, blueprints, etc to the in-game level creator
  3. The ability to hook a switch (say, a button) up to a triggerable object (say, a light) and have the button turn the object on/off depending on if it’s pressed.
  4. The ability to allow the player to sort of ‘paint’ objects onto the level, for example, go into the menu, choose a Wood material, choose a square shape, and be able to click and drag around the screen to draw a walkable object of that material onto the level
  5. Save each level onto a file on the hard drive so that players can share their levels
  6. Ability to place pre-made stickers/decorations onto objects (stickers being flat textures that can be put on an object, with any size, rotation, etc, and decorations being 3D objects that don’t have any collision but can be placed on other objects)
  7. Ability to capture selected objects into a mesh in-game to be used as another object
  8. Corner-editing (select an object, select a random point on the edge, if there’s a vertex, then modify its location, if not, create one, then modify it’s location)
  9. Bolts (that can hold an object in place on another object, optionally making it spin, wobble, etc)
  10. Strings, rods, etc (which can help suspend an object in mid-air)
  11. Pistons and Winches (which can push/pull objects, and can be turned on/off by switches)
  12. Player sensors (which are switches that only turn on when a player is within the radius)
  13. Grab switches, which activate when an object is grabbed by the player
  14. Save player-created meshes to a folder on disk and load them on game startup so that adding them in through the editor isn’t necessary
  15. Ability to place lights in-game, and have them movable, and fully tweakable in-game.

I hopefully want to achieve everything in Blueprint - as I don’t know C++, only C# - and if I can achieve that list of things, I will have almost fully recreated the gameplay of LittleBigPlanet 1 in Unreal Engine, and it’ll be up to my imagination to generate everything else in-game, and probably won’t need to exit the game and return to the editor often.

I don’t want to recreate LBP 3 or even LBP 2, I just want the fundamentals, because that’ll give me a fun thing to do in Unreal and hopefully impress my friends with it. Also, it’s freakin’ LittleBigPlanet in Unreal Engine. Doesn’t that sound awesome to you?

1 Like

Hi, you lucky that i’m from LBP myself :stuck_out_tongue: so i will try to answer

  1. Yes, level is data and you can store data so even if you can’t involve UE4 level file saving you can create your own
  2. Yes, reflection system and asset APIs let you do that… same as UE4 editor does that. Asset also have meta tags so you can mark which one you want to expose
  3. Ofcorse
  4. No, UE4 was not designed for mesh painting, rether reuse meshes designed elsewhere. UE4 got BSP system which let you paint simple shapes on level… but they just simple shapes ( i think you would able to create something that Karting modeling have) and it has opinion of not being quite efficient, people prefer using meshes over it. But i think it is possible to implement such paint tool, but it would require more work on deep low level stuff in UE4.
  5. Anwser as point 1
  6. UE4 has decal system, which is better of that LBP has to offer, you can show how decal (sticker ;p) will look like right away and you can apply any fancyness that materials has to offer not just simple texture. Not sure about performance of that as it would been used a lot in LBP like game Using Decals in Unreal Engine | Unreal Engine 5.1 Documentation
  7. That depends on what you want to save, meshes… you could do some how you just save what is used and there offsets, BSP there might be more issues to solve there
  8. If we talk about BSP it don’t let you do that i think
  9. All quastions 9-13 as they all practiucly based on same thing in LBP called Gagets. In UE4 there is no system to stick actor with a code to any point of other actor and apply extra code to it as gadgets does in LBP. You would need to code such actor from basis, i think ChildActorsComponents would be helpful here and with line tracing you could code placement of such actors so they look like they sticked. SplineComponent would let you do pistons somehow, speeking od which i not sure how you would sole 2 line gadgets which been composed of 2 gadgets attached to 2 diffrent actors, i also don’t know how you could incorporate physics in to it. I suspect LBP is based of Box2D as it shere similar features, UE4 has Box2D for Paper2D, so somehow you could incorporate this physics engine. Also motors might be isssue too, but if you tlaking about LBP 2.5D then it passible i think
    1. same as 1 :stuck_out_tongue: Listen, everything you see on screen in electornic device is contained in memory, data in memory is not different from data stored on disk. Everything in memory can saved on disk and restored back to memory (thats basis on how game saves work!). So you can save anything, it’s just matter of coding it. But UE4 won’t provide you such system you will need to create your own.
    1. I don’t know why you even ask that, UE4 provides dynamic lightning, light component, you can make anything emit light

Now you definitely wont able to do most of this stuff in blueprints, aspecially data saving, BSP and point 2. UE4 was not designed for this kind of games and that means this involves have C++ work. Good news is, I don’t think anything you listed require engine modification… well maybe except mesh painting, not sure if you can do that in sperate module without hitting some barriers, there some stuff that is inaccessible outside of engine’s modules.

I think it 's better to approach this other way around, insted going upstream and trying to turn UE4 in to LBP, it would be a lot easier to turn LBP in to UE4 and try to sandbox UE4 features that it has to offer (like Garymod does with Source engine). Look on Karting, it looks like it runs on ModNation Racers engine and you clearly can see that as much as they tried they could not hide that fact and limitations of that engine.

Forgot to mention, BSP “paintings” can’t move they 100% static they also hard to be effected by the code to make them work with things like gadgets

So you’re saying I’d have to go the route of the PSP version, where you can only ‘paint’ in squares/circles. confined to a grid, but all other shapes were just static meshes, couldn’t be painted, but could be corner-edited? Seems like a simple compromise… :stuck_out_tongue:

As for C++, it’s probably not that different from C#. I’ll give it a try. :stuck_out_tongue:

Alright… so I’ve decided my first goal would be to serialize/deserialize a level somehow. I have a class with three variables:

string Name;
string Description;
vector LevelActors;

now my only thing is how would I serialize this, and how would I pump the actors of the actual level into and out of this? I’d imagine it’d be pretty simple. The serializer would store all the binary data of the level into a file, and the deserializer would take the binary from the file and bring it into the class. Don’t know how to do that but I’m assuming it’s possible. As for actually spawning the level, simply have a level blueprint in a “base” level which is just an empty level with a few objects to keep the player within the border (just like LBP), and have the level blueprint iterate through each actor and spawn it in. Simple.

So, the only real challenge is serialization/deserialization, also, when the player decides to save the level, I’d need to take all the actors and bring it into that C++ class then serialize it.

Did you tried to see how level saveing looks liek editor and somehow is usable outside editor?

Not yet, and I most likely wouldn’t understand a single thing about how it works :stuck_out_tongue:

Well lurk API refrence, look up UEngine and UWorld stuff like that