Original Post
🔒 Locked
Grid Game With Delphi
Advertisement
The ''guy'' knows where he is on the map by remembering the X and Y coordinates of where he is. When he wants to move, he checks the neighbouring map cell in the direction that he wants to move to see if he can move there or not. For example, if he wants to move left, he checks the map cell at (X+1,Y) to see if it is not a wall or rock or something similar. If he can move there, then he updates his own coordinates.
To use mouse or keyboard, either use the OnKeyXX or OnMouseXX events of the form or control.
To show the map and guy, draw the map from left-to-right, top-to-bottom, and then draw the guy at the coordinates the guy knows he is at.
Steve ''Sly'' Williams Monkey Wrangler Krome Studios
turbo game development with Borland compilers
To use mouse or keyboard, either use the OnKeyXX or OnMouseXX events of the form or control.
To show the map and guy, draw the map from left-to-right, top-to-bottom, and then draw the guy at the coordinates the guy knows he is at.
Steve ''Sly'' Williams Monkey Wrangler Krome Studios
turbo game development with Borland compilers
I don''t have any example code on me. That was all off the top of my head. Not much time to write any sample code either. Being lead programmer on a big title for PS2 doesn''t leave one with much spare time.
Steve ''Sly'' Williams Monkey Wrangler Krome Studios
turbo game development with Borland compilers
Steve ''Sly'' Williams Monkey Wrangler Krome Studios
turbo game development with Borland compilers
You can find the demo of RTS Game founded on DelphiX and two
tutorials about map making on:
http://www.gamedev.narod.ru
tutorials about map making on:
http://www.gamedev.narod.ru
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement