Portals

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
mattheweston
Chaos Rift Junior
Chaos Rift Junior
Posts: 200
Joined: Mon Feb 22, 2010 12:32 am
Current Project: Breakout clone, Unnamed 2D RPG
Favorite Gaming Platforms: PC, XBOX360
Programming Language of Choice: C#
Location: San Antonio,Texas
Contact:

Portals

Post by mattheweston »

Let's say you have a world map and within that world map you have various sub maps(towns, caves, dungeons, etc.).
I assume portals are used to connect one map to another, but is it best to load the next map into memory when you "go through" the portal or is it best to load several maps (at least the ones that are going to be close by) during initialization?


Or is this just something that is objective and changes from game to game?
Image
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: Portals

Post by Falco Girgis »

It's "subjective" because it changes from game to game.

And while I don't know if there is any real terminology for this kind of thing, most of us around here refer to these as "warps."

In Elysian Shadows, for example, we only want one area to be in RAM at a time on the DC/PSP where we only have 16MB and 32MB respectively. The PC, on the other hand, can have 3 or more areas loaded into RAM and can simply swap back and forth as the user comes and goes.
mattheweston
Chaos Rift Junior
Chaos Rift Junior
Posts: 200
Joined: Mon Feb 22, 2010 12:32 am
Current Project: Breakout clone, Unnamed 2D RPG
Favorite Gaming Platforms: PC, XBOX360
Programming Language of Choice: C#
Location: San Antonio,Texas
Contact:

Re: Portals

Post by mattheweston »

Yeah, I've been looking at code including the XNA RPG Starter kit where they use the term "Portal," but you have answered my question. It may be more advantageous to load one at a time for the 360, but on the pc to load several when doing initialization.
Image
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: Portals

Post by Ginto8 »

mattheweston wrote:Yeah, I've been looking at code including the XNA RPG Starter kit where they use the term "Portal," but you have answered my question. It may be more advantageous to load one at a time for the 360, but on the pc to load several when doing initialization.
The PS3 and the XBox 360 are pretty powerful - probably pretty easily comparable to most modern netbooks. So you should probably be capable of having at least 3 maps loaded at a time. It's mainly on more limited platforms, such as dreamcast, psp, etc. that you have to worry about that kind of stuff. And then there are platforms such as gba, where all the data is most likely stored as a constant array in the rom. In cases like that, there's no need to worry about that kind of stuff, since the loading would really only consist of copying from a const array to an array in RAM. Keep in mind the capabilities of whatever platform you're using, and don't just go and make general assumptions like "have more than 1 map loaded for PC, but not for any console".
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
Post Reply