Posts filed under 'programming'
Project Cheddar
I don’t quite remember how, but I ended up checking out procedural generation, the process where a computer makes content instead of artists/others. And I started thinking… why not let it make the entire game? So I expanded on that in the hour or so I had before finals this morning, and I ended up with Project Cheddar (yes, as in the cheese). There are only a few constants:
- It’s a third-person shooter
- It has at least 2 weapons
- It has at least 2 enemies who shoot back
Other than that, the weapons themselves are all computer-generated (including their names… who wouldn’t want to fire the Yocuhuo?), as will be them map (when I get that far) and the computer AI. It will be pretty sick.
In order to facilitate rapid prototyping and deployment, I’ve decided to write it in JavaScript. No, you didn’t misread… JavaScript. Graphics are made in GIMP and published as PNG files, which are moved around using position:absolute and DOM.
Link will be up to a download… eventually.
Add comment 4 June 2008
The Next Not-Killer App
Well, I’ve been frustrated by the text editors of today. KWord, OpenOffice.Org, MS Office, they all suck for writing stories. There’s no page centering (vertically, not horizontally) for things like titles and such, and section management is horrible at any level. The best solution available to a C++ developer familiar with a GUI toolkit? Write my own. And so…
Introducing ProBook. It will be tailored to book writers, short story composers, and anybody else who feels like they need it. Why so specialized? It’s worked out well for Celtx, a scriptwriting package (A/V, radio, TV, movie, stage…), and the same should be for ProBook. And if it turns out to be something considerably less than a hit, I’ve got a potentially great writing app, and yet another C++/GUI exercise is done. And just because they look so darn cool, I’ll use the Silk icon set.
Until it’s lucritive enough to warrant even a $1.00 price tag, it’ll be 100% bona fide open source. You can grab the latest source code, binaries, and info (including a wiki) over at Google Code:
http://code.google.com/p/probook
Add comment 31 March 2008
∞ Steps to a Dungeon Generator
@ (or at, or at-rpg) is a roguelike I’m developing in C++ (yes, yes, Java is the language of the future; like I care. C++ runs without third-party software; I’m happy). However, I’ve run into perhaps the greatest problem ever faced by a roguelike programmer: the dungeon generator. The concept is so simple: make a random dungeon made of a few rooms, and a few hallways, all within an x by y grid. It’s easy… most third-graders could probably do it. But teaching a computer to do the same thing grows more impossible by the minute.
There are many, many theories on how to do such a thing. Mike Anderson’s “Dungeon Building Algorithm” gives one view from a theoretical perspective (no applied code in the article), while Random Dungeon Design: The Secret Workings of James Buck’s Dungeon Generator is another (no code again, but Writing Kode gives in-depth Java if you want it). Dungeondweller (roguelikedevelopment.com) sports a decent collection of map/dungeon creation articles, it’s worth checking out. I’ve read at least ten articles, and am still no closer than quasi-randomly placed rooms, unconnected by… anything.
However, hope is not far away! The progress is showing. My first shot gave me this:
.......
.......
.......
....... ......
....... ......
......
......
....... ......
....... ......
....... ......
....... ..............
....... ..............
....... ..............
....... ........
........
.... ........
.... ....... ........
.... ....... ........
.... .......
.... .......
Version 2:
............ ..............
...............
............... ............
............... ............ ...............
............... .................. ...............
.................... .................. ...............
.............................................. ...............
........................................................ ...............
........................................................ ...............
........................................................ ...............
........................................................ ...............
........................................................ ...............
........................................................ ...............
........................................................ ...............
.........................................................................
................... ............................
................... ............................
................... ............................
............ ............................
............ ....................
............ ..............
Better. Now, I’m working on v3 (based on Jamis Buck’s article/explanation/thing), and I expect decent results; it is nowhere near as complex, from what I’ve read of it. I haven’t gone too far past the first post of Writing Kode, but still…
You know. Just in case anybody was wondering.
Edit: Roguelike Development has moved everything over to its Wiki, Roguebasin, including the articles. I’ve updated the links, but don’t bother looking around Dungeondweller for them anymore.
1 comment 18 December 2007
Desktop Notebook, An SPA
Google Notebook does not work offline. Yes, there’s Google Gears. But if the only time you want to wait for it to load is the time it takes Firefox to parse it off of your hard drive, you’re out of luck. It’s built on AJAX… note the A and X (Asynchronous and XML). This means you need a seperate XML/HTML/XHTML file to to save your actual data in. All the site does is load/display and save/modify that document. So, in short, no SPA from there. Look up anything you want, but I haven’t found anything similar that runs on Linux. There are other notebook options, yes, but I’m not looking for one designed for tablets and hand-written notes. I’m looking for a hierarchy-based system with headings and paragraphs of content. XML editors could do this, but not quite like I wanted. So I wrote my own.
It’s not quite done yet. You can find it in my Google Pages. The stylesheets are minimal, but usable. Semi-simple Javascript (using the DOM, of course) and some simple HTML is all it’s made of. Feel free to experiment, download a copy (just save it as it is; there aren’t any images or anything, it’s all just one file), etc. But there is one big problem: saving. You’ll find there is a “Save” button, and some working code. But you end up with no stylesheets, JS code, or anything of real value except for the text and divs. I know exactly what the problem is, with no way to fix it.
Javascript can access the HTML source of any element using element.innerHTML. So, logically, you should be able to get the code for the page using document.innerHTML. Unfortunately for me, no, it’s not that simple. In fact, I haven’t figured out how to do it. Thus, the ‘content’ variable in the saving function saves only the innerHTML of document.body (everything in the BODY tag). So, in addition to presenting this still-young SPA, I also ask for help: how do you get the entire source? TiddyWiki does it, or at least looks like it. But no matter how many times I look over the source code of it, the problem gets no clearer.
Add comment 18 October 2007


