Sprites for 2D game

How do we go about getting sprites to work in rocket?
Im looking into producing a uni project in rocket on the side for my self, but its a full 2D game, does rocket offer any easy way to use sprites with collision etc?

Or could we get in a future build something where we can use sprite sheets, like game maker ( i know game maker is simplistic but it works) it would really help to not have to do tricks to create these types of games, but still offer the full power of the engine for 3d effects and lighting. maybe even making it possible to create games like paper mario or the recent rayman games with ease.

Good question – I’d like to know about sprite integration as well.

May have to fake it, and apply a texture to a flat 3D mesh, and program the mesh so that it is always facing the camera.

Hi Marc,

While we are striving to make Rocket the best toolset available for all games, it is currently a 3D toolset. Dave has a good idea about how you could use the 3d tools available in Rocket to create 2D functionality.

Cheers!

Alexander

I think it would be pretty cool for Epic to integrate some 2D tools into Rocket, that would be awesome

It seems like there are engines better suited for 2D- right tool for the right job, you know?

Yeah, but multitools are very useful.

Using an engine like UE4 for 2D games, is like using a sledge hammer to hammer a nail for a picture frame. While it can be done, there are other tools far better suited for it, now with that said, I’ve been working on a 2D example in rocket and you can make some really amazing effects with all UE4 right now.

Here’s what you do, First make a character in an art app with each part of the character on a separate layer.
Export each layer as its own image.
Switch to your 3D app, Make a bunch of flat rectangles to hold the exported images or you can even make flat custom geometry -[just make sure you have only triangles because you can get some weird shadowing sometimes also uv map the custom geometry and rectangles!]- to hold the images of the character.
These rectangles or custom geometries are going to be the hit-boxes :wink:
Next create a bone structure of your character that has movement bound in only 2 axis. -[You might want still 3 dimensions anyway for layering the characters body parts :wink: ]- Attach the Image’d Geometry to the Bones and then Create Animations, Export to fbx using the wiki options into Rocket. Use the Side Scrolling example Swap the example character for the one you made and bam you have all the 2D tools you will ever need.

-Also-
The geometry will cast shadows. Hit Boxes depend on geometry. Custom geometry works best imo. GPU Particles look and play with a 2D system like the one above are absolutely gorgeous. Instead of using flat geometry, try using like "shell/dome like " shapes to add some depth. Fps is amazing in a system like this.

Yeah, Unity can also be used for 2D. They now have official 2D tools for making 2D games

What I have tried so far in UE4 and Unity using Dave.Voyles and I’s faking it method this works just as well as Unity’s 2D out of the box stuff in my honest opinion. While there are some cool features in Unity to help 2D I didn’t see anything that you can do in Unity that you can’t do in UE4. I think this is more of a workflow issue.

Also in regards to the sprite sheets you can also do this too, you use a large texture with a bunch of images and you uv map it to the appropriate geometry in the 3d app.

Yup, that is an easy way

Yeah, the way you are doing it in Rocket seems like a great way, then you can also use all of the features from 3D in the game.

Alternatively, you could do a 2.5d game (this is what I’m doing at the moment) and prevent the characters from turning left and right. ie - they can only run to the left side of the screen, or right, but cannot rotate.

There are two ways of doing this:

  1. Create a blocking environment within Rocket, which prevents the character from moving off of a plane. (Not recommended)

  2. In the player controller, prevent rotation. This is what I do, and it works well.

Yeah but the reason that many, myself included, go for 2D sprites is that it’s much easier to do than make a 3D model.

I mean, I’m horrible at drawing to begin with, I use pixels. How am I expected to 3D model?

The 3D models can just be a boxes where your material with the texture (sprite sheets) are applied. From there, it’s just a question of manipulating the uv coordinates to create the animation.

You can make a full 2d game even if paper2d still not finished, but it is super awesome !

Hello,

This is a question from the beta version of the engine. We are marking this answered for tracking purposes. If you are experiencing an issue similar to this please post a new question.

Thank you.