Thursday, 10 December 2015

Ludum Dare 34

There is going to be another Ludum Dare this weekend and I'll be taking part, profile here.

The final round of theme voting has begun, pretty happy with the themes that have proved popular;
Growing, Colony, Four Elements, Unexplored etc. are all my kind of jam :D

Will be posting progress updates onto my Ludum Dare profile and will post the completed project here once its over.

Thursday, 19 November 2015

Seeded Map Generation

Seeded Map Generation

Been messing around with various hobby projects. The latest one, a Seeded Map Generator, I'm overjoyed to have implemented. There are a whole wealth of ideas I want to try out with this :D
One sentence summary: I can use this code to produce nice looking random maps of varying levels of detail with each map produced being connected to a fixed seed value, if you know the seed you can recreate the entire map!

A quick explanation of the techniques involved and an interactive demo are below the fold...

Sunday, 25 October 2015

Cellular Automata Sim v0.2

Been too long since I last posted an update here. Progress on the user interface for the Cellular Automata Sim has been fantastic :D Been a whole lot of fun to prototype the layout and then implement it in code. It now does so many neat things I feel a UI should be capable of; zooming, panning, fit to screen. Hell I even got a fullscreen button in there.

Tuesday, 13 October 2015

Javascript Cellular Automata Editor

After spending time learning to save and load text then images I have now moved onto creating save files for more complex objects. This program allows you to create schematics for a kind of Cellular Automata which follows rules similar to logic gates. The rules are a mix of the Von Neumann cellular automata I was experimenting with previously and some of the thoughts I had after playing the excellent Infinifactory.

Sorry that the program is light on instructions, you can select tools from the top menu:

Thursday, 8 October 2015

Prototype Character Generator

Character Generator Been chatting to a friend of mine about procedural content generation in games, got to talking about creating characters in such a manner for Dungeons and Dragons. The idea would be to play the role of the leader of an adventuring guild sending parties of random adventurers into similarly random dungeons :)

I do so enjoy creating procedural programs so I said I'd be happy to help out. We'll probably explore this idea in a pen and paper format but I went and coded a prototype of a browser-based character generator. The results are very simplistic but its oddly compelling to see what the program will produce.

If you come across an amusing combination do let me know!

DnD Character Generator (prototype)

Friday, 11 September 2015

Javascript Image Editor

Javascript Image Editor This is a natural continuation of that code for a text editor running in Javascript. I switched the save, load code to expect images and have now got a proof-of-concept image editor running! Like the last experiment use the buttons to open an image file and then save it. The mouse can be used to crudely paint onto the image :P

Javascript Image Editor

Image :

HTML5 canvas goes here

Save As :

Tuesday, 8 September 2015

Some fun in WebGL

Been experimenting with OpenGL in the form of WebGL, it only makes sense after upgrading from basic 2D graphics to rotatable sprites in the last Ludum Dare that I would now make the important step to full 3D :P

Thursday, 3 September 2015

Ludum Dare 33: Swarmlord!

Its been two weeks since the competition and I didn't post my completed game here. Still need to work on getting things done promptly clearly :/

As for the contest itself it went really well and I was able to submit a team effort this time!

The entry is a real time strategy game where you play as a space monster. Looks like my last post here the embed link still works but the game is displayed at a much nicer size on the Ludum Dare entry page (linked through the banner)

I also documented the whole development process on the website which can be seen by checking my profile on the site: link

Saturday, 22 August 2015

Ludum Dare 33

A new ludum dare has begun and I'm taking part again :D

Been looking at how to have programs hosted through google drive and then embedded onto webpages. Experimenting with that below:

Awesome, it just works! :D Source code for what I end up making will be on Github like last time:

Saturday, 8 August 2015

Javascript Text Editor

Many of my coding project have been Javascript based for the simple fact that nothing is better for click and play function and ease of source code sharing. One thing it lacks though is easy file read/write access. This is for the extremely sensible reason of not allowing any arbitrary script edit the contents of your hard-drive when you load a page, that would be chaos!

Files can be saved and loaded by the user though so with significant help from the example script on the blog This Could Be Better I've made a proof-of-concept file loader and editor. This opens up all kinds of exciting prospects for projects which are more than little toys. There are several things I experimented with in Java which would benefit from such functionality if ported to Javascript. :D

Javascript Text Editor
File : Save as :

I could even write code in this browser based editor :3

Saturday, 4 July 2015

blah I really need to post something

proper blog post goes here later...

I guess I've been looking into circuit design after having fun with Infinifactory as of late. Might end up coding a logic simulator/ cellular automata thing?

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.