Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


AI in Roller-coaster Tycoon


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 xeos   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 January 2000 - 07:47 PM

I''m interested in finding out how Chris Sawyer did the AI in RCT. Did he realy use a struct for EACH PERSON? Wouldn''t this take HEAPS of memory??

Sponsor:

#2 cliffski   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 January 2000 - 08:55 PM

I dont know how he did it, but i have coded a similar game. If there are say, 600 people, and you are tracking a total of say 20 variables for them, each of 4 bytes then thats 80*600 = 48k of RAM.
Lets say he was needing 100 variables, and had room for 1000 people, thats still only 400k. minimal compared with the bitmaps required. The real challenge with games like that appears to be balancing all the thresholds so that the AI model works in a cohesive and logical way, the RAM requirements arent the problem.

http://www.positech.co.uk

Edited by - cliffski on 1/28/00 2:56:34 AM

#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 28 January 2000 - 08:32 AM

Does that mean I create X number of People, where each People is a struct / class?

#4 Stoffel   Members   -  Reputation: 250

Like
Likes
Like

Posted 28 January 2000 - 10:38 AM

That''s right, or you create an array of maximum size, or a class that dynamically allocates more room as people are added. He might have done some stuff with data packing (i.e. using every bit of information in the People struct). But to answer the first question: since each object has individual characterstics (which it already does, specifically position in the park), it has to be tracked somehow. It''s really not that much memory, in this age of virtual memory at least.

#5 Akura   Members   -  Reputation: 130

Like
Likes
Like

Posted 28 January 2000 - 11:12 AM

Hi

I do strongly believe he would want to use classes

and... well if he has a vector for position, and some var to control, hungry, thrist, happiness, what ever, and all took 10 bytes, i can say 1 mg for 100 persons is not much

in my curent game i need about 30 mgs just for the map (dont critikise i need them and thats final

even if it expands to 10 mgs, thats no real problem cause minimum to any computer now should be 32 and if possible more

bye

#6 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 29 January 2000 - 12:17 AM

RCT uses an array of 5,000 structures at 256 bytes each (total 1,280,000 bytes) for the people in the game. The number of people you can get is less than that because the same structure array is also used for the ride position info. If it can move around or come and go in the game it uses one of those structs. The graphics are elsewhere. Not sure about the AI - they''re pretty stupid guests.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS