First, in the tycoons they usually involve people. For example, in roller coaster tycoon, you have guests that come your park and to keep them happy you must feed them and have bathrooms. So what would be the best way to store data for hundreds of “guests” all of which have several variables (hunger, thirst, name, ect.)? Don’t forget that “guests” come and go constantly. Would a class work with functions for when a guest is hungry or needs a bathroom? |
Classes would work perfect for this.and it's the only way i would consider doing it.just make a class with some private variables like name, hunger and happyness then some functions to read/write to them.
so in your code each time want to make a guest just call
Guest guest1(name,hunger,happyness); // add more vars to the constructor this just example
Then something like this to edit them
if(guest1.hunger >= 70 && !guest1.iseating())
{
guest1.happyness -=1;
}
you get the idea so if want to make another guest call it again Guest guest2(Vars);.if you got to make lots of guests just make a guestcounter and iterate it each time you make a guest.
Also, how would you animate the guests to run smoothly? If you figure that there will be hundreds and they are always moving, would it be efficient to move each of them one frame at a time? Is it possible to run a thread for each person? |
I don't quite understand what you mean here but if you think about it how gonna have couple hundred on screen wouldn't your screen be wall to wall people.Most likely you will have less then a hundred on screen at a time,and if you did have more it would most likely mean you are zoomed out so you could set up a LOD system depending on how far you are currently zoomed out.but that's all i can say unless you clarify your question more.
Next, how would you store the data of your park? If your park is 100 “squares” by 100 “squares” (each square can hold one building type of thing just like in most construction games). Is there an easier way than storing the properties of each square and the type of building it holds? |
Easier then what?My suggestion is to make a simple map format such as...
map extension = 3 bytes//Just a certain value so you know its your map type.
mapname = 27 bytes
map width = 1 byte //will give you up to 256 you said only need 100 * 100
map height = 1 byte
background sound = 1 byte//have something in your code like(if map.backgroundsound == 4 {playsound(rand.mp3)})
then for each layer have something like this
tilesinlayer = 2 byte
{
position = 3 bytes?//idk it late or early however you look at it.
type/modelid = 2 byte
.//
.//just keep going position/type till done with this layers loop.
}
So depending on how may layers you need just add more loops.
What game engine do you think would be the best for this type of game? |
idk there so many,throw a rock you'll hit 10 of them.I would personally suggest using none of them you will learn a lot more in the process and feel a better sense of achievement.
Lastly, is there any way to open up .exe and .dat files to view the source code? This would allow me to see the source code for the game. |
short answer is no,and contrary to what kyon said it was most likely not written in ASM that might be the output of a dissembler but cpus don't understand ASM they understand machine code.