Distributed Music Player

Leave a comment

Well last Monday, was the last day for the game jam for the Game Development Club, I had hoped to finish off one of my entries but things took a detour instead. I had gone into university to submit my preferences for working as a prac supervisor/demonstrator. I was initially up in Innova 21 (the new building on campus). Waiting for Wilson to finish with his meeting as he recently got back from China, so there was some catch-up about how that was, and then we met with Lennie for lunch and more about Wilson’s adventures in China was discussed. Now the detour happened when after lunch we ended up in the Computer Graphics lab, as Lennie was working on improving his Distributed Music Player that he first wrote in 2007.

The problem was he was discussion the program and I decided to contribute to explain how I would do it and what he should do however, he turned around and suggested I look at it/ do it. So pretty much for the last three days that is what I have been doing. The work I did was created a new python class that was responsible for holding a number of clients,  able to load the ip list, and able to perform the play, stop and loadFile command on all the clients. I then started using multiprocessing library in Python 2.6 and later to do multi threading however slight problem with that as it uses pickle (serialisation) and network sockets do not like serialisation so rather then try to find a way to get that working decided to just use the threading library which is available in 2.5. Long story short I now have python 2.5 (what i had originally), python 2.6 and python 2.7.

 

That night I wasted most the night learning how to use Glade and PyGTK, at the end of the night I eventually had a basic GUI up and running as seen below. Glade is a Visual editor for creating user interfaces for GTK. and GTK is a user interface API/ library. However in hindsight I could of ported the existing Client and Host classes to C# and then developed the interface in Visual Studio in about an hour. However on the plus side I did learn a new tool, which could help in the future.

dmpcc2

Day two, I went into uni again, hooked up a slider to be the volume bar, and rehauled the interface to have a toolbar and status bar, and moved the buttons to the status bar, introduced a context menu for right clicking on clients, didn’t get that working, had issues passing what client was ‘selected. Added the loading orchrestra files since I didn’t want to make a dialog that had a list of items to select, and this way it was now playable. That night, I added a menubar and an about screen, and disconnect button.

dmpgoing

Day three, added the logout button to the menu and created a “question” dialog, which is a dialog that has a "Message or Question”, and an Text Entry area so you can enter. This was then hooked up as the “Connect to a client”, dialog when you right click on the client area somewhere there is not a client. Added Solo and Mute support before going to bed, I was only planning on adding it to the gui and the templates however I started writing comments for the steps to implement solo and mute but i ended up doing the code instead. I actually touched the java code for the node to perform a little cleanup, I removed some unused methods, and variables and changed all the fields to private followed by running a reformatter over the code but only indentation was changed .

 

Hopefully I will post a follow up later to night.

Latin Invaders

Leave a comment

I present you Latin Invaders. This was for the Adelaide University Game Development Club – Third Game Jam in 2010.
It took about an hour to adapt the existing code base I had from Space Invaders to fit the theme "Every Letter of the Alphabet"

Story
The Latin character sets from the planeta Marineris.
You are the last line of defence and must shoot them out of the sky.

Theme Usage
I choose instead of using the theme in a subliminal manner to go for the superliminal manner (superliminal is a word from the Simpsons)

How to Play
Left Arrow Key – Moves Left
Right Arrow Key – Moves Right
Space Bar – Fires

Download
I will post a download to the source and Window Binary at a later time.

 

Development

The first step I took was in the InitGame function where it loads the graphics for the Invaders, arrays of SDL_Surfaces were setup to hold the sprites for the Invaders, and setup a for loop to populate this, then changed the existing loading to instead just refer to the some sprites in this array for testing to ensure it rendered correctly. There were 3 structures one for the top set, one for the middle set and one bottom set, which held onto the frames for the particular type of invaders (since there are 3 types). Upon simply commented out or deleting it showed all the use cases. I realised that I could improve the system, I had originally had 2 arrays one for frame 1 and one for frame 2, then I simplified it to be vaderFrames[2][26] but upon realising the structure mentioned earlier took an array of SDL_Surfaces which are the frames so changed it to do vaderFrames[26][2] this allows  it to just go theFramesForVaderZ = invaderFrame[25];. The structure was removed and the code was simplified so each Vader Instance (which has weather its alive or dead), also held a pointer to the frames, which is what the theFramesForVaderZ really is its more invader[25].frames = invaderFrame[25]. That was it, just  fixed hte rendering code to use the new array. The next step was to replace the loading of the player and bonus ship graphics with text instead for added effect.

Cleanup on the data files were performance to removed the unused graphics, since the Bonus ship, invaders and the player graphics were now text based.

Since I had done all my development so far on Microsoft Windows with Visual Studio, I decided to boot up Canonical Ubuntu in Oracle VirtualBox, and quickly found there were a few problems with the Makefile, the first being it always produced SpaceInvaders.exe, so split this into two parts TARGET and EXT (these are variables), the TARGET would be latininvaders and on Windows_NT the EXT would be .exe. The next problem was the run target, on windows launching it with Release\latininvaders.exe is fine but on Linux it should be ./Release/latininvaders so added the RUN command to the if def and yes it uses TARGET and EXT variables.

I was planning on changing the background image with one generated from text but lost motivation and just wanted to get this little project completed. I then ran Radical Image Optimization Tool over certain images to make them smaller. It was quite successfully reduced entire size of all the images and the font to be half the file size of the background image original was. Very nice tool, that I recommend as it features a preview which you can zoom in so you can see the pixels closer to see the differences.

Pangrams Game Idea

Leave a comment

This is an idea I had the night of the Adelaide Unviersity Game Development Club Third GameJam started or possibly the day after. I however had no focus to actually getting around to coding it and since there is also requires art work to match the game play neither the time to waste on trying to draw the stuff my self or finding external resources (I had considered clipart but anyway).

Have not thought of a proper name for the game yet so I have titled it Pangrams.

Enviroment
The game play style is point and click style, you click on the scene to move the character around, you can also click on actions such as “Use” or “Pick Up” and have an inventory. The objective is to collect different objects or perform different actions in a “scene” to complete it. The idea was to have about 4-5 scenes maybe more depending on time and available art work. There would be multiple entry and exit points to the scene.

Theme
The theme comes from that the levels/scenes are constructed from Pangrams, which for those not up to date on bizarre words are “are sentences using every letter of the alphabet at least once. ”

Game Play Example
The first would be depict the most widely known pangram. “The quick brown fox jumps over the lazy dog.” , so there is a Dog lying lets say on a bridge and so you the fox can’t bet past, to leave the right hand side of the screen to go to the next level. You have no current way to get past him so you leave to the left to go to another scene. This scene would be Jackdaws love my big sphinx of quartz. So you have to take a Jackdaws (bird) to a sphinx made out of quartz, upon doing this you get a pogostick (this was Shrubber’s idea). Now you return to the original scene and can jump over the dog with the pogostick.
Ideally here for simplicity the player would not always be a fox, so possibly when apporitate (need a new main character) the player transformers into the another… Maybe this is a artifical reality game, and they change avatar.

List of possible appropriate pangrams:

  • The jay, pig, fox, zebra, and my wolves quack!
  • Wolf zombies quickly spot the jinxed grave
  • Waxy and quivering, jocks fumble pizza.
  • Vamp fox held quartz duck just by wing.
  • How quickly daft jumping zebras vex.
  • The lazy major was fixing Cupid’s broken quiver.

Ideally game play is a whole lot more adventure like if you don’t realise what the panagrams are. The idea was once you compelte one it would flash up with the pangram on the screen.

Sorry, I did implementation this game.