xtreampb Posted January 4, 2015 Posted January 4, 2015 Can someone please provide guidance on how to use LE 3 to create 2D game. I want to use sprites as the feel should be similar Pokemon. Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post!
gamecreator Posted January 5, 2015 Posted January 5, 2015 You would use the context commands, especially DrawImage. That's how I made this: 1 Quote
Rick Posted January 5, 2015 Posted January 5, 2015 Nice gamecreator! @xtrempb LE is missing some handy methods for doing 2D like drawing parts of bigger images and 2D physics. You can either mess directly with OpenGL commands to give such functionality or just use DrawImage() and switch what image to draw (for animated sprites). You can implement simple 2d bounding box collision detection for some physics stuff. Quote
AggrorJorn Posted January 5, 2015 Posted January 5, 2015 If you use C++ and you want more control over the physics, you could use a 2d physics engine like http://box2d.org/. You also want to set your camera to orthographic mode: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/camera/camerasetprojectionmode-r204 Quote
Rick Posted January 5, 2015 Posted January 5, 2015 You don't need to set the camera to orthographic if you are using DrawImage(). This is more to make 3D things look 2D but if he's going true 2D and using DrawImage() then there is no need to do this, as I recall. 1 Quote
Genebris Posted January 5, 2015 Posted January 5, 2015 Can't you also you sprites that were added in 3.3 Leadwerks version? They also can have collision like usual entities. Quote
Recommended Posts
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.