The Daily Click ::. Downloads ::. Engine ::. 2D Advanced Space Scrolling

2D Advanced Space Scrolling
Author: Pixelthief Submitted: 3rd July, 2007 Favourites:0
Genre: Engine Downloads: 249

Edited By Pixelthief on 7/4/2007

This is an engine I have been tinkering with for advanced 2D space scrolling; rather then the simple X/Y Grid where the player turns and the world remains stationary, this is the type where the player remains stationary and the world revolves when he turns; its alot of conversions between cartesian and polar coordinates.

You can probably make out a good deal of how the code works, but I didn't rename the variables which makes it rather greek, and I took a shortcut by having the individual objects actually use their X/Y coordinates instead of values for "real" positions, which means that its limited to +-32000 on the X/Y grid. However, it wouldn't be hard to go through and just replace all instances of X and Y positions with a value.

Otherwise, this is a nice little way of displaying space movement.

CTRL = Fire
Left/Right = Turn
Up = Forwards
Down = Slow down.

A compiled .exe version can be found here:

Review This Download (39 kkb )

Posted by Pixelthief 3rd July, 2007

O righty, forgot to list!

actually... i posted wrong version. I'll update the download file; it should only need:

*Maths Army Knife
*Advanced Direction Object
*Overlay 1.5

Posted by Joe.H 4th July, 2007

Bleh polar co-ordinates.

Although nice work if you managed to not only use them in a click game, but also converted between Cartesian and Polar throughout the game.

For those who don't know:


(f(θ is a function of θ

Also if anybody wants to know, polar co-ordinates are in the form
(r,θ r is a length, and θ is the angle between the initial line.


Back to the thing.

it sounds interesting, but I can't try it as I don't have MMF
EXE provided?
Posted by nim 4th July, 2007

Haha, winkmaths!

I can't see a download link anywhere..
Posted by Pixelthief 4th July, 2007

I changed it to some lamer host, since the other one wasnt working. But yeah, all the gameplay takes place on a normal X/Y grid, and then all the objects are rendered into a polar based projection, which allows you to rotate the entire game world in realtime. Something that is essentially impossible to do through constant conversion back and forth.
Posted by Pixelthief 4th July, 2007

an um, alternative link:
Posted by Pixelthief 4th July, 2007

And again, a compiled .exe version:

That will not require all the extensions. In the mean time, heres a link to all the extensions required:
(adv dir)
(maths army knife)
(fast loop)
Posted by nim 7th July, 2007

Hey, this is pretty good! Thanks for uploading the exe version too.
Posted by Joakim Hölm 7th July, 2007

this is cool accept i cant see any enemies
Posted by Zezard 8th July, 2007

Wow, this IS good. Too bad I voted thumbs down before I found the dowload link

You should have included some enemies or pick-ups though, so that we could see how the engine would have handled them...
Posted by Pixelthief 9th July, 2007

Why does this have 4 gotw votes when I voted for broken knuckles? O_O
Posted by Lachie Dazdarian 17th July, 2007

You know, I made this quite some time ago.

You seem to be using the same concept, but mine engine is somewhat different. It was inspiried by an Amiga game entitle Transplant(s), and in Transplant the ship moved similar to a car in a top-down arcade driving game, with friction. This might be silly, but it worked great in Transplant and quite good in my Star Cage too. Perhaps you should check my game for inspiration. And a source is included (a FreeBASIC game). It was relatively overlooked game on Daily Click, by my opinion.

I enabled rotation in my game by using some guys rotation routine (the entire screen in ACTUALLY rotated), and then many SIN, COS and TAN functions are used for the movement, AI to behave correctly and for projectiles to shoot in the right direction (according to your angle, and for enemy ships according to their angle).

I fail to find an enemy ship in your engine, and I get confused with where I'm moving due the inertia. Perhaps adding some arrow which illustrates the current direction of the movement and its magnitude.
Posted by Pixelthief 19th July, 2007

err, holding shift should display the vectors, and there should be an enemy ship right next to you at the start.

Did I seriously forget to include the sprite for the ship? >.< Its loaded externally via the active picture object, and I just forgot to include it in the zip
Posted by Lachie Dazdarian 19th July, 2007

Yes, the shift option works. It seems that the acceleration is too low in this game. I don't know. It takes me ages to align in the direction where I'm thrusting.

Erm...did you check my game? I mean seriously, you could find it very useful.





Worth A Click