Code: Select all
dim as integer dskW = 1024, dskH = 800
'screencontrol fb. GET_DESKTOP_SIZE , dskW, dskH
screenRes .7*dskW, .6*dskH, 32, 2, , 0
don't know what you are trying to show me, but most of that code is beyond what I know.... I guess I am a basic Basic guy...
in any case, I do think you are still misunderstanding, but its OK, I think you will understand more once I get a simple simulation going
Have you ever played a city-builder? Kinda like an RTS game, but you only indirectly control the Agents. Existing game examples would be:
(1) Towns (free demo here: http://www.townsgame.com/index.php?opti ... 4&Itemid=5)
(2) Dwarf Fortress (description here: http://www.bay12games.com/dwarves/features.html) - I don't recommend playing Dwarf Fortress as the learning curve is intense and it is all ascii graphics...ug (there are mods to give it a graphical sheen though....)
Basically in these games there are a multitude of Agents running around, and they construct and do things as you command indirectly - you don't control each agent, rather you assign general tasks to be done (build something over here, dig a tunnel there, make a carpentry station here, patrol this area, etc...) and the agents figure out who will do a task (or multiple agents) and proceed to do them. The agents also have individual stats and variables that determine how sleepy they are (if tired, then they will stop working and go to their bed/house, etc), how hungry they are (if hungry they will go get some food), how hurt they are (if injured, they will seek medical attention, etc). They are basically micro-human(dwarf) simulations and the 'player' acts like the King or Overlord issuing commands.
The AI used is about 80% of what I am envisioning-I propose going one step further: remove the player from the overlord position, and replace him with an AI for each agent which determines their desires - Do they want to build a house? Do they want to build a better house? Do they want to be a Farmer? or a Carpenter? or a Blacksmith? These questions will be ones they themselves will answer, according to a Maslow's based AI. In addition, their local environment and economy will influence these decisions - and THEY will influence the local economy. Say all the Agents decide they want to be carpenters... well, most of them will not succeed(and starve!) because the goods made will be worthless to other carpenters... so some will then choose to be Farmers or something else. This cycle continues until a general market level of distribution is reached (say a population of 100 agents might end up with :15 carpenters, 5 blacksmiths, 30 farmers, 10 fishermen, 5 hunters, 15 lumberjacks, 10 Bakers, 5 Bar Owners, 2 Beer makers, 3 Beggars. This distribution, and the prices of every Good involved, is not set by the programmer, but rather by the environment and the 'personalities' and traits of the Agents themselves. AND, it is fully dynamic, meaning that the 'society' changes to adapt to new circumstances - a volcano explodes nearby, destroying all the local forests...poof... now the lumberjacks gotta figure out what else to do to put food on their plate, same to with the related professions (carpentry, etc). So, the player is removed from the game and it is just a pure simulation - what fun is that? Now, reinsert the player as an individual, just like another Agent and interacting with all the other Agents, figuring out how to survive and thrive in the economy/world. Basically an RPG in a dynamic world setting.
ALL of this depends upon having the agents interact economically (through trade and market prices). Determining prices in a truly free setting like this has been a bit of a conundrum, until I found this paper: https://pdfs.semanticscholar.org/e933/0 ... 5db6dd.pdf. A simple system for individual agents to determine market prices in a dynamic setting.... I have yet to prototype it in FreeBasic, but it appears easy enough....
ack! i always get off on these tangents.... sorry for the wall of text....