I’m having issues trying to conceptualize how I could implement a car select and track select properties within this racing game I’m working on. The catch is that I plan to have support for user-created content, meaning that the list of race cars and racetracks to choose from could be unique to every player. I also plan to mix-and-match the AI’s racecars within a race (stock car, sprint car, late model, street cars, etc.).
My idea is to use empty objects, and have them import the race cars to the racetrack as they are selected, but I’m not sure if an empty object can import multiple objects (body, tires, driver, etc.) at once. Also, file directories will be necessary in importing these cars, since each list can be unique, as I said earlier.
I hope this makes sense to you guys, and I hope you can help me out a bit, I’m new to this stuff. Thank you!
Yes, you need quite some python due to the dynamic nature of your request.
I suggest to split your requirements into several parts. Each part implements one aspect. This way you can replace an implementation with another without getting conflicts with the other aspects.
Search:
You need to find the available options. A way is to search a known directory for file names or directory names.
The result should be a list of “selectable options” e.g. “DefaultCar, MonsterTruck, …”
Selection
Simplest way: show the list and let the user select one option.
Better way: load “preview” objects and show them to the player. LibLoad can help you with it. As input you use the result form “Search”.
The result is the “selected option” e.g. “MonsterTruck”
Loading into the game scene
load “game” objects into your game scene similar to the “Better way” of “Selection”. As input you use the result form “Selection”.
The result is an active object in your scene.
Make sure that object is not already there.
Remarks:
All of that needs Python.
You can remove the selection scene after the user completed the selection. Yes, I strongly recommend to do selection in a separate scene.
You need preview data and game data. One for the selection scene and the other for the game scene. They can be the same.