Friday, 29 May 2015

Ludum Dare Retrospective

Ludum Dare 32 ended on the 17th of April. I did compete and coded up a storm over the weekend. It was a huge amount of fun and I am very glad to have taken part. I haven't been doing much programming recently; stress and anxiety making me dysfunctional. And it slipped my mind to post a link to my entry here.

A little god game called Nature's Assault:


More details are on the Ludum Dare submission page along with links to play it and see the source code.

One of my favourite parts of this event was getting to use Java to make a proper windowed program. It may be because I have spent nearly all my life using computers with Windows on them but the windowed interface with buttons and re-sizable windows will always feel nice to me :3

Happily I was able to implement proper gameplay along with the fun algorithms. It meant that people actually tried playing it. I got a lot of feedback on it and want to spend time improving it. I will now have time to do so now.

It is silly how delayed me posting this was, still its good to get something online so that I can get into good habits. Worst case scenario I'll be posting some old programming projects next Friday.

Sunday, 12 April 2015

Upcoming Ludum Dare

Having a break from being at University has been very nice, I've spent a lot of time experimenting with Java. Made quite a cool tool for designing villages which gives you a metric of how many people the built houses and farmland could support. Mouse input is very similar to how its done in Javascript. I also found out that the Java pseudo-random number generator is very easy to use. Now my terrain maps can be remade by using the same seed value :)

Created a byte-glyph alphabet as well, with 256 symbols it can encode English letters, numbers and keywords too. Got it looking like an alien text editor at the moment:


Probably going to include that as secret runes to decipher if I ever make a game with written text in it. I am almost tempted to start using it as the font for my computer's terminal. It would be a real trip to log into a computer system and see that :D

I also explored options for 3D rendering in Java, looks a bit easier than what I was doing by hand in Javascript previously, I don't think I uploaded that stuff though. 3D models would look good as an animated image so I might produce one of those soon.

What I am most excited programming-wise is the 32nd Ludum Dare programming contest happening next Friday. It happens a few times every year and I have always been interested in it. For various reasons I haven't sat down and actually taken part in it though. This time round I am much more experienced and have a pretty empty schedule. No matter what the final theme I'll find a way to bring procedural generation and simulation toys into it!

Sunday, 29 March 2015

Overcoming Introversion

I don't want to let this week go by without posting something. Last week was a reasonable exception as I was away traveling from Friday to Monday. Also sick for a while as well. I doesn't do to get back into bad habits of procrastination. I'll just have to deal with the guilt of not having something good to post this week.

I did spend time on some coding though, been looking into the Java programming language and have to grudgingly accept that it is a useful tool. Object Orientated Programming; where you treat the building blocks of a program as discrete objects fits my way of thinking about parts of a program quite well. This part is the display, the routine to update the program state goes here, this is the map data and here are the mobile units upon it. My way of writing code was a weird mix of objects and functions and I can see why purely having objects would be effective.

As far as I can tell, to make the most use of objects they should be self contained elements which handle all their own updating of state and displaying on the interface. All they should present to other parts of the code are methods of getting and setting internal, private variables. This makes the objects highly modular and enables all kinds of useful ways of using inheritance to take one kind of object with many methods and then add a few more for and extended object to implement the functionality you need. The Java swing graphical user interface library has been perfect for this.

One concept Java has been most useful to explore has been networking, by importing libraries for setting up internet connections and creating separate threads to handle different processing tasks which all need to be run at the same time you can do some fantastic things. Doing the same in C required learning the detailed structure of TCP/IP protocol and Javascript, by its nature as a web-page scripting language, is suited to communications only with the server that is hosting the page. With Java I have been able to get something up and running without having to understand exactly how it works, not how I'd do things ideally but getting something functional is much more rewarding than getting mired in implementation details.

Unsurprisingly the first idea I had for using networking was multiplayer games. It also gave me a great opportunity to play around with lots of different objects for the many parts of the code: the server that runs the game, the clients of which there can be an arbitrary number, the game objects running on the server and the representation of those objects data on the client. I was a rewarding organisation task and kept me occupied for awhile.

What I produced worked and was reasonably extensible, sadly its all in Java code so I cannot do what I really wanted to and post it here. I had hopes of setting up a Javascript client to post here but that relies on having a working server backend. I haven't worked out how to create a server so that it can be accessed from anywhere on the internet (it involves scary things with routers and port forwarding) so my motivation has sunk. What was really keeping me going was the prospect of sharing a game with friends but getting the program to that state takes a lot of work. Work that I feel guilty for not spending on other aspects of life.

I feel guilty about wasting time on these hobby projects when my life is in such a mess. Better to post something to try to gain some satisfaction from it rather than clamming up completely.

Sunday, 15 March 2015

Fixing the presentation of this Blog

One thing that has been bothering me about posting code directly onto this blog is that all the different programs don't work when all displayed at once on the main page. They all work fine when viewed singly but interfere destructively when on the same page. :(

To fix this predicament I'm going to edit the posts to put in a page break before the code and program elements. At least that will avoid the embarrassment of having broken programs on the main page!

Friday, 13 March 2015

The Best Spaceship

Is one that builds itself :)

Friday, 6 March 2015

Model of the Universe

Full disclosure; the data structure for this is wholly inspired by the source code of Orteil's nested. It is really cool and well worth checking out: Nested

Thursday, 26 February 2015

I'm not dead

Although anyone who stumbled upon this blog could be forgiven for thinking it had been abandoned that is not the case. What I have is an acute case of procrastination-itis. A condition most expressed in my hesitancy to upload content to the internet. Working out what is suitable to be publicly accessible (in theory) to absolutely anyone gives me a crisis of confidence. Hence why I only end up posting when I have an tangible piece of code to share.

That isn't to say that I have much pride in what I post! Due to my kludge of putting Javascript source code in blog entries they often break when viewed on a page all at once, only working when viewed separately. My mess of a site brings me great shame, so much so that I have stopped posting code to it as I know it will remain messy. Doing the hardwork of debugging my method of presenting programs is not an appealing task.

Because the biggest irony is that while I haven't posted code I have been busy on all kinds of little projects. Some of which I am super proud of and deserve to be given the polish to be presented here. To give a few examples
  • A terrain generator with simple climate and rainfall model which gives names to each island.
  • Von Neumann's Universal Cellular Automata in Space!
  • 3D models built from scratch in WebGL
  • Virtual builder bots who terraform their surroundings into anthill-like pyramids.
  • A goddamn scale model of the Universe
There is all this cool stuff that I am proud of but it has never made the crucial jump from my hobby programming folder to a better platform for it. This is not to mention all the interesting things I have been up to and would love to write about.

But without a clear goal of updating I have let a whole year pass without putting anything up here. It can be rather grim considering the implications of this. By limiting my interactions to offline friends only I am missing out on a whole host of opportunities to share and learn about my hobbies. It is really difficult to remain enthused about a project when I don't share it with others.

So in summary this post is simply to state that I am still alive and intend to bring new content to this blog. I'm pretty certain the internet being the way it is nobody I don't tell about this place will ever find it. I still want a place to be able to easily share projects with friends though.

I want there to be a content post up here before the end of the week.