Asteroids with Static Sprite; Center of Screen

Started by
3 comments, last by bloodisblue 12 years, 8 months ago
Hey guys. I guess that this is a Noobie question, mostly. I've been toying around for a few weeks with XNA (I am a Java programmer, not really a game programmer) and I've gotten pretty capable with the C# Syntax.

My problem now is that I want to make an asteroids game where the ship stays in the middle and the objects move relative. I found this C++ example, but I couldn't discern the code well enough to understand.



Hopefully somebody here can help me out. Your help would be greatly appreciated!

Regards,
-Free

P.S. More on the project at http://spacerambles.com/
Advertisement
why do you want that ?

Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.

I'd imagine the easiest way to do this is rotate the camera and the ship at the same time.
Forget that! I just looked at the video. Just move the camera around so it always points at the ship.
You have two basic options in order to solve this problem.

The recommended one is to allow the ship to move around the world freely and just keep the game focused on it (meaning keep the camera on it).
To do you this would have to be able to designate what part of the world you want to draw based on where the ship is.

The bad option is to move the entire world and keep the ship in the same spot. I would not try this because it is a bad programming practice for larger games and the camera work you would learn to use would be much more important for future games that aren't asteroids.

This topic is closed to new replies.

Advertisement