Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Question about sprites negotiating 2D environments..

Author
Message
RedRain
21
Years of Service
User Offline
Joined: 11th Jun 2003
Location:
Posted: 14th Oct 2003 18:24
Ok so I have some great graphics done for some animated sprites and a couple of backdrops. The design of the game I'm working on is basically a simple 2D affair like Psygnosis's version of 'Barbarian'. The character walks from room to room, encounters bad guys and has ladders/steps drops to negotiate etc. My question is what is generally the best way to set up the environment in the way that it relates to the character(s) in the game? Obviously the various sprite functions can be used to determine combat and contact etc, but what about the actual environment?

What I've done is basically to create a detailed 'map' of every screen in the game containing screen location data about exits, doors, steps, ladders, pitfalls etc. In the game loop after each keypress/joystick action I determine where the character is. If he's at the bottom of some steps and presses up, then I know he can climb to the first step and issue the correct sprite animation and position it on the first step. If not, an 'up' keypress will have no effect and so on and so on. Is this generally the way that it's done, or are there simpler methods? Would like to know before I get too far into the coding using this method!
cheers!!

Login to post a reply

Server time is: 2024-09-21 03:53:18
Your offset time is: 2024-09-21 03:53:18