• Advertisement

Archived

This topic is now archived and is closed to further replies.

Design for 2D space game.

This topic is 5998 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am using Blitz Basic to make a 2D space-shooter type game, similar to Asteroids. Blitz Basic does not have classes, so I have to use Types. Now, should I create a different Type, along with the corresponding CreateType, DestroyType, UpdateType, RenderType functions (plus others) for each individual game object (Ship, Bombs, Mines, Bullets, Walls, Stars, Decorations, Powerups, etc...), or should I create, say, a single Sprite Type, and then have a big switch statement in each function to perform necessary initialization, destruction, update, render code? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
It depends what you are using these "Types" for. If you''re using it for something more relating to drawing, use one major Type. However, its sounds from your description that they all have very specific code, in which case you''d want to do it all seperately. Inheritence, of course, would be the best thing, but it appears that BlitzBasic doesn''t support that. You may want to create custom Types and a property of each one would be a more general Type.

Share this post


Link to post
Share on other sites

  • Advertisement