Jump to content

2d games in leadwerks editor


Barry
 Share

Recommended Posts

I'm very new to developing on the Leadwerks engine so I was wondering what the best approach would be for designing 2d levels. Preferably, I would like to be able to design the 2d levels in the leadwerks editor, but would also need control of the level objects from C++ since there are some dynamic aspects. Looking at the API alone, its not quite clear to me what the best direction is for developing 2d games. Does anyone have any thoughts on the best approach for developing 2d games?

Link to comment
Share on other sites

With true 2D games you are just drawing textures/images to the screen. You wouldn't use 90% of what Leadwerks has to offer (which is fine if that's what you want). You would only be using Textures to load your images and draw them to the screen. You would have no lights, no models, etc. You wouldn't need a scene. Just create a world & camera and you should be good to start drawing 2D stuff.

 

At this point you make your own game objects and handle the 2D stuff yourself. For example if you have a hero character you could make a Hero class that takes a list of textures that you will swap which one to draw for animation. If you want a tilemap then you'll need a texture file for each tile and draw them yourself in your own Map class or whatever you want to call it.

 

Leadwerks isn't really a 2D engine but you can do a 2D game with it. It just isn't going to do anything out of the box that most 2D engines do. For example no direct support for tilesets or charsets. Unless you get into OpenGL yourself to do those each tile/frame will be it's own image that you load with Texture:Load() and you animate yourself by flipping through textures at a given rate.

  • Upvote 2
Link to comment
Share on other sites

Dont just say no guys its not right. 2D Games dont just mean u need 2D textures and draw them on the screen. You can forget about that technique with drawing textures all the time its more easy. you can do 2D Games very well in leadwerks but it depends on what u wanna do. Games like angry birds or Crazy machines are easy. just create your Level in 3D and use the orthogonal view of the Camera with:

 

Camera::Orthographic: flat 2D rendering.

 

You can do some nice things with it

 

 

Think out of the Box

  • Upvote 1

It doesn´t work... why? mhmmm It works... why?

Link to comment
Share on other sites

@Dude I guess I wouldn't call that a true 2D game. Also, I didn't say no. I showed him how he can do it with textures which can be thought of as sprites in a 2D specific game library. You showed him another way with Orthographic (although have you tried that in Leadwerks? I found it harder myself). Neither is thinking inside or outside the box. They are just 2 different ways to do the task.

  • Upvote 1
Link to comment
Share on other sites

With LE3.1 two ways are possible :

1) 2.5D games : OK and works, you'll have to learn to deal with almost all physics functions available (SetOmega to cancel non desired rotations for example as LE3 don't have axis locking features)

2) 3D planes with 3D bones for characters made and animated in Blender or other modeler

- Simple 2D images for backrgound and floor

or - Top Down/side 3D view

 

For 2D sprites, 2D Tiles, need 2D animation tools, 2D bones system without needing a modeler than Unity is the way and you'll have plugins extensions for 2D specific features also. you can try more limited features ones like Game Maker , multi media fusion also.

 

Hope that helps.

  • Upvote 1

Stop toying and make games

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...