简体   繁体   中英

Flash RPG Engine Question

I am developing an isometric rpg engine in flash AS3. I have decided to separate the engine code completely from the game data, which is in xml. So I have all the maps in xml files, all the quests and npcs etc. My question is when to parse the xml into actual Actionscript code. Should I do this at the start of every play session? Should I only parse the maps as they are called? This is like start up code. For example, I want to parse every tile into a tile object, then draw it to the map. Also, I want to parse the quests in the xml into quest objects so that they can be accessed by other code. So, when should I do this??

Interesting, I recently just finished a prototype for an MMORPG engine in Java ;)...

Anyway... if you don't mind the user seeing a loading screen when s/he for example goes to another map, then yes you should load it then. But, if you want the user to freely navigate around the game with minimal loading time, then load it at startup.

Parse things when you need to.

You shouldn't parse things constantly for gameplay. But you could parse NPC conversations or quests as they are needed.

You can parse maps as the player gets to a new area, or if its an open world then parse chunks of the map as he gets close to the edge of the map.

If you parse when you need it you could also set up something server side to stream a large amount of levels efficiently, so a player that plays 10 minutes and gets to level 2, doesn't have to download levels 2-100, saving bandwidth, and it could help the player get into the game easier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM