My own space trading game
Posted: Wed Aug 10, 2022 8:16 am
I'd like some help with a game I'm trying to develop. I'm trying to compute something that I know I don't jave the math. But first, some background:
I am trying to do something similar, create a space trading game with planets in different places, where different planets have different prices for things, but having the planets locations generated programmatically rather than randomly. I actually had written a program to do this, based on a game someone wrote, which had a subroutine that, given the x,y position it would be empty space, a planet with technology level from 1-9, or a wormhole (randomly moves you somewhere else), and maybe a couple other things. I lost the original sources in my many moves.
The program offered many kinds of cargo that you can buy or sell, which included
Fuel - your ship uses one unit of fuel per turn, and fuel cannot be sold.
Torpedoes - use on other ships or sell at other planets.
Melange - I borrowed this one from Dune.
Beef, pork, wheat, corn, potatoes, whiskey, electronics, steel ingots, iron ore, drugs, copper, silver, gold, platinum, potassium, tools, and, of course, $2 whores (I was absolutely shameless).
You start with a certain amount of cash, in which you buy whatever you can afford, with level 1 technology planets being cheap for raw materials (ore, foodstuffs) but expensive for technology. Level 9 planets are the reverse, with 2-8 being in between, i.e. low planets provide resources, high planets process them. This means you can do quire well carrying goods from one planet to another, There are other things. Oh, and the game is multiplayer, so you can spend time doing planet-to-planet trading, or go look for another ship, try to overcome their shields and armor, then loot them for fun and profit! You can destroy the husk of a ship that is defeated and drained, in which case they start over, or leave them with a damaged worthless hulk stripped and discarded, if you're devious.
The game play is on a grid from 8000 to FFFF, then 0000, then 0001 to 7FFF, in both X and Y directions. This means the grid could be up to 65536x65536, or 4 billion, but typically is smaller than this. Anyone spot can be empty space, a planet, an anomaly, or another ship. Ships have certain size hulls, of which larger ones may be purchased. Bigger hulls hold more cargo.
My question is, does anyone have the math to know how to plot planet locations, and tech levels for those planets, for any specific location?
I am trying to do something similar, create a space trading game with planets in different places, where different planets have different prices for things, but having the planets locations generated programmatically rather than randomly. I actually had written a program to do this, based on a game someone wrote, which had a subroutine that, given the x,y position it would be empty space, a planet with technology level from 1-9, or a wormhole (randomly moves you somewhere else), and maybe a couple other things. I lost the original sources in my many moves.
The program offered many kinds of cargo that you can buy or sell, which included
Fuel - your ship uses one unit of fuel per turn, and fuel cannot be sold.
Torpedoes - use on other ships or sell at other planets.
Melange - I borrowed this one from Dune.
Beef, pork, wheat, corn, potatoes, whiskey, electronics, steel ingots, iron ore, drugs, copper, silver, gold, platinum, potassium, tools, and, of course, $2 whores (I was absolutely shameless).
You start with a certain amount of cash, in which you buy whatever you can afford, with level 1 technology planets being cheap for raw materials (ore, foodstuffs) but expensive for technology. Level 9 planets are the reverse, with 2-8 being in between, i.e. low planets provide resources, high planets process them. This means you can do quire well carrying goods from one planet to another, There are other things. Oh, and the game is multiplayer, so you can spend time doing planet-to-planet trading, or go look for another ship, try to overcome their shields and armor, then loot them for fun and profit! You can destroy the husk of a ship that is defeated and drained, in which case they start over, or leave them with a damaged worthless hulk stripped and discarded, if you're devious.
The game play is on a grid from 8000 to FFFF, then 0000, then 0001 to 7FFF, in both X and Y directions. This means the grid could be up to 65536x65536, or 4 billion, but typically is smaller than this. Anyone spot can be empty space, a planet, an anomaly, or another ship. Ships have certain size hulls, of which larger ones may be purchased. Bigger hulls hold more cargo.
My question is, does anyone have the math to know how to plot planet locations, and tech levels for those planets, for any specific location?