Programming Technique in IWAR

More
19 years 6 months ago #18461 by krisvek
I was thinking, as I sometimes do, about "the ultimate game"...or atleast, one version of it. Now, this topic isn't about that...I think most of us have seen enough of those :) (i dont want anyone stealing my ideas! lol)

I was thinking along the lines of a FPS/space-sim hybrid. UT2004, Battlefield, Red Faction, Breed (has anyone actually played that? i'd like to hear about it), GTA, and some game I havent played yet called Mace Griffin: Bounty Hunter, are some titles I've heard of that do something close to this, but so far as I can tell, either havent done it well, or not to the extent that I have in mind. Most of those titles are somewhat recent, so to me it seems that the ability to do it is upon us.

Question is...how did they develop the "free-range" universe in IWAR(and in other games, like those listed above, or...Morrowind, for example)? I've read about some programming technique that I believe is the method, but I can't remember what it was. Regardless, I didn't really get the best idea of how it worked from what I had read, so if someone could explain it in simple terms also, that'd be great. The basics of how all the data is kept and saved, how it is implemented when the player approaches a different area, and how the whole 'persistant' thing can work (the player is off on island A playing around, but over on island B, the routines and lives of the NPCs continue on...I suspect this is basically just a trick, that there really is no simulation of the NPCs, but rather, when the player approaches the area, a set formula or something is run to determine the changes that virtually occured...perhaps this is how 'living economies' are achived in some titles?)

Basically, I'm thinking something along the lines of a GTA in space I guess, atleast in the basic idea of being able to go anywhere and use anything. But throw in some SystemShock/DeusEx interfacing, RPG elements (hacking!) for good measure (has anyone here played Breakdown, on the Xbox? crazy cool game...uses some cool ideas too, immersion/interface stuff); that way, youre flying around, you land on a station, you walk around the station, find yourself a cargo ship full of Ore you want...cant carry all that ore, so you just jack the ship...dont have the keys, so ya gotta hotwire/hack it, via a little minigame thing like in SS2 (that way skill and luck is involved)...and then maybe you have to hack or blow the airlock open, and then mebbe remote link back to the ship you flew in on and dock it to your new cargo ship...or autopilot the cargo and use the remote to defend yourself...etc. the usual dreaming :)

Please Log in or Create an account to join the conversation.

More
19 years 6 months ago #13147 by GrandpaTrout
I have seen many approaches to the free range idea. All games use the concept to some degree, because the player cannot look everywhere at the same time. So objects out of player view do not get rendered.

The game engine has a database of objects. And it checks to see which ones are visible, and which ones are not. It renderes the visible ones.

In an RTS game, the units can still fight, despite not being visible. The database is like a chessboard. And the pieces can still conflict and do damage to each other without the player being nearby. Those games are designed to handle battles between the units without the player. That is one way to deal with a free-range universe. But that is not very common. However X2 uses this design. It tends to be processor intensive, and they seem to have compensated by using simpler graphics.

Games like the old Elite did not have anything happening outside of the star system. They made clever use of Seeded Random numbers to generate the exact same system configuration every time you visited. This allowed them to include a limitless galaxy in a few meg of memory. But you pay for that with lack on interesting dynamic behavior.

Games like Iwar use a bubble of active space around the player. The game constantly tracks the player and creates the world just outside of eye view. And removes the world that you leave behind. It does a nice job for a mission based game. But again, nothing really is happening when the player is not there to see it happen.

Please Log in or Create an account to join the conversation.

More
19 years 6 months ago #13148 by krisvek
thank you, that was very informative and covers alot of what i was wondering :) i hadnt even thought about the simpler games like RTS and such...but yeah, i guess that makes sense too; so in IWAR, when you approach a base, for example, the basics of it are just numbers inna database; when youre in range, those numbers are used to tell it what to render and where; you can change that database to do different things depending on other events, too, right? but in IWAR, only user-events can effect the database (or events that happen in the user's presence)...because calculating out the effects of all events, particularly those of persistant NPCs, would be processor-intensive...

Please Log in or Create an account to join the conversation.

More
19 years 6 months ago #13149 by GrandpaTrout
How processor intensive the database is, depends on what it needs to do. I read an article on the design of never winter nights. They have this very complex combat system. But they wanted to be able to have large and distant armies fighting at the same time. So they coded a super simple combat system. And when the players are not around, they use the simple one to save CPU cycles.

I would guess that your game idea is doable. But you would have to design it from the ground up with the right kind of rules to keep the background database handling simple.

Have you ever done any modding? We discovered once that Unreal Tournament and Iwar use very similar INI files. And if we knew an Unreal modder (programmer) I bet we could end up hooking the two games together. Not seemless. But you would play to a point in Iwar (say to start a boarding action) and then it would write critical data to the INI file. Then you would start up Unreal, and it would read the INI file and from that load the correct map, put you in the correct spot, and place the correct enemies. If you get through the Unreal part alive, it writes success back into the INI file. You restart Iwar and pick up where you left off. A little clumsy (ok, alot clumsy) but it would still be very cool to explore abandond stations on foot. Or try to take over an enemy ship.

Please Log in or Create an account to join the conversation.

More
19 years 6 months ago #13155 by krisvek
i hadnt known that about Unreal...that idea sounds awesome, even though it might not be the most fluid, like you said; i have some programming knowledge (have had classes on it), but little experience with it so far; been wanting to get into modding to get some of that experience; so, yeah, i wouldnt be able to work on a combination thing like that just yet :) very interesting still...making it seamless would be highly desirable though; perhpas you could have the two games running at the same time? today's machines could probably handle that, especially since IWAR is as old as it is, and you'd probably want to use an older Unreal just for equalizing things...mebbe just pause one when you switched to the other...but you'd have to find a way to control which display would be up front and when...

i havent played neverwinter nights, but that method you mention sounds familiar actually...having simpler systems to handle things that were in the background; you'd have to make sure your simple system didn't do anything unfair or 'unrealistic', but since no one would be watching, you could probably get by with alot :) (and there's always that ambiguous luck factor..."my army got killed by ONE TROLL?!?! wtf!!" "dude...the troll mightve rolled a boulder onto them, who knows, it could happen...")
so far as the 'ultimate game' idea goes though....yeah, i figure if i really wanted to do it, it'd have to be from the ground up...that's the best way to do anything, generally...using an existing engine limits you, and takes away some of your abilities and control, not to mention having to wade through someone else's code and figure it all out (unless you could know the code well enough to strip out what you didnt want while maintaining what you did want)

Please Log in or Create an account to join the conversation.