infinite generative space flight race game help

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By grol
:warning: Old Version Published before Godot 3 was released.

Hey there,

I am searching for infos or a starting point / example project for a space flight race game like for example torus trooper: https://www.youtube.com/watch?v=PJMTQmqxBqg

My main questions are:

  1. How can I make a generative racetrack which is never the same and also is infinite?
    Is there an example out there?

  2. How do I realize the enemies? Should i check the distance to spaceship and then create enemies in a semi random style in a certain distance?

  3. How do i load and unload objects, tracks and enemies without framedrops and performance lack?

Maybe you have some hints for me! Thanks in advance!

:bust_in_silhouette: Reply From: eons

That game seems to be a fixed shooter, the twisted cylinder moves against the player and rotates, I think levels are predefined too.

You can look at Torus Trooper source code, you may find interesting techniques from Kenta Cho.


For “infinite” generation, I think random is your worst friend, you need to define rules for the creation of blocks/cells/screens, which block can follow which, set of enemies for those blocks, enemies following a set of enemies, how to scale difficulty (up and down to keep the flow stable).

I would start with predefined levels that feel good, then dissect those in enemy groups and playable zone blocks then start the lego work from there and see which combinations make sense and the ones that don’t look good in particular to define creation rules.

hey eons,
thanks for your answer. I checked out the the torus trooper code some time ago and find it verry difficult to understand. I will give it another try.

Should i use a rigidbody player for the starship? Or is there a better starting point?

grol | 2017-04-15 07:03

Well, I’m in the group that is against rigid bodies :stuck_out_tongue:
But a game with a speed like this one may need CCD…

The good thing is that in Godot you can change a node type without the need of a big refactor.

I would start with the easiest to manipulate until the basic mechanics are working, the most complicated part will be de design of the stage itself.

The ship moves? the torus rotates? The torus is just a cylinder deformed by shaders? The torus exists? and other existential questions.
[insert mind blown meme here]

eons | 2017-04-15 16:41

:bust_in_silhouette: Reply From: grol

hey guys,

I have a basic flying camera working so i can fly around in in first person mode.
the second thing i like to create is the stage building logic.

I will drop the rotating cylinder for now and want to work with simple cubes and cylinders. which get attached in a certain distance.

I think I will measure the distance to the camera/starship and the automatically create objects to create a tunnel. also i will destroy the meshes behind the ship.

Is there a good logic how to do this without getting framedrops when loading new tunnel elements?