Archive for the ‘Projects’ Category

A history of Circles

Monday, February 15th, 2010

Not too long ago I uploaded my second tech demo, Circles. Very small, very simple and was built also as a tutorial for my framework.
Circles ScreenshotBut it’s history goes back a lot further then that.

The version on my site is built in Java but originally it was built in Ruby using OpenGL. It was something small I’d knocked up in an hour called Physics Balls and built for an easy-going weekly competition called the Wednesday Workshop over at SoCoder. You can find it here.

The original Circles, on SoCoder


Overall it went down like a lead balloon. “Not much of a game” was the description given, and the consensus from most users. But that wasn’t the end!

During my time at university I’ve been very priviledged to be able to work with the Greenfoot team building example scenarios, testing and creating worksheets. The software allows you to easily build games and interactive scenarios with very little code and includes an web portal, the Greenfoot Gallery, where they can be uploaded. One of the projects I uploaded was a newer version of Physics Balls: Circles, and later it was included in a combination scenario I built: the JL235 Collection (which I thought was really cool, but people weren’t that impressed).

Some of my GreenfootGallery scenarios

Last year a book was released for Greenfoot for which I was asked if I could provide my Circles scenario. So I’m in a book, WOOT! Here is the book…

Inside this copy looked as though it had been through a washing machine


and in Chapter 10 on page 157-158, is Circles!

Circles, but my name is wrong! I never call myself 'Joe Lenton'

So is that it? Of course not! For my third year project at uni I’m building a highly concurrent framework in Erlang for which I’ve also made a version for another small tutorial…

In this version each Circle is updating in it's own seperate process

Next week, the magical Square!

isMouseDown() is bad

Tuesday, February 9th, 2010

I’m currently trying to solve a UI issue with Space Snake Galaxies. On the universe map you can bring up highscore and level info for each galaxy where you play.


When you click outside of either they dissappear.

The issue is that there are places where you can both click outside of the highscores and on a button and so both detect that a mouse click has occurred. Why can you do this? Because I’m still using the old basic way of handling controls through simple function primitives. i.e. isMouseDown, isKeyDown, getMouseX and getMouseY. i.e.

if ( getControls().isMouseDown(Controls.LEFT_MOUSE) ) {
    // do something
}

It’s crazy that indie game programmers still recommend doing this. It’s like the GOTO of controls. Dead simple and you can build anything with it, but it’s a real mess to code anything sophisticated (like good buttons!).

In GUIs you don’t do this. When I press a key an event is dispatched to the top level component. If it cannot handle the event it will pass it on to another component (and so on and so forth). This means the GUI is passive; it’s mouse and keybaord handling code is only run when an event occurres. With the basic active code above it will make a check on every frame to see if the mouse is down or not, wasting CPU time.

But there is another difference. If an event can be handled by a component then the event is removed. That sole property is almost impossible to build using basic functions like isMouseDown. You either need to permanently alter the state of the controls (so future checks on isMouseDown return false) or tie all components together globally (have a button check if any other buttons have handled mouse controls first, and if they haven’t then it will).

I think the solution will be to build a passive event system into my framework. To allow easy event based input for buttons and panels whilst keeping direct input for guns and shooting. Because sometimes all you need is isMouseDown.

BOOOO! Oracle

Friday, February 5th, 2010

Sun were giving all their products away for free and wasn’t making any money. To help out Oracle buys Sun. At first I thought this was excellent news because both companies have exceptional products, but neither have many flagship products (note flagship) that directly compete with each other. So it seems like a good mix.

This was until I received…

In short, Project Kenai is closing and taking my open source sf-library along with it. BOOOO!

So I’ve had to move the whole project across to Google Code. But it has me annoyed because Project Kenai is clearly prettier then Google Code:

However what really is quite worrying is that the JOGL project (Java OpenGL bindings) will also be closing along with Project Kenai and there are no plans to move it back to it’s old home java.net or to anywhere new (but there are some custom branches around on github). But it annoys me as yet another example of how Java, a very mature and successful language, is failing to capture the desktop market. I did a blog post a month or two ago mentioning WebGL which will allow you to do 3D in the browser, yet you’ve been able to do it for years with Java. It’s crazy it doesn’t get more support for this kind of thing from Sun,.. sorry, Oracle.

BOOOOOO!

What am I working on? SSG!

Sunday, January 31st, 2010

It’s been a while since I’ve added some proper content to the site, so what have I been up to? Well mainly…

It’s a full complete remake of SpaceSnake. For a while I’ve wanted to do two things for my next project. First make a complete game, not another small 1 level title, and second base it on one of my existing games. SpaceSnake is easily the most popular game on my site. It’s also the only one of my games where someone other then me has blogged about it! Making it the obvious choice.

It’ll have multiple levels placed in a large universe map that you play across. On each level there will be achievements to complete in order to unlock the later levels for building a sense of progression and development. The levels will also get consistently harder as you go through to push your snake skills to the limit.

SSG universe map

an early shot of the universe map


SSG universe map 2

previewing a level on the universe map

When finished I am planning to try and get it released onto the (still quite recent) JavaStore. It might not be Steam or the Apple Store, but having a full game finished and published will give me more credability and gain experience I can use for the next title. In many ways it’s like I’m building my first game again because it needs to meet a standard at of completeness that is far higher then any other game I have built.

SSG 'My Plumbing' level screenshot

levels now overlap across the sides of the screen


There is still lots to do, so I’d better get back to work!

Concurrency links

Monday, November 2nd, 2009

Currently I am in my fourth year at university, and for that year I am building a highly concurrent game framework in Erlang as my final year project. It’s a nice language that can potentially handle millions of processes, but in practice only 10’s of thousands on a standard home PC. I’m aiming to try to see if you can easily split a game up into thousands of parts that will automatically scale with the number of CPUs your using.

But this post is not about my project. Whilst doing some background research online I’ve found several nice articles and slides about concurrency in games. Here is a compiled list of my favourites:

Background

Game Benchmarks : Part 2: How Many CPU Cores Do You Need
This is the game benchmarks page from a Tom’s Hardware Guide article on how many cores you need to run apps and games. On average 4 cores only give a 0.6% increase (for games) over 3! So concurrency is clearly a problem, today.

Gamasutra Features : Multithreaded Game Engine Architectures
Three concurrent alternatives to the common game loop. I’m personally building the third architecture for my framework.

Info

Designing the Framework of a Parallel Game Engine
An article by a developer at Intel who has designed a highly concurrent game framework. A long but interesting read on how he has achieved it, and probably the best link on this page.

id Tech 5 Challenges, from Texture Virtualization to Massive Parallelization
These are some Id Software slides about some of the technologies they have built behind their upcomming game Rage. As a part of it they have built a Job based concurrency model where all of the games tasks are split into generic Jobs. At the same time they have a thread pool taking the Jobs and running them.

Tim Sweeney Slides

For those who don’t know, Tim Sweeney is one of the founders of Epic Games and worked on the Unreal engine. As someone who works on one of the most popular engines used for games, these slides are a great insight into what we should be seeing in the not-so distant future.

The next mainstream programming language
Some of this is about concurrency, however a large portion are also ideas on how functional languages could increase the code quality of games and game middle wear if used over current languages.

The end of the GPU roadmap
Very interesting set of slides on how the work inside games will (in Tim Sweeney’s eyes) be split up and parallelised in the futrue, and some of the potential speed ups from doing this. I like how the main emphasis is about underlying technologies that will do this for developers, leaving us to just handle building the games.

Valve

GDC 2007, Valve making Source multi-core
This is a more low-level set of slides on concurrency additions to Valve’s Source engine in 2007. It mainly covers a few key points about the importance of lock-free algorithms.

Multi-Threaded Challenges in the Game Space, a Conversation with Tom Leonard of Valve Fame
An interview discussing the ideas and issus behind the Source engines concurrency support. It mainly goes into why they have chosen to implement their libraries themselves rather then re-using existing libraries.

The SF Library

Sunday, October 4th, 2009

Today I uploaded the first technical demo for StudioFortress, Twilight. It’s a small implementation of a the Boids artificial life environment, and it’s also the first public demo that uses the latest version of my new library. The SF library.

I’ve been slowly building it over the last year and an early version is used for first 5 games on StudioFortress, but this version is built with the aim of distributing it soon. There is a big difference between building something for personal use and building it to production level. When released it’s going to be hosted as an open-source project on Project Kenai with my technical demos as examples. Others can then use and contribute to the library as they see fit.

There are however lots and lots of free game libraries for graphics and middle wear out there, so how does mine differ? First it’s aimed solely at rapid development for small 2d games. Second is that I found it quite difficult to find game libraries that did more then just graphics plus a few utility classes. There are some out there for Java, but they don’t quite do it how I want it. It’s more of a framework then a library designed to give you a structure you can use for all of your games.

More information will be released later closer to when it’s uploaded.

Incomming!

Saturday, August 29th, 2009

Over at 2BeeGames.com they are running their 2nd Indie Game Development competition, which I am planning to enter. A quick look at the entries in their first competition and you can see the standard is very high, so I don’t expect to be coming very high up. But I do intend to make my most complete, fun and advanced game yet.

So what am I planning to build? Like the rest of my games so far it’ll be another clone, this time it’s based on Missile Command. The difference I’m making is to make it more of a shoot-em-up with different types of weapons to use and enemies to destroy. I’ve settled on a few but unique weapons;

weapons

and some enemies:

enemies

Although there are three types of missiles they all work completely differently. For example the smart missiles target the remaining people on the ground and travel horizontally to avoid bullets. The trident missile explodes into a spray of miniature missiles before impact.

So far the whole game is comming along nicely. The game mechanics, levels, graphics and background are all built. The only big job left is sound which requires rewriting all my sound library code. Currently all sound and music must be fully downloaded with the game before it can be played, which is bad for one that will be running in the browser. Instead I want the music to be streamed in real-time which will allow a much faster start up time.

Joe.