Tuesday, 4 June 2013

Tuesday Traversals

Delete And Expand

For want of a better title, the code created today includes being able to completely delete a mesh item from the buffer in real-time and I have finally expanded the level in the map editor to 500x20x500 and reversed the grid Z alignment.

Delete Code

The delete stuff was pretty intense, as I had to record which buffer the reference item exited within, including the exact position of the vertex and index data within that buffer. Shuffling the remaining data to delete the intended data was simple enough, but then re-scanning the entire reference grid in the area to ensure the offsets recorded for the other items reflected the layout inside the buffer was a tough one!  There is a very strange corrupt happening very occasionally so will need to tackle that when it becomes too annoying.  In general though, it's a nice clean fast delete procedure and much better than my first theory which was simply to reduce the polygons to zero size on delete, but that would simply gobbled up memory as you continue adding and deleting during the edit.  With Add and Delete now features of the Instance Stamp system, and integrated into the map editor, it was nice to see the ability to add and move walls and floors.  It is not 100% yet as little things like combining edits are still missing, but the hard grunt work is done now.

Expand Code

The second big code chunk of the day was the 500x20x500 level size. Amazing how BIG it is.  Here is a small rough video (sorry Rick) of just how big the level edit area now is:

As you can see you really will not fill this area, and in order to stay sane and move onto other things I will keep the 99999x99999x99999 level size idea for a future upgrade.  I am not sure such a level size would make sense, but when we start seeing levels made out of 500x20x500 areas, we'll know!

Signing Off

Another hot day in Wales today, and now we've been invaded by flies. It's gone midnight here and I'm stripped to the waste typing code and blog, and each time the fly lands on me and crawls about I wish I had the moral blind-spot to squash the little git. Alas the only bugs I squash are the ones of my own making, so hopefully I can negotiate a truce with the fly and split the office down the middle. He (or her) can have the top half of the office :)

Wednesday should see more segment editing refinement so we can get back to where we w[h]ere, and hopefully segment art, textures and shaders are winging their way to me which will form the filling of my super cool deferred shader sandwich. Our concerns during the prototype stage will be performance, performance and not forgetting, performance.


  1. almost looks like snake :)
    (guess that one puts Rick to sleep ^^ )

    it really looks much bigger then what i expected it to be for
    500x20x500 i fear to think about how big it would be with 999999x... nah i think am happy with 500x20x500
    great work there

  2. The flies are a right pain, aren't they? I'm in Bristol and I counted 9 in our living room today. 9! Of course it doesn't help that the flat is so poorly ventilated it's constantly hotter than a turkish prison in here.

  3. You're KIDDING you won't kill a FLY??!

    Try living in Australia, that'd change your mind pretty quick ;)

  4. Flies in oz are on tractor beam. Our flies in uk are very passive and often keep to themselves. Flie s in all territories in oz are on a mission to irritate annoy and go for you. A form of distemper. The area looks great a weather system would be awesome too. And after your reassurance lee I will back fpscr on Friday for definite.

  5. To be honest that is the most impressive video yet for FPSC-R.

    My biggest issues included map size so this is fantastic!

    500x20x500 is a perfect size. The only way I could see us using anything larger is if we plan to make games like Fallout (i wish!).

  6. Well I hope to do something similar I have a world to map in 3d. Maybe an edge loader, each level becomes an area instead of a level. If possible of course. So it is go back and forth jumping levels. 500 grid makes it more doable but again just ideas so far. But inventory big areas and other extras make my twin world project a much more possible realisation.

  7. Oh yeah I forgot to mention that the size-of-map video is really cool. Well, the video itself isn't, but what it shows is. Awesome-large levels!

  8. Is the cell data loaded dynamically? I mean objects (meshes, textures, sounds, etc) in distant rooms are loaded/unloaded dynamically? Otherwise it would eat too much memory and loadings would take a tremendous amount of time.
    Good job! :)