• Register
Post news Report RSS You Can Haz Economies

One of the mission statements of Astral Clause is to have everything manufactured in a dynamic economy, similar to the X-Series. I have just finished the mechanics that allow equipment and ammunition to be manufactured and sold like every other commodity. This means that everything in the game can be manufactured by the same factory processes that make trade goods!

Posted by on

Intro
One of the mission statements of Astral Clause is to have everything manufactured in a dynamic economy, similar to the X-Series. I have just finished the mechanics that allow equipment and ammunition to be manufactured and sold like every other commodity. This means that everything in the game can be manufactured by the same factory processes that make trade goods!

Snapshot
This screenshot illustrates a second of activity in the universe. Note that the universe wasn't done "baking" so some stations were still being spawned. But you can see the traders across multiple solar systems going about their daily lives. Right click and view original if you need it larger.


If you noticed Amarok in the lower right corner, I was listening to "Ashes to Ashes" by David Bowie when I took this screenshot. Anyway, that big console dump proves that the universe is completely active even when you're not present in that solar system. It also demonstrates traders becoming "interested" in a ware, getting the ware, and selling it.

Obviously, this isn't showing off the graphics in the game, but it does show something far more important. Gameplay! You've seen how the game looks, but this shows you how it acts. It's hard to show you all this activity from the in-game perspective. But here's an example of that activity.


The icons overlap a bit, but that's several factories owned by various factions with NPC traders, taxies, and patrollers flying between them. It was much more impressive when everything was moving. I have pretty much solved the entire problem of NPC traders picking trade routes and patrol routes, and the manufacturing of goods. The economy is pretty much defined, it just needs more products and factories. I can now dedicate myself to combat code!

Trade Good -> Equipment
In my old model, trade goods and equipment were different. Equipment inherited the trade good because it was a more complete version of that. I have reworked this model so that the equipment is defined both in terms of a trade good and equipment. When on the market, it is a trade good so it can be bought and sold by the player and NPC traders with no complications. However, once fit, it is interpreted as a piece of equipment. When unit it becomes a trade good again. Here's an example of how a Shield Recharger is defined.

commodities.txt

<Item=Shield Extender 1>
	description='Improves maximum shield strength.'
        #item properties
	volume=1
	mass=1
	hp=10
	minPrice=8200
	maxPrice=12100
</Item>

modules.txt

<Module=Shield Extender 1>
	description='Improves maximum shield strength.'
        #item properties
	volume=1
	mass=1
	hp=10
        #modifiers
        shieldCapacityBonus=2
</Module>

And of course we have to be able to manufacture it.

processes.txt

<Process=MakeShieldExtender1>
    time=100
    consume=Standard Energy Unit:2
    consume=Raw Ore:2
    consume=Nanites:1
    consume=Electronic Components:3
    consume=Foodstuff:2
    produce=Shield Extender 1:1
</Process>

And a station needs to be able to make and sell it. Here's the relevant segment from a Shield Extender Fab's definition.

stations.txt

#commodities
process=MakeShieldExtender1
process=MakeShieldExtender2
process=MakeShieldExtender3
buy=Standard Energy Unit
buy=Raw Ore
buy=Electronic Components
buy=Nanites
buy=Foodstuff
sell=Shield Extender 1
sell=Shield Extender 2
sell=Shield Extender 3

Smart Collision Testing
My original collision testing scheme used bounding polyhedron that, when intersecting, were colliding. As cool as this is it fails when something moves quickly. Unlike in the real world where an object was always at every location between two points it crossed at some point in time (barring weird quantum crap), the game engine moves things forward in units. This means that my ship could pass through a station if I was moving fast enough.

To solve this problem I've used my moment velocity calculations. Since the translations on the X, Y, and Z axis were already calculated, I have used them to scale the bounding polyhedron using 1 + velocity along all axis. This means that the shape and size of the shell changes depending on how fast you're going! This effectively emulates realistic collisions because your collision shell IS everywhere you would have been in that instant.

Comments
As usual, if you have questions or comments feel free to leave them. The big thing I need right now is ideas on modeling the path of aircraft in a dogfight so I can use that to build some combat maneuvering code. For now, fly safe.

Post comment Comments
explorer13
explorer13 - - 238 comments

I await patiently for an alpha/demo/beta/video... :3

Sounds great so far, I look forward to its release. :D

Reply Good karma Bad karma+4 votes
lol1234
lol1234 - - 1,765 comments

Agreed, can't wait to play!

Reply Good karma Bad karma+1 vote
PilarGore
PilarGore - - 4 comments

You can definitely haz my money! A certain day 1/alpha-funding purchase. I'm guessing you noticed the earlier comments about no friction in space. So your modelling would involve only the linear speed of the craft; off-centre thrusters to change attitude (acting around the craft's centre of mass), and the gravity of nearby bodies (which acts as though it all comes from the centre of that body anyway). Then you could add on stuff like the reaction force of launching rockets etc. My guess is that the code would be simpler than atmospheric manoeuvering. Keep up the good work; looking forward to a final product!

Reply Good karma Bad karma+1 vote
masternerdguy Author
masternerdguy - - 528 comments

I don't want your money. Open source and free mate.

Reply Good karma+1 vote
PilarGore
PilarGore - - 4 comments

Hey Master Nerd Guy,
not been on the site for a bit, but the new work is looking good! Thanks for the comment--you're a gentleman for keeping it free and open.

Take care,

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: