Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 20 Dec 2010
Offline Last Active Nov 25 2015 01:57 PM

#5004138 How to fix this glitch in my 2D platformer?

Posted by r1ckparker on 26 November 2012 - 01:56 AM

I think his problem is that the world is in 2d so you have to calculate where on screen you should be drawing everything

So the players's x would increase when you press 'right', so playerx could be 3000 for example (the player is 3000 units to the right of his starting point)

therefore the player would always be drawn at screen co-ordinate 640 but the world would be offset around him - the draw window (what is drawn on screen) would be playerx-640 to playerx+640

so you would look up your level map and draw everything from 3000-640 to 3000+640.

#5003987 First person 2D Dungeon Crawler

Posted by r1ckparker on 25 November 2012 - 02:03 PM

The old 8-bit games used bitmaps representing a wall from every different view. The image on screen is then pasted together, using these pre-drawn walls, to give a 3d image. Enemies, items etc are scaled depending on how far away they are from the player. More modern games use a 3d engine which just replicates the view, but in real 3d.
My own game uses 3d blocks which are placed within a level to make a maze. However movement is restricted to 1 unit 'steps' and the view is restricted to 90 degree views, making it 'feel' like an old-school game, even though there is no reason why you couldn't run around the maze and view it from any angle.


Posted Image
Posted Image

#4962716 About to implement A*, have some questions and need tips :)

Posted by r1ckparker on 24 July 2012 - 01:58 PM

This link helped me out when I was doing mine. There's information there on pathfinding in non-square search areas and also using waypoints instead of a grid


Here's my implementation