Giving HaXe a Try   Leave a comment

So, now that I’ve decided to give HaXe a go, I’m going to start out targeting Flash. I’m familiar with Flash and comfortable with it. I’ll keep anything platform-specific seperate from the workings of the game in general. Then, I can write interfaces on top of the inner workings.

One thing that’ll be difficult is handling the input. When someone clicks on coloured text, a context menu should pop up. So, I’ll have to have the interface send what the user clicks on, and the game underneath come up with data to populate the context menus.

*work work work* Huh, for some reason I can’t compile a project that is in a package. No matter if I do it from FlashDevelop or by command line. I wonder why? It says I’ve got an invalid name, but that seems to only matter when it’s the package.class format. It’s like, no you can’t put package. in there! That’s invalid! That’s the way FlashDevelop tries to do it by default, though, and it seems to be the right way, so it’s perplexing as to why it’s not working.

Oh, finally, in someplace unrelated to the Object Oriented documentation, it says that package names should start with lower case letters. *test* Ahh yeah that did it. Geez.

*reads the entire HaXe Language Reference* Okay I think I’m ready to actually program something with this.

Now I’m getting kind of frustrated by trying to reach out in so many directions and not actually producing something I can play, so I’m going to start by making something a lot simpler. I’ll make something more like a classic room-based text game. Each room will have a description, plus a list of things in the room, and a list of exits. The exits will have a transparency flag; if they’re transparent then the player can see the next room without going there. I’ll just make it one level deep so I don’t have to worry about line of sight across several rooms/exits.

*hours pass* Well hours passed where I was hanging with friends online and I forgot to post my progress, and since it’s effectively still the same day I’m going to continue with this same blog entry.

Right now I’m wondering what’s the difference between an array and a list in HaXe. It seems to suggest that the list type is a linked list, while the array is a classic array, but it’s not clear. A linked list would probably be best for abstract objects like the rooms.

*work work work* Okay I made a few data classes and some function prototypes. I’m too tired to do any more now though, so I’m going to call it a night. Maybe I’ll work some more tomorrow.

Posted April 14, 2012 by Arthur Payne in TextWorld

Tagged with , ,

Leave a Reply