basic structure
class kingpinsgame
{
public:
kingpinsgame(bool fullscreen, bool fun);
~kingpinsgame();
}
what do you think about this idea
Well, I had an idea like this, but I abandoned it when I found out how complex it really is. My game would only work with the laws of physics, but with the enormous size of the universe, your computer wouldn''t be able to store all of the data. The calculations would be too low to even play the game.
It is however possible to simulate a small area, and record the interaction with the surroundings. Objects would have protocols to respond to their environment. This can be implanted without too much trouble, and can make a good game, if you have a storyline.
BTW, do you have a storyline, or is it just a game where you walk around and do your daily jobs? If it is, then I don''t think the game will be a hit. Although it might be realistic, many people play games to escape reality and to become a super-hero for a while. A ''perfect'' simulation of the real world wouldn''t be fun to play, because you play it every day!
It is however possible to simulate a small area, and record the interaction with the surroundings. Objects would have protocols to respond to their environment. This can be implanted without too much trouble, and can make a good game, if you have a storyline.
BTW, do you have a storyline, or is it just a game where you walk around and do your daily jobs? If it is, then I don''t think the game will be a hit. Although it might be realistic, many people play games to escape reality and to become a super-hero for a while. A ''perfect'' simulation of the real world wouldn''t be fun to play, because you play it every day!
I also have a similar idea and haven''t realized the complexity until I took a data structure class ![](smile.gif)
However, can the details somehow be abstracted away, and be "magnified" when a user player moves around? (like how the Mandlebrot sets has infinite details). For example, when your character is at city A, what goes on in city B is abstracted away to a few indices that describe the condition of city B. As the character moves closer to B, details of B are calculated on the fly. Each city can be given a set of randomized seeds, from which the layout of the city is based upon. As Char moves to B, the positions of streets and buildings are calculated based on these seeds and city indices such as population. A city with a high commercial index may have more commercial buildings in the downtown. Values of indices change according to some macro rules that describe how the city progresses based on its current state. The derivation from seeds and indices to buildings must be consistent such that every time Char goes to B, B looks about the same (that house is still here, that tree is still there, etc...). To the player, it creates the illusion that the world is extremely big, and is progressing eventhough the player is not looking at it. Customized changes has to be stored separately, but it should be a small set within the billion objects (?)
![](smile.gif)
However, can the details somehow be abstracted away, and be "magnified" when a user player moves around? (like how the Mandlebrot sets has infinite details). For example, when your character is at city A, what goes on in city B is abstracted away to a few indices that describe the condition of city B. As the character moves closer to B, details of B are calculated on the fly. Each city can be given a set of randomized seeds, from which the layout of the city is based upon. As Char moves to B, the positions of streets and buildings are calculated based on these seeds and city indices such as population. A city with a high commercial index may have more commercial buildings in the downtown. Values of indices change according to some macro rules that describe how the city progresses based on its current state. The derivation from seeds and indices to buildings must be consistent such that every time Char goes to B, B looks about the same (that house is still here, that tree is still there, etc...). To the player, it creates the illusion that the world is extremely big, and is progressing eventhough the player is not looking at it. Customized changes has to be stored separately, but it should be a small set within the billion objects (?)
True, but after a player entered the city and has leaved it again, it still need to be stored. Because if a player leaves town for two days, the city isn''t allowed to really change. Building shouldn''t shift, so their coords must be stored. Also the current state and textures data need to be stored. So after playing several days, the savegame size would increase big time.
Still, this approach is better then calculating everything at once. This saves much computer time, but it will also decrease accuracy, because no every object in another area is processed in real time. If a person wants to move from a distant city to your location, it wouldn''t be processed (unless you create a special subroutine for that), but when you go to his location, he''s already gone!
The data structure is going to be complex. Not only data about the object itself should be stored, but also its relation to other object in the world. Especially in larger worlds the data structures grow huge. Anybody got an idea for this problem?
Still, this approach is better then calculating everything at once. This saves much computer time, but it will also decrease accuracy, because no every object in another area is processed in real time. If a person wants to move from a distant city to your location, it wouldn''t be processed (unless you create a special subroutine for that), but when you go to his location, he''s already gone!
The data structure is going to be complex. Not only data about the object itself should be stored, but also its relation to other object in the world. Especially in larger worlds the data structures grow huge. Anybody got an idea for this problem?
quote:
Original post by DanielPharos
True, but after a player entered the city and has leaved it again, it still need to be stored. Because if a player leaves town for two days, the city isn''t allowed to really change. Building shouldn''t shift, so their coords must be stored. Also the current state and textures data need to be stored. So after playing several days, the savegame size would increase big time.
No it wouldn''t because the random number generator is psuedo-random - give it the same input, and it generates the same number. If the seed is based on fixed data, then the city will look the same every time you visit it.
Frontier Elite (and probably the original Elite) used a similar method to generate planets. Apart a number of hard coded systems with familiar names (Sol, Alpha Centauri, Betelgeuse etc) most of the planets and stars were randomly generated with psuedo random number generators. As a result, the game managed to model the entire milkyway galaxy, yet all the game data was contained on a single floppy, with space on a second disk for saves.
However, the level of detail aimed at in the original post is ridiculously high, and largely unnecessary. My advice to Kingpinz would be to learn a little more about programming* and what computers are capable of - and what he and his programmers are capable of - and cut down the design accordingly. This sort of ''super reality game'' concept isn''t exactly new or original, the reason we don''t see them in the shops is because they aren''t even remotely feasible .
*No offense, but comments like "Make it into an OS type program so it runs faster" suggest that you still have a lot to learn.
well... i think THAT would be the perfect game...the perfect game because you have interaction on everything...
but the size problem of a project of such dimension is REALLY significative...
not only on HD...supposingly you create an engine that can handle a billion of object then:
if you are in a single player game that''s ok, you consider only X meters far from your eyes, and your processing time is saved...
but what if you are in multiplayer? 100 gamers, 100 different positions, and 100* (num_objects_visible_in_X_meters) objects to be calculated...i think that neither NASA has a computer that could be the server...
There aren''''t problems that can''''t be solved with a gun...
but the size problem of a project of such dimension is REALLY significative...
not only on HD...supposingly you create an engine that can handle a billion of object then:
if you are in a single player game that''s ok, you consider only X meters far from your eyes, and your processing time is saved...
but what if you are in multiplayer? 100 gamers, 100 different positions, and 100* (num_objects_visible_in_X_meters) objects to be calculated...i think that neither NASA has a computer that could be the server...
There aren''''t problems that can''''t be solved with a gun...
There aren''t problems that can''t be solved with a gun...
The way I throught about it, the city is an arena where the player interacts with NPC's. When the player can't do much to change the city, the city can be represented by a function City(L,S,P,C,t), where L is the layout variables (randomized in the begining once), S is the current city states (such as population, who the ruler is, military civilian ratio,% structure damaged), P holds initial progression paramters, C holds a list of major changes in terms of changes in P, and t is the current time.
For example, city B is a peaceful city until it is attacked in 1320AD. When Char enters city B, the game engine calls:
void City(L,S,P,C,t){
cMap M;
M.Layout(L);
double tTemp = L.InitialTime();
for(int i=0;i < C.Size();i++){
M.Progress(P,C.EventTime()-tTemp);<br> P = C.ApplyChanges(P);<br> tTemp = C.EventTime();<br> }<br> M.Progress(P,t-tTemp);<br> M.Populate(S);<br>}<br><br>It depends on how much detail the history should keep. Suppose Char witnessed the besiegement of B in 1320AD. In one of the attack, the East tower of the castle in B is catapulted and collapsed. In abstraction, B had taken a total damage of 43%. This information is stored in C, but the detail of where the damage is received may not. So, a year later when Char revisits B, the East tower may still stand, but the entire castle looks damaged by 43%. To simplify stuff, maybe the city should try to repair itself so that the event can be replace by a single time penalty on t. So after 30 years, the equation for B is identical to that if B has not been attacked, only that the value of B's L.InitialTime is maybe 10 years later than before (In another words, the attack delayed the progression of B by 10 years in the long run)<br><br><SPAN CLASS=editedby>[edited by - Estok on May 22, 2003 8:06:09 AM]</SPAN>
For example, city B is a peaceful city until it is attacked in 1320AD. When Char enters city B, the game engine calls:
void City(L,S,P,C,t){
cMap M;
M.Layout(L);
double tTemp = L.InitialTime();
for(int i=0;i < C.Size();i++){
M.Progress(P,C.EventTime()-tTemp);<br> P = C.ApplyChanges(P);<br> tTemp = C.EventTime();<br> }<br> M.Progress(P,t-tTemp);<br> M.Populate(S);<br>}<br><br>It depends on how much detail the history should keep. Suppose Char witnessed the besiegement of B in 1320AD. In one of the attack, the East tower of the castle in B is catapulted and collapsed. In abstraction, B had taken a total damage of 43%. This information is stored in C, but the detail of where the damage is received may not. So, a year later when Char revisits B, the East tower may still stand, but the entire castle looks damaged by 43%. To simplify stuff, maybe the city should try to repair itself so that the event can be replace by a single time penalty on t. So after 30 years, the equation for B is identical to that if B has not been attacked, only that the value of B's L.InitialTime is maybe 10 years later than before (In another words, the attack delayed the progression of B by 10 years in the long run)<br><br><SPAN CLASS=editedby>[edited by - Estok on May 22, 2003 8:06:09 AM]</SPAN>
quote:
Original post by Sandman
No it wouldn''t because the random number generator is psuedo-random - give it the same input, and it generates the same number. If the seed is based on fixed data, then the city will look the same every time you visit it.
But That will mean that if the player goes into the city and blows up a building then leaves and returns the building will be back there.
In which case you have a huge world but more or lesss zero interaction. Unless you record all the effects of player actions seperately and then overlay your original map with them everytime you generate it. But even that can become rather big.
---------------------------------------------------
There are two things he who seeks wisdom must understand...
Love... and Wudan!
---------------------------------------------------There are two things he who seeks wisdom must understand...Love... and Wudan!
It''s obvious we need some kind of compressing to make the size of the data that needs to be stored small (small in terms of gigabytes or even terabytes). We could compress the stored data with an algorithm like WinZip, WinAce etc. But what do we want to store? How far do you, kingpinzs, want to go? Storing everything, from person to building, from event to item, is probably impossible (with current technology).
To determine how much we want the game to store, it is essential to know the size of the game. A total freedom game would take up huge amounts of memory, and even a compression-algorithm can''t reduced that enough. Also, we need to store enough to make it realistic for the player of the game. Building shouldn''t resurrect without a reason, and persons can''t teleport around.
I don''t know how far you want to go, kingpinzs, but in order to help you, we kinda need more info about what the game is all about (I mean, now that you are reading the comments about the data size).
To determine how much we want the game to store, it is essential to know the size of the game. A total freedom game would take up huge amounts of memory, and even a compression-algorithm can''t reduced that enough. Also, we need to store enough to make it realistic for the player of the game. Building shouldn''t resurrect without a reason, and persons can''t teleport around.
I don''t know how far you want to go, kingpinzs, but in order to help you, we kinda need more info about what the game is all about (I mean, now that you are reading the comments about the data size).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement