Monday, 27 January 2014

It is BETA Week

Work

After a much enjoyed weekend of walking and dragging large trees off the beach (for later burning) I have returned to the cupboard I laughingly call an office to continue my daily developer slog.

So what has taken almost every minute from 9AM to 6:30PM (with no dinner)? Well it was a single item on my task list, entitled "- Stop enemies entering water". Sounds pretty simple right, add a line of code statement to the tune of "STOP THEM GOING IN WATER" and presto, done, right?



Well....not exactly.  I had to write a prototype to scan the height field, produce a series of black and white squares which denotes those areas under water, then run an image scan which detects the boundaries of these shapes, then wipe them out and replace them with a polygon representation of those shapes, then create a DarkAI obstacle based on that data, and finally integrate it through the main engine so the characters understand which areas on the terrain are 'no go' areas.

As you can see in the shot above, the system can accurately create a contour around a feature of the terrain. I can eventually extend this feature to exclude high hills which characters should be allowed to ascent (i.e. near vertical cliff walls).  For all my efforts however, when I ran the engine the character just ran straight through my obstacle, and I could not help notice the contour was every so slightly IN the water which means my characters might be taking a dip after all.  

In coding it, I have also identified that the system needs to deal with islands inside the water pools, which are like exclusion zones within a DarkAI obstacle polygon, so that's either more polygon math for me or a small task for someone else ;)

Such is development, we build our structures, and soon realize that it's sinking into the swamp. I think a little structural support is required to make sure this feature makes it into the BETA as I rather like the idea that the enemies go AROUND the river, instead of through it!

Play

Managed to cram in 2 miles of walking in place of dinner.  I confess to eating a piece of toast if that counts as dinner. Meeting day tommorow which attempts to review our current position, and identify any critical urgent items that absolutely must make the BETA. The good news is that most of the items we announced will be in, which gives me a nice warm feeling inside.

5 comments:

  1. get yourself a god hardy meal lee m8, all the work hours you put in you probably need it lol.. thanks fot all the effort thus far :D cant wait for beta 5..

    ReplyDelete
  2. Great work again Lee,I'me working very hard at the moment.Hope to start some more work with Reloaded soon.Love this blog,great to watch Reloaded grow in realtime.

    ReplyDelete
  3. I agree that the enemies should walk around the river. I also think that if the river is only knee deep the enemies should be able to wade through it. Or fight it out in the river with the player. Just a thought.

    ReplyDelete
  4. I just saw the video update posted on the Rift forums - great stuff!

    ReplyDelete
  5. your an amazing problem solver Lee

    ReplyDelete