Archive

Archive for the ‘Information’ Category

3D Games and Virtual Reality

January 31, 2015 Leave a comment

Over the past year I’ve been concentrating mainly on improving my skills in HTML5 / Javascript games, and all of the games I’ve made during this time have been 2D. This year I’d like to improve my skills in 3D games and learn some new tools, so that will be my New Year resolution for 2015. I’ve been looking at the most popular tools for creating games on One Game A Month and it seems like Unity is the leader.

With this in mind I set out to make a prototype using Unity and managed to achieve this in around 4 hours thanks to some great tutorials on Youtube. I also managed to convert the game to work with Google Cardboard, the low cost Virtual Reality headset.

My prototype is a simple landscape with a couple of walls, a first person view (with two cameras to create the VR effect), and it is controllable with a gamepad. I’ve packaged it for Android and you can download and install the package from the link below (remember to enable ‘other sources’ on your Android device). I’ve only tested it on my Samsung Galaxy Nexus with an Xbox Controller and also an Ipega PG 9017 bluetooth game controller. If you don’t have a controller to connect to your Android device, then you can still download the app, but all you’ll be able to do is look around and not move.

Download the game (Android package)

Advertisements

Testing the Oculus Rift

November 20, 2014 1 comment
Me playing Microsoft Flight Simulator with the Oculus Rift

Me playing Microsoft Flight Simulator with the Oculus Rift

My college department purchased an Oculus Rift Virtual Reality headset recently and we are currently investigating how it can be used in our classes. Clearly it has use in video games, and there is quite a large range of games that support it.

Getting to grips with the system was clearly going to take some time, so I took the system home for the weekend. I left it for my teenage son to configure and after several hours of trying different settings he managed to get it working with a tech demo 3D scene. Later he managed to configure it to work with Minecraft, and after a long time spent in some online forums, got it working with Microsoft Flight Simulator.

The initial reaction from people is that it is ‘amazing’. Most people audibly gasp as they move around a virtual reality scene, and that was the reaction we had from most of the students who tried out the Oculus.

My son spent a long time figuring out how to configure it, trying different settings and messing with display settings on the computer. When I eventually tried setting it up on my own PC I managed to get it working within 20 minutes, mainly because I documented the settings I tried and took a methodical approach. I think different computers will have different setting requirements – display modes, resolutions, etc, so it is clear why Oculus Rift is still a ‘Development Kit’. It’s just not ready for the casual user who would want to plug and play. That said, there are many tech demos, games, ‘experiences’ and educational apps available for the Rift that showcase some of the possibilities of the technology.

Personally I want to be able to create content that uses the headset, and particularly educational content rather than games. Unreal Development Kit has support for Oculus Rift, so this is probably the tool I’m most likely to start with. It is primarily a game engine, but can be used to create simulations and educational environments. Oculus Rift might be the device that makes Virtual Reality mainstream.

The technology has been around for many years, and my first experience of VR was back in 1993 in Hong Kong. There was a Virtual Reality arcade near the ferry terminal in Kowloon that contained 2 different games, a dogfight flying simulation and a multi-player combat arena. Back then the headsets were much bulkier and heavier than the Oculus, and the graphics were much simpler (reminded me of the Dire Straits ‘Money for Nothing’ music video). The arcade was so popular that you had to have ID to gain entry and they recorded your details so you couldn’t sneak back in on the same day to have another go. I’m sure that if we offered a free go of the Oculus we’d be flooded with people wanting to try it (and we might take it along to our college open evenings to give prospective students a glimpse of the future). I’ll keep blogging about my experiences with the Oculus, so stay tuned if you have an interest in this technology.

Donald Clark demonstrating learning with the Oculus Rift:

Categories: Information Tags:

Loops game – update 2

February 6, 2014 Leave a comment

The game was lacking an ending, so it now has an ‘audience satisfaction meter’. The aim of the game is to keep the audience entertained and thrilled with stunts. If you fail to keep performing stunts and flying through the hoops the audience’s satisfaction will drop. The level is complete when the audience satisfaction meter is filled.

The meter needs a cool name, so maybe I’ll call it the ‘Thrill-o-meter’.

Screenshot of a stunt flying game

Screenshot of the stunt flying game showing the ‘thrill-o-meter’

Loops game – update 1

February 5, 2014 Leave a comment

Over the past few days I’ve continued adding features to the stunt plane, looping game.

Features added

  • wind pump – scenery object to avoid.
  • barn – scenery object to avoid, and points can be gained by flying through the barn.
  • background – parallax scrolling background.
  • smoke trail – pressing the left arrow key releases a smoke trail from the plane. I’d like this to be useful in the game, but haven’t got a definite purpose for it yet.
  • other plane – an object to avoid.
  • scoring – points are scored for going through hoops. Double points are scored for performing a loop-the-loop and passing through a hoop whilst upside down. Points can be scored for flying through the barn.
  • inertial movement – more realistic movement of the plane. The plane also tilts as it pulls up and dives.
Stunt plane game

Screenshot of the game so far

Debugging

Some problems I ran into during construction of the game.

  •  The explosion effect when the plane crashes was occurring in the wrong position when the plane was performing a loop. I fixed this by embedding the explosion object inside the aeroplane animation.
  • the smoke was appearing on the outside of the barn if activated whilst flying though the barn. This was fixed by removing the front of the barn from the display objects, drawing the smoke and then adding the front of the barn again so that it appeared on top of the smoke.
  • the barn and wind pump kept overlapping when randomly placed in the game. I added a function to check for overlaps and reassign a random position to the wind pump.

Future updates

  • I need to increase the difficulty of the game as it is quite easy to amass points without crashing. I may add more objects to avoid, such as a flock of birds and change the scoring so that you have to complete a certain number of stunts within a time limit to continue.
  • Title screen, end sequence, etc. I’ll probably create an animated start screen with the aeroplane taking off and a final screen when the game has been completed.
  • Sound effects and music. Upbeat ‘flying’ music. Engine sounds. Cow and chicken sounds as you fly through the barn.
  • Incidental / environment animations. A chicken that flies out of the barn. Clouds. People on the ground.
  • I may port the game to Android tablet, implementing on-screen controls or tilt controls to move the plane.

Play the game – UP and DOWN arrows to move. SPACE to loop.

February Game – Loops

February 2, 2014 Leave a comment

I awaited this month’s #1GAM theme with baited breath, hoping it would fit with my plans for my long term game projects, however the theme of ‘Loops’ just didn’t seem to fit at all. Brainstorming with my kids, we came up with ideas such as a ‘Tempest’ style shooter, a rollercoaster game and finally an aerobatics game.

Concept sketch of flying game

Concept sketch of flying game

Grabbing my sketchbook I scribbled down a quick idea – a side scrolling flying game where you fly through hoops to gain points, perform loop-the-loops for bonus points, whilst avoiding crashing into buildings and flocks of birds.

Next I had a quick search for existing similar games, coming across the fantastic Stunt Pilot on Miniclip. While this looked like a fun and playable game, it had a different control system from what I intended and also different challenges for the player.

Next I started a simple proof-of-concept prototype in Adobe Flash, with some block graphics. After that was working successfully I added a scrolling background and a nice clipart image of a biplane before making a screen recording of the work in progress. There’s still a lot of work to do to make this a playable game, but I’m pleased with what I’ve accomplished in such a short amount of time. Having participated in #1GAM for over a year I’ve found that the practice has made me much quicker at coding and resolving bugs – even anticipating problem areas well before coding begins. If anything, #1GAM has been an amazing workout for the mental muscles!

Here’s the result so far after only an hour of work.

January’s finds

January 23, 2014 Leave a comment

Some new tools, websites and articles you may find useful if you’re game developer or a teacher of game development:

  1. Make Pixel Art – an app to create Pixel Art, including a free online version.
  2. BFXR – online effects tool to create and alter common game sounds.
  3. King, the creator of Candy Crush Saga trademarks the word ‘Candy’.
  4. SteamBox – Valve’s gaming PC for the living room .
  5. Coding is Cool – BBC report.
Categories: Information Tags: , ,

EnchantJS – creating games with Javascript

January 20, 2014 Leave a comment

Last year I had a plan to start learning to create games with HTML and Javascript, and although I made some headway I got lost in the myriad of Javascript libraries. I tried CreateJS, which is free and good, but I felt it was a little complicated for teaching to my class, and I also looked at ImpactJS, which ended up being too expensive. I tried several other javascript libraries for creating games, but quickly ran into brick walls, suddenly unable to find quality tutorials or resources that were easy to understand.

Recently I discovered EnchantJS, which is described as “A simple JavaScript framework for creating games and apps”, and I am happy to report that it comes with some decent documentation that would be suitable for using with my students. Within a couple of hours I was able to implement some basic game elements with EnchantJS – sound, animation and input controls and finally felt as though I was getting somewhere with creating Javascript games. A bit more work is required to get a fully functioning game, but the tutorials and documentation I’ve discovered so far have been very good and have included excellent explanations (or at least better than for other Javascript libraries I’ve encountered).

For those of you interested in following this up, here are some of the resources I’ve found so far:

EnchantJS – download EnchantJS here. Also includes a starter tutorial that explains most of the basics very well.

Penguin Dive Tutorial – a step-by-step tutorial on making a complete game, with good explanations along the way.

CodeLeap – online tutorials on creating apps with EnchantJS. It’s in Japanese, so you may need to use Google Chrome to translate it to English. It has a browser based code editor that allows you to test your code right away.

Crash Course – created by Cal Poly, this course uses CodeLeap and takes you through the creation of a simple game.

Video tutorials – some video introductions to using EnchantJS.

Video showcasing some of EnchantJS features including OpenGL and 3D.

Slideshare on animation with EnchantJS.

Introductory tutorial (Japanese) covers the creation of maps. Google Translate does a good enough translation!