Hello all.
As of late, I’ve been playing around with basic python development, and have arrived at the point were I’m trying my hand at developing a little console based game, called rim-66, heavily inspired from elements of projects like the Wastes and War-Sim. That’s to say, a text based experience with random generation of things from weapons, to in game characters, to locations. For those interested, the base premise of the game is as follows.
In the late 21st century humanity has expanded throughout our local soler system, and is starting to establish colonies on distant exoplanets outside the range of influence of sol. On their way to set up a colony on a potential planet, 3 ships traveling through deep space have contact lost with them, disappear, and are reported MIA. As part of a rescue and investigation team, the player character is dispatched to the last reported coordinates of the 3 missing craft. Upon reaching the location, the crew is caught off guard by the sudden and unexplainable formation of a black hole, and caught on its event horizon, are subsequently dragged in. Emerging on the opposite end, the ship finds itself in orbit around an uncharted planet. However, having experienced system wide loss of life support systems and catastrophic malfunction, the onboard life-pods are jettisoned to the planet’s surface, with the player character being in one of these life-pods, and starting there at the beginning of the game.
So based off of that description, many of you’ve probably realised that the game’s also been inspired by Rim world and Sub Nautica. In any case, my main question and reason for creating this topic is to firstly ask if people have some suggestions for things I could try to implement in the game, and secondly to ask for the best way how I can go about randomly generating stuff.
Essentially what I’ve so far put together are a whole bunch of number generators which determine objects, their descriptions, and effects. With Weapons for example I’ve defined their overall elements such as , Gun.Name, Gun.Type, etc, and then I’ve created generators. Then an if statement checks the generated number, and switches that number to actual words. Then the generation gets kicked on over to a function housing more specific terms and elements for what it generated. for example.
Gun.Type1 = random.randint(1, 4)
If Gun.Type1 == 1:
Gun.Type1 = “submachinegun”
Submachinegun()
This method holds true for things like adjectives which determine what effects are tied to the generated weapon, what action it uses, for example bolt-action, fully-automatic, etc, round capacity and type, and a few other elements. Then, at the end of that, there are a few if triggers which look out for combinations that don’t quite fit, ever heard of a pump-action snipers machinegun, and changes it to a more acceptable term.
I’m using this similar method for most of the random generation in the game, and at this point my question arises. Firstly, is this a good system to be working with, or is this an abomination of code which should be put to the flame and incinerated, and secondly, how would I go about importing the generated weapons and stuff into a game. My idea is that I would like the game to generate x amount of weapons at game start, and then only generate those x amount of weapons for the duration of that specific seed. An idea which I’m toying with is creating a number of values, which will be matched with weapons upon generation. For example, I create a value called Weapon1, and then I tell the game to run the weapon generation process. The result is then saved to the Weapon1 value. The problem here is that I’m not sure if that is even feasible in python, and how to write it out even if it is.
Any suggestions would be very much welcomed, and I look forward to seeing any other recommendations and feedback that you guys might have.
https://www.youtube.com/channel/UCC9wWO … R85ILY1VQ/
Their you'll find some gaming videos, and what ever els my confused mess of a brain decides to upload. Hope you enjoy it and Stay safe, folks.