Trending Games | Final Fantasy XIV: A Realm Reborn | World of Warcraft | Star Wars: The Old Republic | EverQuest

  Network:  FPSguru RTSguru
Login:  Password:   Remember?  
Show Quick Gamelist Jump to Random Game
Members:2,900,962 Users Online:0
Games:753  Posts:6,271,189

Show Blog

Link to this blogs RSS feed

Mythaka Development

This blog is dedicated to reporting the ongoing developments of the Mythaka indie MMO project. Comments are encouraged, and will help shape the evolution of the project!

Author: lynnara

Experiments in Teleportation

Posted by lynnara Tuesday August 23 2011 at 5:10PM
Login or Register to rate this blog post!

Supersized and downsized...

Well after waiting and waiting for the second (and bigger) landscape to finish, I ended up hitting another architectural limitation. During the process of figuring out the cause of the failure, I learned a few key ( and undocumented ) design elements of the world editor system. This sent me back to the drawing board, literally. From the ashes of the failed landscape, I came back with an adjusted plan and world design.

I would have liked to have one continuous landscape for an entire planet, but that is just not possible. With the new design, the map of the planet I'm creating is broken up into six chunks, two rows of three columns. In order to facilitate a contiguous design, I created a batch of scripts that would take my large landscape and break it into overlapping chunks, with cloned edges for continuity. The work I put into creating the failed landscape was recovered gracefully.

Each of the six sections of land take about a day to run through the pipeline. Because I was rather impatient to start working on other things, I only ran the pipeline on the northwest and northeast sections for now. Why did I choose two totally disconnected sections first? My plan is to make the planet circular.

Connecting the disconnected...

After the landscapes finished building, and the game code was updated to spawn new players in the new area, the next thing that needed to be done was to connect the two lands so that characters could travel between them. In this case, I was connecting the west edge of the northwest section to the east edge of the northeast section.

Getting teleporters to work would seem like a relatively simple thing to do. Yeah right. There are a handful of teleportation techniques built into the engine: using teleport inventory items, clicking on an object to trigger a teleport, NPC AI teleport commands, and landscape teleport triggers. The obvious solution would be to use a landscape trigger. Unfortunately, landscape triggers need to be built into the 3d model of the area and baked into the landscape itself. That is just plain dumb. To get a barely acceptable teleport system to work, I settled for clicking object triggers.

Once those were working, and I was able to move between the landscape sections, I decided to try to figure out a better solution for landscape triggers.

I'm in the zone...

The world editor allows me to create polygon zones that can be named and used for various purposes. When moving a character into or out of continent, region or place zones, a message pops up onscreen letting the player know. My first thought was, ok why on earth did the engine developers *not* use this to create landscape teleport triggers? As I dug around in the source code, I started realizing that it is going to take a fair bit of work, not only in the engine but also in the world editor and build pipeline. I am probably going to have to dig in and do it, but I decided to try something simpler first.

I started experimenting with NPC based AI teleporting scripts. I know its a total hack, but I decided that since NPCs keep lists of players in aggro range, why not try to use that? So I set about creating some aggressive NPCs that are forced to stand their ground, and run an AI loop that teleports any player that comes close enough. Pretty simple concept, or so I thought.

With great power comes... complications...

The AI system in the game engine allows for some fairly complex behaviors. NPCs have hunger and need rest, and can have zones assigned for feeding, hunting, resting, and even migratory patterns can be set. Behaviors can change depending on the time of day, the weather, and the seasons. Aggro radius parameters change depending on states of hunger, and the type of overall AI ( herbivore, omnivore, predator ). On top of all that, there are modulations that allow for a number of variables such as levels of fear, courage, damage taken, and the prospective target's overall strength. Also, the AI determines whether to aggro or not based on player (or other AI bot) race and fame.

In short, it is nearly impossible to just make a simple NPC aggro any player. Because of the complexity of the behavioral system, the simplest thing that any crappy engine can do... create an NPC that attacks any player it sees... is needlessly complex. Normally I would not consider creating such a "dumb" NPC. The work involved in trying to make "smart" NPCs into "dumb" ones is frustrating to say the least. But I am weighing the difference in time between reworking the engine's landscape triggers and getting these NPCs to act as landscape triggers.

I am going to keep working with the NPCs for now. In the process, I am learning all kinds of crazy ways to make NPCs act, so it is not a totally wasted effort.

That is all for now, lets hope I have more interesting developments next time...

~Zombri

the Undead Dev

MMORPG.com writes:
Login or Register to post a comment

Special Offers