Starcatcher continues!

Okay, so i’ve been wracking my brain about collision detection with wrapped objects. Eventually mrfun aka Seth Robinson helped me out, and now the game is going to go on as usual. The rest of the game shouldn’t take too long… it should take a few days maybe till next friday (not tommorow which is the 11th) before I have a fully playable, unpolished game, but still fully playable.

Now essentially you will use your “catcher” to catch the stars. You can only open the catcher up for however long you have fuel for, but once you catch one star or more then you only have a short time before it overloads completely destroying the catcher and your ship. Not to mention now with the energy output and forces inside the wormhole cause the stars to start speeding towards the source of said energy which means your ship blows up if a star crashes into your ship.

Okay so the next task I have to work on is using the catcher to catch the stars. There are two ways to do this: A) I can have the stars attach to the catcher, and disappear once “inside” the ship. Or maybe just inside the catcher. I have code to check to see if an entity is completely enclosed in another’s bounding box, so I could simply have it move to the center of the catcher, and when the rect is completely inside it stops. B) The stars can move toward the center of the catcher like in the first one, only they stop when centered and then disappear in which case i’ll draw something over the catcher to indicate energy absorbed and building. This might be looking like a star expanding or some such.
I’m inclined to do method B because it seems a bit less tricky and because all those stars won’t really fit on the catcher anyways. Also with B I only need an extra sprite which is a drawable object only.

An entity is one that can move autonomously, usually has things like friction, velocity, position, etc. So an entity is essentially a physics object (ie an object that has a physical presence in the world). A sprite on the other hand is just a drawable object. It doesn’t have position or anything to move it. All it does is contain info on how to draw itself. This in the future will also include animation data, and various properties like maybe rotation, and translucency, and anything else I want to include in it. A sprite, however, is not an image or sequence of images, that would be an image resource. A resource is any content, be it image, image sequence, sound, or music. The sprite only contains a pointer to an image resource. If there’s no resource assigned to it, then a sprite draws colored rects. This allows me to be able to make and play with my game before committing any assets to it.

Well I guess that’s it. Just so you don’t get bored i’ll post a screenshot of the current version. Notice the crosshairs and display info are removed, and that all the stars are of an orange color. The stars are of the same color because they’re using the same “sprite” which happen to use the orange color.

Let's make a game!
Keith

Comments are closed.