xtreampb Posted January 4, 2015 Share 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! Link to comment Share on other sites More sharing options...
gamecreator Posted January 5, 2015 Share Posted January 5, 2015 You would use the context commands, especially DrawImage. That's how I made this: 1 Quote Link to comment Share on other sites More sharing options...
Rick Posted January 5, 2015 Share 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 Link to comment Share on other sites More sharing options...
AggrorJorn Posted January 5, 2015 Share 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 Link to comment Share on other sites More sharing options...
Rick Posted January 5, 2015 Share 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 Link to comment Share on other sites More sharing options...
AggrorJorn Posted January 5, 2015 Share Posted January 5, 2015 @Rick: you are correct. Quote Link to comment Share on other sites More sharing options...
Genebris Posted January 5, 2015 Share 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 Link to comment Share on other sites More sharing options...
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.