Jemgine
12Oct/12Off

‘Gem’, the new Jemgine

I've kind of re-begun the Jemgine project. You know the one. The one this blog is named after. This time, though, it won't be such a mess of unconnected crap... maybe. I've taken the basic structure of Jemgine and refined it, and begun rebuilding. There are a few things I want to see happen here.
1) Combine the bits I like about trains on hexes and the heightmapped hex grid and all the generated castlevania stuff into some sort of fucked up hybrid.
2) Somehow include an 8bit programmable cpu in the game, and then rewrite DCPUC to target it instead.
3) Use MISP for scripting in some way.
So yeah about the mud; building a mud from scratch just isn't fun after a certain point. It turns into work.

Filed under: Daily Update No Comments
22Aug/12Off

LudumDare 24

So this ludumdare; because I often use ludumdare as an excuse to work on random projects; I will be writing my entry in MISP. MISP is a programming language I invented. It's a sort of object-oriented LISP. I wrote a library for it called MISPGame which gives me some basic functionality. It can create a window and draw sprites and that's about it. I've written a lot of code in MISP for a mud, so we'll see how this goes. I really like the language, and rolling my own is probably the only way I'd put up with lispyness.

Filed under: Daily Update No Comments
28Jul/12Off

Mud Web Client

I've recently been working on a web client for a mud engine I'm writing, which I suppose will function as a web client for any mud that supports websockets. It's been a bit rough, what with my almost non-existent knowledge of javascript and html and css. Sure, I've used them all, but I never really cared to get to know them. I stop with the css as soon as it looks kinda how I want. Anyway, here's what I've learned.

  • Javascript blows. I've used ActionScript (Uh, http://jemgine.omnisu.com/projects/ld23/ ) and ActionScript is (supposably) Javascript with a type system; but that slim type system really adds a lot. Also, not having a debugging environment is kind of a pain. I'm sure they exist, but I haven't got one.
  • Websockets are a pain in the ass. I don't understand why there isn't some bare socket available in Javascript. I guess websockets can punch through port 80? Who knows. Thankfully, I found a library to deal with them (called Alchemy) which brings me to..
  • Alchemy blows. It's better now that I've fixed it, but the library relied on the connection object being disposed by the garbage collector to actually disconnect when a connection timed out. Actually, it needs to be disposed to raise the 'OnDisconnect' event at all, and this is the only hook supplied to client code. So don't you dare keep a copy of the connection around (You know, so you can send stuff to it) and prevent it being collected. I fixed this (It's like, one fucking line of code. Oh, and calling 'disconnect' doesn't actually disconnect. Fixed that too.)
  • The way websockets work creates terrible confusion in any api trying to wrap them. What's the difference between OnConnect and OnConnected? Who knows, but do your work in the latter.
  • Why does this blog get so much spam for essay writing services?
  • MISP ( http://mud.omnisu.com/doku.php?id=misp ) is really fucking awesome. And that's what I'm actually going to talk about.

See, the webclient ( http://mud.omnisu.com/webclient/ - Don't try to connect, it probably won't work. ) (has/is going to have) little icons embedded in the text to perform basic commands in the mud. This is a straightforward system. The exit name is followed by a picture of a book; click it to go that direction. Objects have magnifying glasses for looking at them and hands for grabbing them. I 'devised', or, 'made up on the spot with no forethought' a simple mechanism for specifying these commands. Just embed {:the command} in the output of the mud. Oh, sure, there are more complicated and 'good' ways of doing it, but then I'd have to jump through hoops to generate the output and ignore something MISP is really quite good at.
But not everyone is using the webclient (Hell, I don't use it.) Should everyone else have their output full of {:crap}? No! So, the mudlib needs to generate different descriptions depending on the type of client the player is using. The solution is an object with methods that generate the output. Write one object for basic formatting, write another for formatting with all the little icons.
MISP doesn't actually have member functions, but it does have function pointers (kind of) so it's pretty simple to implement: basic-formatter, when loaded, defines some functions that do the work, and then it is also a 'formatter object'. Each player has a 'formatter', and the descriptions use that formatter for... uh. Formatting. It even looks like a member function when you call it, too.

(defun "basic-formatter-list-objects" ^("list list" "prepend-isare" "list-on") [] 
	(if (equal (length list) 1)
		(if (prepend-isare) 
			"is ((first list):a)(basic-formatter-list-objects-on (first list) list-on)"
			"((first list):a)(basic-formatter-list-objects-on (first list) list-on)"
		)
		(if (prepend-isare) "are (strcat 
			$(mapi "i" list
				(if (equal i (subtract (length list) 1)) 
					"and ((index list i):a)(basic-formatter-list-objects-on (index list i) list-on)" 
					"((index list i):a)(basic-formatter-list-objects-on (index list i) list-on), "
				)
			)
		)")
	)
)

(defun "basic-formatter-list-objects-on" ^("object of" "list-on") []
	(if (and list-on (notequal (length of.on) 0))
		" [On which (basic-formatter-list-objects of.on true null)]"
		""
	)
))

(defun "basic-formatter-list-links" ^("list links") []
	(strcat 
		$(map "link" links 
			"(link) "
		)
	)
)

(prop "list-objects" basic-formatter-list-objects)
(prop "list-links" basic-formatter-list-links)

And then room can use those last two properties in it's description.

(prop "description" 
*"(this:short)
(this:long)
(let ^(^("contents" (where "object" this.contents (notequal actor object))))
	(if	(equal (length contents) 0)
		("There doesn't appear to be anything here.")
		("Also here (actor.formatter.list-objects contents true true).")
	)
)
(if (equal (length (coalesce this.links ^())) 0)
		*("There are no obvious exits.")
		*("Obvious exits: (actor.formatter.list-links this.links)")
)"
)

Of course if the actor hasn't got a formatter, it breaks.

Filed under: Daily Update No Comments
24Apr/12Off

Stellar Nurse premature post mortem

First thoughts. This is the first post I've written since I updated wordpress, and, what the fuck wordpress. You're going to destroy a good piece of software.

Why is this post mortem premature? Because we aren't done with it yet. At least, I'm not. A 'post-compo' version is on the way with some gameplay tweaks and performance improvements. I'm going to keep this short for that reason, and just dive right into the lists.

What went right:

Working with an artist and a musician. I couldn't have asked for better. Participating in the jam with a team allowed me to focus entirely on what I was good at and crank out code. It didn't hurt that they are both incredible at what they do.

Using libraries I knew. Flashpunk I've used quite a bit and I can confidently dig into it and hack things. I've got a deal of experience with Box2D, so when I needed a physics library it was the logical choice (And it made for quite good physics). The last library, GUM, is a gui library that I wrote. Can't know it better than that.

Not caring about how horrible my code was. Arne delivered brilliant art; but he didn't always deliver it in a sensible layout. This isn't really the best example of this (I'll give one of those in a moment), but I could have spent a lot of time re-arranging his tiles, or I can just hack some code to deal with it. I hacked some code to deal with it. I did a good job this time avoiding the itch to make it perfect, and concentrated on just making it work. Of course, without the time pressure, I have to fix everything now!

So what went wrong? Not having a clear idea of the goal. I don't think any of us really knew how we wanted the game to play. I experimented a lot with it, but some bits of it threw me for a loop. Like detecting completed planets. The method I came up with can detect any pattern at all, but I never actually got around to doing anything interesting with it. The post-compo version will, I promise.

Ambition. I bit off way too much with the world-tile-soup. Oh sure, it looks like it works, but I poured a solid forty hours of work into it over the weekend and it still doesn't work right half the time.

Play it now at http://www.ludumdare.com/compo/ludum-dare-23/?action=rate&uid=418

Filed under: Daily Update No Comments
3Apr/12Off

World Generator

I'm releasing some SOURCE CODE for my metroidvania world generator thing.

LOOK HERE IS THE SOURCE CODE


Filed under: Daily Update No Comments
11Mar/12Off

Gum FlashPunk Demo

Hey look, this post has been updated with source. SOURCE CODE


Filed under: Daily Update 1 Comment
8Mar/12Off

Gum

One of these (incredibly simple demos) is using Flashpunk, the other is using Pixelizer. Okay, so, it's just a button ( I actually intended to duplicate the functionality in Pixelizer's equally simple GUI example as closely as possible ) but the important thing is that it's apparently identical.



Filed under: Daily Update No Comments
6Mar/12Off

How does SteelGolem manage to write everyday?

When he basically does nothing? Well, I basically did nothing, except improve the map somewhat (no demo here yet). It has panning controls and hilites the current room. I'm also displaying the whole thing, though in the final game that certainly won't be the case.

In semi-related things, I'm using Flashpunk. It looks like Flashpunk 2.0 will never happen, which is something of a shame, but my personal copy of Flashpunk continues to improve. I'm seriously considering forking the official Flashpunk distro on GitHub and rolling my improvements into it. It's nothing too big, but I'm worried that Draknek (who maintains Flashpunk now) wouldn't ever pull the changes.

I've also developed a set of simple UI components that only vaguely rely on Flashpunk, and I intend to release those if there's any interest from the Flashpunk, or Ludumdare, community. If I fork Flashpunk I'll include them in that. Actually I'll probably release them even if there is no interest, so long as I remain interested. I've written a lot of GUI component libraries in my time. One of them, Gum (I'm thinking of recycling the name) is found in almost all of my abandoned open source projects over there ->.

I'm also paying attention to a new thing called Pixelizer over at http://johanpeitz.com/ . It's a 2d game engine for Flash, focusing on a component architecture. I don't agree with some of the author's design decisions and probably won't be using it soon, but it seems to be put together well and has a promising collection of demos. I look forward to seeing where this project goes.

Filed under: Daily Update 1 Comment
4Mar/12Off

Pathfinding

Not too much to show here. Except for pathfinding.


Filed under: Daily Update No Comments
1Mar/12Off

Generating a single area

Press C to create the 'starting area'.


Filed under: Daily Update No Comments

Switch to our mobile site