Portfolio Update – Game Behaviour

Hello!

I recently put up pages for two projects from the Game Behaviour module undertaken in the final year of my BScH in Computer Games Programming at the University of Derby, which I have now fully completed and received a very pleasant classification for.

You can now head over to the pages for Crispis and DropCakes, and The Frozen Firepits of Generic Dungeon Name for information on these projects, or to download the source code and executables. The former is simply a 2D physics sandbox built upon Box2D and a custom Entity/Component engine, and probably isn’t or much interest to many. The latter, however, you may find interesting if you’re into game design, classic roguelikes, fantasy games, and such.

The Frozen Firepits of Generic Dungeon Name (TFFGDN) was an experimental game design implemented for an artificial intelligence (AI) assignment; it did well, though the AI isn’t too interesting in my opinion. It’s a fusion of turn-based, physics-based mechanics similar to Snooker or Pool, and classic fantasy dungeon-crawler games where a party of adventurers of traditional achetypes such as Warrior, Wizard, Rogue, etc. enter into a monster-infest labyrinth seeking treasure. In its current state it’s not too thrilling; I had intended to implement magic and special abilities for player characters and enemies, which I think would make things a lot more exciting, but I just didn’t have time. I also feel like the physics could be tightened up a lot to increase the pace of gameplay, but I had to do a lot of fiddling with Unity just to get it working in the first place.

Come next week or so I’ll try to have some more information up regarding my dissertation project which was an investigation into AI for Don Eskridge’s The Resistance. Then I can get onto undertaking some small personal projects while I look for work.

Advertisements

SplashDash

Ho! Another delayed post; I said I’d get to this before the semester was up, but this semester hit really hard, and I just haven’t had the time or energy for it. Well, it’s not Christmas yet, so I guess that’s something, no?

The real killer module this semester was Game Development, which consisted of a single group project with three other programmers and seven(!) 3D artists. I started to put a page together for the game we created, “SplashDash”, today; I still need to go over what I’ve written with furrowed brow and fill out the Freerunning Implementation section, but there are already download links for Windows, OSX, and Linux builds, a gameplay trailer, and lots and lots of screenshots to see!

splashdash-title-001

SplashDash is a 3D, freerunning, score attack game, drawing inspiration from games like Jet Set Radio, Tony Hawks Underground, Mirror’s Edge, and de Blob.

Robots have taken over the world and subjected it to their ideals of order and optimisation. They’ve whitewashed all the walls and broken the spirit of the human population, who now go about their daily chores like mindless drones. The player is a teenager gifted with the ability to bring colour into objects with a single touch, and must use it to paint as much of the city as possible in the given time limit to inspire a human revolution.

My main responsibility was the implementation of the player movements, including running, analogue jumps, wallruns, ledgegrabs, vertical wallruns, wallrun jumps, and wall rebounds. I also worked closely with the programmer and artist responsible for the animations to try and make sure things looked as smooth as possible, and though some animation glitches remain I’m pretty pleased with the way things turned out.

The freerunning implementation is, honestly, pretty unrefined, as I’ve never coded such complex 3D movement mechanics, nor used Unity before, and time constraints on the project meant that I could not afford a lot of research or iterate as much as I would have liked. I opted to go with a system which did not require any hints or triggers to be placed into environment, so as to minimize the workload of environment construction. Let’s just say there are a lot of raycasts and a lot of vector maths involved; you can read more about it (once I’ve written it) and my other contributions on the SplashDash page.

We’ve all learnt a lot from this project – mostly about working with Unity, its flaws, quirks, features, limitations, and best practices, but also more transferable skills. We had some communication and organisational issues (which I’ve written about at length for a post-mortem as part of the assessment, and shan’t post online yet) that I think are easily solvable once identified; some simply by picking the right tools and channels, and others by encouraging certain practices. The project was also a good insight into the importance of sorting out your methodology and workflows out early on in a group project – I feel that with time invested in the right places at the start, things would have progressed more quickly, and in a more organised fashion.

splashdash-tutorial-wallrun-002

Anyway, I think it’s pretty effective as a proof of concept – or not, as the case may be. We all agree that the movement is the most fun part, and that a linear time trial or racing mode, on maps similarly constructed to the tutorial level, would probably be more fun (especially with some nice acceleration mechanics thrown in to reward good freerunning flow). But it is quite fun, all the same, and I think the concept deserves further investigation which, if I ever find the time to experiment with a proper non block-based painting system, I might just be tempted to conduct.

Edit: P.S: Mute the game and go listen to the Jet Set Radio OST while you play :P

A Note of Intent

Aaargh.

I decided I wasn’t going to bother posting another update here until I’d settled back into uni and sunken my teeth into some fresh projects I could write about. I suddenly find myself almost two-months into the final year of my degree and I’ve been rather too busy to give it a second thought.

So here’s a note of intent: I will, sooner or later, make a proper post about this semester’s projects, before the semester is concluded, including my dissertation project, which was signed off by my supervisor last week and is now awaiting my full attention…after two more urgent deadlines. For now, I’ll just leave a brief list of what I’m currently working on:

1. An essay on the sufficiency of services provided by modern operating systems for accessing detailed information about gaming peripherals [due two weeks from now – yikes!].

2. A Unity game about parkour and painting. Think Jet Set Radio meets Mirror’s Edge meets Tony Hawks Underground. This is a team project with three other programmers from my course, and seven artists from the University of Derby’s Computer Games Modelling and Animation course [due sometime around the end of the semester].

3. For my dissertation project I am to be investigating the posibility of applying various AI techniques to the board/card game The Resistance. This may include search trees and evolutionary techniques, and I will be using the competition framework and bots provided by AiGameDev.com last year.

These are the things I’ll be posting about and/or creating new pages for here when I get chance. All the other stuff I do I’ll likely post about elsewhere if I even have the time to continue doing things other than eat, sleep, and code.

I cook some nowadays, and bake a little; I still study Korean, and I’m trying to snatch back the graphic design and art skills I used to have. But I’d like to keep this blog focussed more on programming, and the larger projects I undertake.

MARS MIPS Simulator Lockup Hackfix

If you are attempting to use Missouri State University’s rather excellent MIPS Simulator and IDE, MARS, to develop an application which uses the bundled Keyboard and Display Simulator (though it seems  unlikely that you would be doing so seriously today), you may encounter a sporadic bug where the entire MARS application will lock-up, and you have to end-task it.

I personally encountered this while attempting to make a simple Snake clone just over a year ago, during the Console Development 1 module of my (WIP) BScH Computer Games Programming degree and the University of Derby. At that time me and a friend tore open the MARS .jar in order to probe for the cause of this, and were actually able to implement a little work around. Since posting about this project here and putting a video demonstration up on YouTube, I have been asked several times about how we were able to do this, and rather than repeatedly send out links to the email I originally sent to Ken Vollmar, I thought it might be nice to have a decent guide I can direct people to.

Note that the below instructions cover a quick ‘n’ dirty fix, which may introduce other errors (though I haven’t noticed any). This is why I have elected not to just hand out a new .jar, though I could happily do so under the MIT License. I didn’t then have the know-how to properly dig into the problem, and since lengthly debugging of broken applications is my full-time job right now, I’d rather not do so in my free time.

What You Will Need
Java Tools – Likely an IDE like Eclipse
Archiving Tools – 7Zip or a similar application for looking into the .jars
A copy of MARS.jar

Instructions
I’m going to assume you’re using Eclipse, because that’s all I know, so you may have to dig for some of the options if you’re using something else. I will assume you may never have encountered Eclipse or Java before though. Java is a lot like C#, but Eclipse is a bit different from Visual Studio. If you’re better at Java than me, do please let me know where I’ve done things the hard way round, and feel free skip the easy sections.

As another heads-up, I’m also using Windows, so this experience may be rather different for anyone hailing from the OSX or Linux world (I’m told that the creation of an executable .jar on Linux is free from some of the woes I encountered).

Project Setup
Firstly, create a new folder, open up Eclipse and select this folder as your workspace. I called mine ‘Mars_4_1_Mod’. You then need to create a new project in this workspace (File->New->Java Project). Name your project, and hit ‘Finish’. Note that my JRE is set to JavaSE1-1.7. This setting may be important – I’m not overly familiar with it myself.

Now right-click on the project in the Package Explorer, and select ‘Import’. You want to import the contents of MARS.jar to the project, so select General->Archive File from the dialog, browse to your copy of MARS, and hit ‘Finish. Your Package Explorer should now look something like this.

MARS_01

Finally, you need to make sure that Eclipse can find the source code in the project. To do this, right-click on your project and select ‘Properties’. Go to Java Build Path->Source, click ‘Add Folder’ and select your project root. You can fiddle with exclusions and stuff if you want, but I preferred the shotgun approach for what it’s worth.

The Fix
You should now be able to build and run the project (Run->Run As…->Java Application, select ‘Mars’ and hit ‘OK’). Mars should run normally and freeze as expected. Alternatively, if you run it via Run->Debug As…->Java Application then you will be able to suspend the application from Eclipse when it locks up, and then investigate the lock-up state for yourself from the Debug perspective.

Great, now go to ‘Navigate->Open Type…’ and use it to find your way to KeyboardAndDisplaySimulator.java. Navigate to line 210. It should look like this:

updateMMIOControl(RECEIVER_CONTROL, readyBitCleared(RECEIVER_CONTROL));

This is our culprit – a threading issue, a deadlock caused by this function call and another from AbstractMarsToolAndApplication.java. To implement the workaround as I have, you simply need to replace this line with the following:

//-------------------------------------------------------------------------------------
//This call caused a deadlock sometimes when using the keyboard and display simulator.
//The syncronized block below simply plucks out the necessary call from
//updateMMIOControlAndData, which is where this call would take us in the end.
//-------------------------------------------------------------------------------------
//updateMMIOControl(RECEIVER_CONTROL, readyBitCleared(RECEIVER_CONTROL));
//-------------------------------------------------------------------------------------
synchronized (Globals.memoryAndRegistersLock) {
   try {
      Globals.memory.setRawWord(RECEIVER_CONTROL, 0);
   } catch (AddressErrorException e) {
      e.printStackTrace();
   }
}
//-------------------------------------------------------------------------------------

Now if you run Mars through either Run or Debug you should find that the freeze-up never happens. Feel free to poke around if you want to know more about the original issue – but if you’re just trying to work with Mars for a personal project, this should be good enough.

Bonus
If you’re a student working on a project for your studies you may wish to provide your marking tutor with a copy of your modified MARS application alongside your assembly program. Now, after much pain I DO have a working .jar of this, and I will detail it’s creation beneath in case you run into difficulties as well, though it’s probably stupid because I’m not experienced enough with Java to know what exactly prevented me from doing it the normal way.

In the beginning it seems there are two options – you can export a Runnable .jar from Eclipse (File->Export->Java->Runnable JAR File – make sure to select ‘Package required libraries into generated JAR, ignore the warnings), or you can try running the script, ‘CreateMarsJar.bat’ which should be in the root of your project.

For me at least, the script somehow creates a .jar with the same bug as the original, and the exported ‘Runnable’ .jar…won’t run. The way around this is to make a copy of the original Mars.jar, open both it and your Eclipse-exported jar using 7Zip or a similar application, and copy the ‘mars’ folder (contains the compiled .class files) from your version into the copy of the original, replacing it’s own.Delete your exported jar and run the copy of the original – it should now perform as well as the version you launch from Eclipse.

Thanks and Stuff
Thanks go to my friend Bombpersons, without whom I might not originally have bothered to look into this issue. If you have any further information on this issue, any corrections to the information provided here, or struggles in doing this yourself, please do get in touch.

Another Self Indugant Status Update

Just checking in, lest this period of inactivity so soon after declaring my productive intentions fall under scrutiny at some point in the future. Everything went a bit pear-shaped this week, as things do when you arrive home one Friday after work to find water intruding through your ceiling from the unoccupied flat above, it takes three days to get their mains shut off and then you’re left with a gaping uninsulated hole in your ceiling.

This weekend I’m catching up on the relaxation I was deprived of last, and getting some admin chores out of the way such as maintaining my monthly internship journal for my university course, resurrecting my long dormant Lang-8 account, updating my short and long term to-do lists, and posting this.

Whatever this is.

Hopefully next weekend or in the afternoons of the coming week I’ll actually get my ceiling fixed and start pulling my mind back into a useful state. I’ll likely post again tomorrow or next weekend about my intentions for the rest of my time here – I want to finally get a grip on the priority balancing issues that have plagued me since I moved to London.

It snowed yesterday and I would have considered a chilly walk along the Thames early today  had it not all been made all sloppy and yuck by the morning rains. That would have been the perfect opportunity to get my shit together.

Anyway, here’s a photograph of King George’s Park I took yesterday on my phone.Ciao.

Image

year 2013 {

So I’ve been down in London for about five months now, and it’s been about that long since I last posted here. The reason for that is because I honestly haven’t a lot to show for that time; work takes up the majority of my waking hours, and frankly after staring at alien code for so long every weekday it’s hard to conjure up the motivation to do the same in my free time, putting pay to what has been my primary hobby for the last four or so years. All in all I’ve felt a bit overwhelmed  so far, something I hope to cope better with in this new year.

Being in London I have taken the opportunity to go about and see a few of the sites, though I’m being rather careful with my finances at the moment because London rent is insane. I’ve been over to Camden, Shoreditch, Wimbledon town, and have walked along the Thames on multiple occasions, most notably when I went over to the Waterloo region of it for the Mayor’s Thames Festival. I have some nice photographs of these things which I may append to this post, or put up elsewhere, but being in London has been generally uneventful so far.

Back at the flat I have managed to push ahead with a few of my interests. I’ve written a lot more Lang-8 entries in my time here, and gotten a lot more Korean grammar points into my skull, but the few opportunities to speak to Korean people and consume Korean media have shown that my chief obstacles are still listening and vocabulary. I’ve not progressed with drawing and digital art as much as I’d like, though doodling at work during compiles and loading, and a weekly ‘contest’ of sorts with a friend have helped to improve my confidence and get me settled into my tablet.

I have done some programming, mostly in the form of the two (failed) Ludum Dare attempts I’ve made – both times setting my aims too high and giving in shortly before the deadline, but the majority of my programming experience over the last five months has been simply building on my knowledge of compiler, linker, and platform discrepancies through tedious debugging work at the office. I’ve also dealt with a few scripting languages including bash, zsh and perl, and had the ‘opportunity’ to get to grips with Mac UI development with the Cocoa API.

I’ll finish up this long and uninteresting post with links to my Ludum Dare-attempt postmortems, and a few photographs I’ve taken around London. Best of luck for 2013 – whoever you are.

Links
Ludum Dare 24
Ludum Dare 25

Shinies

연희당 팔산대 (Yeonheedan Palsandae) at the Mayor's Thames Festival 2012

연희당 팔산대 (Yeonheedan Palsandae) at the Mayor’s Thames Festival 2012

Building adornment near Waterloo station

Building adornment near Waterloo station

Stables market in Camden

Stables market in Camden

Camden Lock

Camden Lock

Accidental couple shot at the Mayor's Thames Festival 2012

Accidental couple shot at the Mayor’s Thames Festival 2012

London Posting

So a couple of months ago I made this post about what I planned to do with my summer. Well, summer was shorter and busier than I thought it might be, so my best laid plans kind of fell to pieces. I don’t mind of course – I found a decent placement for the year after all – but the chaos that’s dominated the last month or so has left me kind of disorientated.

So where do I stand? I’m in London now, working full-time for a company named ‘Feral Interactive‘, and have just come off of a three-week stint without internet, during which I’ve walked too many miles, watched too many TV series, and played too much Ys. Before that, and before all of the effort that went into arranging the move, I did manage to get through those WebGL tutorials, read a good deal of the Python documentation, and dig through the internet in search of information about network programming for games (without much luck). Mostly though, I just studied Korean and house-hunted. I also bought a small graphics tablet – a Wacom Bamboo Pen and Touch – but I’ve had no time to look into digital art, so I’ve barely gotten used to controlling the thing.

The apartment I have here is small, but nice. It’s essentially two rooms with an entrance down a back-alley – what would be the kitchen-bathroom extension on a terraced. I don’t really spend much time here, what with my working hours, but what I do spend here is comfortable. Once I’m settled I want to get to work on the things that got put off this summer. I’m four chapters in on this maths book, but I’ve yet to get around to doing any OpenGL programming and still haven’t regained any confidence in drawing. To be honest I’ve also considered just taking advantage of the Korean presence down here in London – making language study my extra-curricular priority for the year. Work is tiring, life is complicated. Time will tell.

Right now, I’m watching 원스 어폰 어 타임 임 생초리 (Once Upon a Time in Saengchori). Next? Maybe I’ll hammer out another chapter of this maths book.

Something smells good. I think I live next door to a takeaway.