New account registration is temporarily disabled.
0 reviews
  • Add Review
  • Subscribe
  • Nominate
  • Submit Media
  • RSS

Miscellaneous

Remembering Rainbows

As of right now, Gravity Pipe's memory management system is completely functional (and programmer-friendly!) and allows player to navigate the dark depths of this memory.

malloc and free (as stated before) work just like they do in C. As a programmer I can reserve certain parts of memory for a given array of numbers and then open it up for other arrays later.
Slightly more technical details below:
My implementation of malloc is essentially a priority queue of all the empty spaces in memory sorted by size. Whenever a request for space is made, the largest open space is removed from the queue, decreased in size to account for the new array and then put back into the queue. When a free request is made, empty spaces are merged together.
While this is certainly not the most space-efficient way to handle malloc, it's fast enough to handle well over a million mallocs/frees within the space between animation frames.

Whew, enough of that mumbo-jumbo.
The player can navigate memory by going to the "M" icon form the main menu and selecting a desired memory bloc. This takes the player to a screen full of different colored letters and numbers. Each character represents one byte of a file stored somewhere itenside of the Blue Sentinel's memory (more specifically, it's the hexadecimal representation of that by % 16, for spacing reasons). These bytes will be different colors depending on which user (or self-aware program!) requested the allocation of those bytes.

The player can navigate around memory with a "selector" that spans a five-byte stretch of memory. What can this selector do? Stay tuned to find out!

Miscellaneous

Got distracted a bit..

I finished malloc() and free() today. They're both very efficient (perhaps needlessly so) and they are both functional.

I would have gotten more done, but I decided to finish reading Way of Kings today. Totally worth it. That book kicked serious ass.

Tomorrow I'll test malloc and free more rigorously and then I'll start on the actually "combat" system. I've got a couple mock-ups done and... it's going to be a weird.

Miscellaneous

Heaps of trouble

I spent most of today desperately trying to optimize a section of code that I wrote.

Among other things, I'm writing a version of malloc for Gravity Pipe. For those of you who haven't had the terrific fun of writing in C, malloc is a function that lets you set aside a certain number of bits so that you can use them later. The computer knows not to touch them (since you already set them aside) which means that another program won't accidentally write over stuff you were trying to save. How will this be worked into gameplay and combat? Wait and see.

As it turns out, this is actually pretty difficult to write if you want it to work reasonably fast. There are a number of relatively easy ways to get something like this to work, but each one will contain a step--whether it's searching for open areas, writing to those open areas, or deleting the malloc'd space once you're done--which will be very slow.

After a day of working it out, I think I've come up with a decently fast solution which involves a a heap, a second heap which keeps the first heap from growing too large, and hash table.

That's all for today. I need to debug my heap implementation.

Miscellaneous

State of the Union... errr... Project

Hi all,

For those of you not coming here from WombatRPGs, Gravity Pipe might not look like much right now. There's quite a bit going on behind the scenes.

Everything here is written from scratch in Python. The only outside module that I'm using is Tkinter, which basically just means that I didn't have to make my own fonts. Everything else, from the text-wrap to the menu system is completely custom made.

Right now I'm working on the game's basic infrastructure. Everything is completely generic to the point where I've almost completely done away with conditionals in favor of function pointer arrays. Although this makes the code a bit more convoluted, it's slightly more efficient and (more importantly) I can add new modules and functions blazingly fast.

Currently I'm trying to tackle memory management. All in-game files and code is stored in an accessible and modifiable simulation of the computer's memory. You may have to fight garbage-collectors at the addresses where these files are stored, so be careful about collateral damage. A critical "identify" file might just become a jumble of useless characters if you aren't!
Pages: 1