Advertisement

2.5D space shooter game (code) architecture

Started by December 10, 2019 02:02 PM
2 comments, last by Map12 5 years ago

Hello guys!

I want to make a 2.5D (2D gameplay, 3D models) space shooter where player can buy stuff between stages for money earned during the game (best example of game like this is Jest'n'Guns or Tyrian 2000).

I have some experience with Unity, but no with the game code design. The first big problem I found is how to implement shop and stages, and how to store data for the game saves.

I imagine the shop, as a simple scene with items to buy, player storage and equipped items. After each stage(or maybe not?) player have an oportunity to visit a shop and change items. Sometimes new items appear in the shop. Sometimes shop design is slightly different (like different enviroment behind the windows, or vendor face). I really dont want to make a new scene for each shop, I think its overkill. What would You advise me?

I have similar problem with the stages, but they would be of course much more different from each other than the shops. So in this case I can just use Unity as stage editor, but maybe I can somehow automatize it? Like create a script that will prepare the stage scene for me (with start position, end stage trigger, boundaries, background template etc?). Or maybe my approach is just ineffective and wrong, and You can show me better way to handle this problem? That would be great.

So let's assume that I have 1 changeable store scene, N stage scenes (or maybe just 1 stage scene?). How should I manage them in term of game saving and starting/finishing level or going to shop?

I can't imagine saving the game either. Should I just save the most important data to the file? But there will be a lot of these informations like player informations, inventory, beaten stages, next stage etc (this is imo strongly connected to the scene managment system).
BTW, I want to allow saving only in store screen.

I want also implement checkpoint system, but that looks pretty easy (just reload the level but I will place player spaceship in checkpoint position).

Last thing is I dont really know when should I use animator, when code and when shaders.
For example: when player ship flying down, its rotating to the right. Now Im doing it using a script. But Im pretty sure I can achieve this also by animator. Which way is better?
Example2: For moving background I can make few background objects, move them to the left and behind camera teleport them to the right, or I can use shader and just change the background texture offset.
In both examples I dont really know which way is better and why, can someone explain this to me?

I want to make a 2.5D (2D gameplay, 3D models) space shooter where player can buy stuff between stages for money earned during the game (best example of game like this is Jest'n'Guns or Tyrian 2000).

Are you OK with the inherent positive feedback between firepower increasing kills and prize money increasing firepower? There are many different ways to avoid, mitigate or exploit usefully this positive feedback. Both examples you mention simply have a low-budget initial part followed by playing most of the game at maximum power with the best weapons: rather boring.

Sometimes shop design is slightly different (like different enviroment behind the windows, or vendor face). I really dont want to make a new scene for each shop, I think its overkill.

First make it work, then make it look good, then add gratuitous complications like vendor faces and environment behind the windows. Would the player like to see such ornaments instead of displaying items, funds and other important information better, with more room?

So in this case I can just use Unity as stage editor, but maybe I can somehow automatize it? Like create a script that will prepare the stage scene for me (with start position, end stage trigger, boundaries, background template etc?)

The choice of an appropriate level editor depends on what the levels are like: a generic 3D scene? A tilemap? Procedurally generated? Mixed? What data do you need to author in order to control animations and enemy movement?

I want also implement checkpoint system, but that looks pretty easy (just reload the level but I will place player spaceship in checkpoint position).

Game state is likely to be much more complex, particularly in a good game that doesn't consists entirely of enemies randomly spawning in a vacuum.

I strongly suggest making all simulation perfectly deterministic and implementing an input replay system: apart from other uses (e.g. exporting movies or watching recorded games) and advantages (e.g. instantaneous saving, simply writing player inputs to disk every frame) you would be sure to reconstruct game states exactly (for example, animating enemies and guided missiles that are affected by past player behaviour).

Omae Wa Mou Shindeiru

Advertisement

Hi! Thx for reply!

LorenzoGatti said:
Are you OK with the inherent positive feedback between firepower increasing kills and prize money increasing firepower? There are many different ways to avoid, mitigate or exploit usefully this positive feedback. Both examples you mention simply have a low-budget initial part followed by playing most of the game at maximum power with the best weapons: rather boring.

I dont really want to copy 1:1 these games. I remember that in JnG1 and Tyrian2000 in fact we had powerful ships very fast, but in JnG Gold was that nicely fixed. For now I just want to implement game flow, thats why I asked questions about solving shop / stage problems. I have some ideas how to develop gameplay and balance the game, but its not topic for now.

LorenzoGatti said:
First make it work, then make it look good, then add gratuitous complications like vendor faces and environment behind the windows. Would the player like to see such ornaments instead of displaying items, funds and other important information better, with more room?

I listed all these things because I wanted to outline the scope of changes between stores. No element needs to appear in the final version of the game, I put readability and gameplay above all else ;)

LorenzoGatti said:
The choice of an appropriate level editor depends on what the levels are like: a generic 3D scene? A tilemap? Procedurally generated? Mixed? What data do you need to author in order to control animations and enemy movement?

Thats nice point, I still have to think about it then.

LorenzoGatti said:
Game state is likely to be much more complex, particularly in a good game that doesn't consists entirely of enemies randomly spawning in a vacuum.

Im sure You're right. I'll find it out in a while ^^

LorenzoGatti said:
I strongly suggest making all simulation perfectly deterministic and implementing an input replay system: apart from other uses (e.g. exporting movies or watching recorded games) and advantages (e.g. instantaneous saving, simply writing player inputs to disk every frame) you would be sure to reconstruct game states exactly (for example, animating enemies and guided missiles that are affected by past player behaviour).

Nice idea, I'll try it out!

Thx for help!

This topic is closed to new replies.

Advertisement