0 votes

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!

in Engine by (97 points)

2 Answers

0 votes

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.

by (7,894 points)

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?

Well, I'm in the group that is against rigid bodies :P
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]

0 votes

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?

by (97 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.