iTerraform Tech Blog
by Kyle Hagin · 04/10/2012 (6:23 pm) · 4 comments
First off I wanted to thank the GarageGames community past, present, and future:) I am going on 7 years with torque coming up next month:) I can't even begin to describe how torque technology has helped me grow as an engineer. When I was studying engineering at university I liked to keep my mind in that high speed mode even when I was taking a break. So, I would use the torque game engine as my favorite past time:) It always kept me sharp and thinking on my toes. I want to share some of the things I came across when designing iTerraform and how I decided to implement them.
iTerraform 1.0 consists of 4092 islands in a sub region of the virtual planet iTerraform. Well you probably guessed that I didn't get too crazy and implement a super sweet terrain paging system in torque. Since I am a one man programming team I tend to pick the easiest path to a feature implementation. I found if you dick around on one thing too long you really don't get anywhere with only one worker:)
How does the map system work?
To start off I explored all sorts of things, I played around with multiple small terrains in one mission file, one big giant terrain, multiple giant terrains, simple terrain paging, etc. I finally ended up with just using the tools that I had versus trying to build new ones. For example I know that there is a really sweet setup already to host a single mission file. I decided to use that as a single unit to make one piece of land one map.
This gives you a lot of flexibility right out of the box. You can build different types of terrain using different resolutions. For example, I used a relatively small map size to get a nicely detailed island map. You could potentially change the resolution to make a much bigger map but with less detail like a dessert or a plain. To tie these single units together I used the mission area call backs to determine if a user has left a certain area of the map. From there I calculate the new map destination based on the users position. This has a significant draw back in that it takes a bit to load the next map file but we are not pushing torque to any new limits and it remains stable:) Think about GTA, you used to have to wait a few seconds to cross the bridge or whatever. This also leaves room for significant improvement but gets the job done for now. Later if there was a sweet terrain paging system based on mission files you could easily keep the single unit structure but "tie" it together differently.
How did you make 4092 maps?
I auto generated the maps using a modified version of torque. With a few lines of C++ changed I was able to create a terrain generation function that could pump out unique islands based on a random seed input. It took over 24 hours straight to generate all the islands and then another almost 48 hours to load to the game server:) Then I just used the ground layer effects to auto place trees. This is why you see the kind of weird lighting in thick areas. I chose that over using the forest editor because that uses its own binary file which is not very easy to toss around or manipulate with out the editor. Everything is about time to the indy. If you don't get it done now you may never do it. So, choosing the easiest way to move forward is always the best option. There is also another saying if you don't do it right the first time it will take you twice as long later:) Everything is a delicate balance and trade offs are everywhere.
How does the host system work?
iTerraform doesn't actually run its own dedicated servers. iTerraform has a custom master server setup. It will basically determine if a map is already hosted and if it is the client will join that host. If the map is not already hosted it will start the host on your computer. There is already a "reward" system in place that if you are executing contracts you will earn currency. For the future we are working on a system that will give all users that are hosting game currency.
How do you make sure users are who they say they are?
We have implemented an authorization system that uses RSA encryption to provide users with secure virtual currency transactions. The RSA key system provides unique opportunities to securely communicate between the client, the host, and the online game server.
Why virtual economy?
The virtual economy acts as a feedback mechanism to show who are the best players, where are the best maps, which models are peoples favorites, etc. The stock market gives users a chance to earn money as well as give and receive feedback in the form of game currency. I wanted to mimic the way our economic system works in the real world. This creates an inherent feedback and control system. I want to push this all the way to the next level. I want people to be able to do almost anything. Our economic system really lets that happen. In the real world if you want to make money on something you need to start a business and market your product etc. If you don't have money to do that then you need a job:) Well in the iTerraform game world it is very similar. You can get a job executing security contracts or you can buy game currency and purchase a corporation etc.
Closing
I want iTerraform to be like Christopher Columbus's new world. It is an exciting adventure into the unknown to create something that wasn't there before. I will provide you with the interface but iTerraform will be driven by the community. I have a slogan I have been throwing around and it is "Built by indies, Driven by the community."
Please download and check out the iTerraform 1.0 Beta download at www.iterraform.com
iTerraform 1.0 consists of 4092 islands in a sub region of the virtual planet iTerraform. Well you probably guessed that I didn't get too crazy and implement a super sweet terrain paging system in torque. Since I am a one man programming team I tend to pick the easiest path to a feature implementation. I found if you dick around on one thing too long you really don't get anywhere with only one worker:)
How does the map system work?
To start off I explored all sorts of things, I played around with multiple small terrains in one mission file, one big giant terrain, multiple giant terrains, simple terrain paging, etc. I finally ended up with just using the tools that I had versus trying to build new ones. For example I know that there is a really sweet setup already to host a single mission file. I decided to use that as a single unit to make one piece of land one map.
This gives you a lot of flexibility right out of the box. You can build different types of terrain using different resolutions. For example, I used a relatively small map size to get a nicely detailed island map. You could potentially change the resolution to make a much bigger map but with less detail like a dessert or a plain. To tie these single units together I used the mission area call backs to determine if a user has left a certain area of the map. From there I calculate the new map destination based on the users position. This has a significant draw back in that it takes a bit to load the next map file but we are not pushing torque to any new limits and it remains stable:) Think about GTA, you used to have to wait a few seconds to cross the bridge or whatever. This also leaves room for significant improvement but gets the job done for now. Later if there was a sweet terrain paging system based on mission files you could easily keep the single unit structure but "tie" it together differently.
How did you make 4092 maps?
I auto generated the maps using a modified version of torque. With a few lines of C++ changed I was able to create a terrain generation function that could pump out unique islands based on a random seed input. It took over 24 hours straight to generate all the islands and then another almost 48 hours to load to the game server:) Then I just used the ground layer effects to auto place trees. This is why you see the kind of weird lighting in thick areas. I chose that over using the forest editor because that uses its own binary file which is not very easy to toss around or manipulate with out the editor. Everything is about time to the indy. If you don't get it done now you may never do it. So, choosing the easiest way to move forward is always the best option. There is also another saying if you don't do it right the first time it will take you twice as long later:) Everything is a delicate balance and trade offs are everywhere.
How does the host system work?
iTerraform doesn't actually run its own dedicated servers. iTerraform has a custom master server setup. It will basically determine if a map is already hosted and if it is the client will join that host. If the map is not already hosted it will start the host on your computer. There is already a "reward" system in place that if you are executing contracts you will earn currency. For the future we are working on a system that will give all users that are hosting game currency.
How do you make sure users are who they say they are?
We have implemented an authorization system that uses RSA encryption to provide users with secure virtual currency transactions. The RSA key system provides unique opportunities to securely communicate between the client, the host, and the online game server.
Why virtual economy?
The virtual economy acts as a feedback mechanism to show who are the best players, where are the best maps, which models are peoples favorites, etc. The stock market gives users a chance to earn money as well as give and receive feedback in the form of game currency. I wanted to mimic the way our economic system works in the real world. This creates an inherent feedback and control system. I want to push this all the way to the next level. I want people to be able to do almost anything. Our economic system really lets that happen. In the real world if you want to make money on something you need to start a business and market your product etc. If you don't have money to do that then you need a job:) Well in the iTerraform game world it is very similar. You can get a job executing security contracts or you can buy game currency and purchase a corporation etc.
Closing
I want iTerraform to be like Christopher Columbus's new world. It is an exciting adventure into the unknown to create something that wasn't there before. I will provide you with the interface but iTerraform will be driven by the community. I have a slogan I have been throwing around and it is "Built by indies, Driven by the community."
Please download and check out the iTerraform 1.0 Beta download at www.iterraform.com
About the author
#2
04/11/2012 (10:12 am)
yea, wil test this too:) sounds awesome.
#3
Thanks for checking out the blog and the beta release! Check out our game page for ways to earn free credits as beta users:)
@Frank
There is definitely a level of satire behind that:)
04/11/2012 (4:14 pm)
@ allThanks for checking out the blog and the beta release! Check out our game page for ways to earn free credits as beta users:)
@Frank
There is definitely a level of satire behind that:)
#4
04/13/2012 (6:34 am)
Awesome! 
Torque Owner Demolishun
DemolishunConsulting Rocks!
This sounds really interesting. The simulation, the generation of environments, etc. I will definitely have to check it out!