Jump to content
  • Advertisement
  • entries
    444
  • comments
    1237
  • views
    774648

Shhhh! Be vewy, vewy qwiet. I'm hunting bugs...

Sign in to follow this  
JTippetts

202 views

Squashed a few bugs in Accidental, and made some small changes to the way things are done. I've decided to eliminate the ability for scripts to change the map dimensions, and instead locked the dimensions at 257x257 tiles (or whatever values are specified in the configuration file). I was running into some strange problems sometimes, trying to reallocate the buffers to increase in size, and it was just all in all a pain. Especially since I rarely changed sizes anyway. 257x257 gives you a nice, hefty chunk of level and plenty of room to do just about anything with, so it'll be fine. It's simple enough to edit Config.txt to change the map dimensions anyway, and I avoid the reallocation mess that can occasionally crop up due to memory fragmentation and such.

I'm currently working on scripts for a cave generation technique that combines meta-balls (or, rather, meta-circles) and accretion fractals to 'grow' a cavern complex. I seed the level with an initial circle, then proceed to attach or grow additional random circles outward. I'm still hammering out the best method for performing the accretion; currently, I spawn a random circle somewhere out in the void and move it along a line toward some existing random point in the fractal until it collides with a portion of the fractal. Once I've accreted a sufficient number of circles, I generate fields (meta-circles; 2D versions of the meta-blobs, or blobby objects, that are so fun to play with in 3D) and trace the outline of the fields at a given threshold to generate the cave. It's a little hackish, but it gives me decent results. (Incidentally, this is a pretty decent method to use in 3D with meta-spheres. It can grow some pretty interesting 3D cave complexes.)

I'm also refining my random path code. I've build a sub-division poly-line generator that can create a 'squiggly' path between two points, useful for generating slightly random, meandering paths through a level, paths that must connect two specific points but which must also have a degree of randomness to eliminate the unnatural straight lines. I'll probably end up compiling a lot of this stuff into a core library that map scripts can call upon. (This stuff will come in very handy when I settle on an engine and finally try to finish a game.)
Sign in to follow this  


1 Comment


Recommended Comments

Hey Josh, do you sleep? Just curious. The amount of code you generate leads me to think you crash at night with your keyboard in your hands. 8>)

BTW, can't wait to see how your cavern stuff comes out.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!