What would be the best way to handle player movement like the movements found in old arcade space games (where it seems as if the player is automatically moving, thou I bet they aren’t.) Recently I have tried setting the mob to never stop walking east unless told otherwise and creating a system that lowers the mobs speed, but this system was unsuccessful in createing the effect i was looking for.
Any Idea's?
ID:272252
May 16 2008, 6:35 am
|
|
May 19 2008, 5:26 am
|
|
Bump
|
In response to National Guardsmen
|
|
Are you looking for something like in this project?: B17: Fortress over Germany
If so, I can give you a couple pointers. |
Make every icon in the background and the player's icon constantly look like its moving. Then spawn objects on the top of the screen that move down.
|
In response to IainPeregrine
|
|
Yes, that is very simlar to what im looking for. Any tips?
|
In response to National Guardsmen
|
|
Open up the source for B17: Solo Fortress, and remove line 24 from the file "main.dm". (The line you're deleting reads "who.eye = T"). This will allow you to see the map as you move around, instead of just seeing the center of the map.
You'll notice that the top and bottom of the map contain (what I like to call) creation and destruction buffers. The creation buffer generates new objects and sets them moving south at a set speed. Once those object reach the destruction buffer, they are deleted. Because everything is moving in the same direction at the same speed, it gives the impression that the player is moving over a stationary map. To insure that everything moves at the same speed (so that it looks like a background scrolling), you'll need to look into the atom/movable/pixel_step_size variable in the Reference. Also, you should read about the Walk() proc, especially the lag setting. You'll want to make sure that pixel_step_size exactly equals 32/lag, and this only works with certain lag settings: 32, 16, 8, 4, 2, 1. So if you use this method, you're basically limited to six speeds. |
In response to IainPeregrine
|
|
Thanks, ill have a look when I get home.
|