Archive for the ‘Screenshots / Videos’ Category

Don’t Feed the Trolls available on Xbox Live Indie Games!

Friday, September 23rd, 2011

I am proud to tell you that my last game Don’t Feed the Trolls is now live on the XBLIG market. Here is the trailer:

Please download the game on the marketplace and tell me what you think about it!

As usual, I’ll post sales figures in a few weeks/months for the curious.

Have fun slapping trolls!

Never released game design and prototype #2 : DJ Machine

Friday, April 29th, 2011

This is the second post of the series, you can read the introduction of the series in the first post.

Project 13

I will talk about a prototype called “DJ Machine” (Project 13), that I started while Spring Up Harmony (PC X360) was being approved for Xbox Live Indie Games. I was looking for something fun and that could only be done with XNA. I was playing DJ Hero at that time and logically started to create a simple program playing with the turntable (see image below). Nick Gravelyn already did some research on it and this information was very useful to get something working very quickly.
dj-hero-turntable

I didn’t want to make a clone of DJ Hero because I could not afford licensing many interesting songs and don’t want to compete with the AAA guys. After a few crazy ideas, I finally came up with the idea of manipulating a machine using the turntable. Each part of the turntable (scratch, buttons, euphoria, fx dial) activates/moves a section of the machine. Some of the inspiration came from a very old game called Night Shift where the player controls a worker that must take care of a machine and quickly becomes overwhelmed by the amount of elements requiring attention.

Screenshots and Video of DJ Machine

Here are a screenshot and a gameplay video of my prototype:

dj_machine_last_version

I removed the sounds in the video as I do not own the rights to some of them:

I suppose this requires some explanation. Refer to the image of the turntable while I explain the gameplay for those not familiar with the controller. The player is supposed to build objects using the “DJ Machine”. Of course, it’s still very abstract because of the programmer art.

  • Square items are coming from the left on the gray path. They stop at the first black square. Here, the player has to scratch with the corresponding button and direction (for example, blue scratch up, green scratch down). There are between one and three scratches to do per item.
  • When all the scratches for an item are done, the item moves to the next black square on the top right. Here, the player must spin the knob as fast as possible.
  • The item is then transformed in a shape (yellow circle, blue star or red octagon) that falls down the screen.
  • The player then controls the dark red claw with the cross fader (if the cross fader is on the left, the claw moves to the left, the player must move the cross fader back to center to stop the claw).
  • The player must move the claw below the shape items on the right and use the euphoria button to close the claw (keep euphoria button down) and catch the item.
  • He then moves the item to the corresponding area on the left and drop it by releasing the euphoria button.

There is also a penalty if the player activates elements when not needed. For instance, if he scratches when there is nothing in the top left section of the machine, the machine gets stucked and can’t be used for a few seconds.
You can also see the crosses on the top left (one is red, two are white on the screenshot). They represent the errors made by the player. After three errors, the game stops.
On the right, there is, from top to bottom the time, the score and the number of objects succesfully made. If the player drops an item when not on the proper location with the claw, the object is lost.
That’s basically it. The game was supposed to be played in short sessions where items come faster and faster.

I also planned another game mode where the player first choses between different music styles (techno, rap, funk…) and then scratches and mixes with proper sound samples on an abstract background. I named this game mode Freestyle DJ. Here is a gameplay video:

Sadly, without sound, it’s not very exciting but it is actually working pretty well. There is two short music loops that the player could mix with the cross fader, scratches play sound effects and fx dial speeds up/slows down the music.
The graphics in the background are made from Spring Up Harmony’s algorithm.

Design Document (notes)

Here is a copy of my design notes. I just translated the bits in french and added comments in blue. It’s in chronological order, it means that ideas on top have no connections with “DJ Machine” prototype and were discarded:

Byala 80 pts (a game (strange) name with a price: I think I made a mistake by pricing Spring Up Harmony at 240 pts at the beginning, so I precised very early I’d put the next one at 80 ;) )
Musical Arts (other idea : just playing music with nice backgrounds : not really a game, but gave birth to the freestyle game mode)
Platform game playable with turntable (first game idea: platform game (inspiration: Donkey Kong Country (LINK) that is playable with drums))
Playable with guitar? drums?
Original rendering : squares, blobs, glow (Inspiration: the Sony PS3 dashboard but I finally used Spring Up Harmony’s algorithm as a starting base)
Night Shift (from here, I’m going toward the design described above, citing my main inspiration)
A cube comes to a platform, after 1 to 3 scratches, it goes in step 2, after fx dial, it goes in step 3. Movement with XFader, player has to make the cube fall in the right hole with euphoria (this is the sentence that resumes it all ;) )
Show a message to the player if he’s playing with a pad.
Classic “Freestyle DJ” game mode
Choices betwee left/right handed and buttons on the left/right (same as in DJ Hero)
Different difficulty levels: Tutorial, Easy, Medium, Hard, Expert and Hardcore
Game over because of three errors or machine full if player does not play fast enough
Restrictions of the free version: Only 4 difficulty levels out of 6, DJ Machine sessions only 3 minutes long, Freestyle DJ sessions only 1 minute long.

Here is a early prototype screenshot I used to set up of the gameplay:

dj_machine_history

Why I didn’t complete it, and thoughts

I started this project mostly for fun, to try to see how was working the turntable. I hesitated to complete and release it on XBLIG. I didn’t, because:

  • The market share is very small. According to numbers (DJ Hero, DJ Hero 2 and consoles) I could find, I estimate between 1.5 and 3% of xbox players have turntables (probably many DJ Hero 2 players also own DJ Hero 1). Also, XBL Indie Games are approved by other developers and you need multiple votes by creators to get your game on XBox Live. Therefore, I would need actual XBLIG developers to have turntables (well, that’s not entirely true as the game would be playable with only a pad too, but they would not fully test the game and might not want to try it). I already had to remove french support in Spring Up Harmony because I could not find two or three french-speaking developers. I honestly think there are more developers speaking french than developers with a working DJ Hero turntable.
  • Gameplay variety is very low. People might argue that DJ Hero also have few variety, but it’s of course in the musics and leaderboards that the players find variety even if the gameplay is roughly always the same. In DJ Machine, only speed brought variety.
  • However, now that the DJ Hero series will not be completed (LINK), DJ Hero players might love to be able to use their turntables again. :)

Today, I still don’t plan to work on this prototype again, but who knows. ;)

Feel free to comment and share ideas and talk about your unfinished projects in the comments section.
You can also follow me on twitter or facebook.

Spring Up Harmony available on PC Windows!

Monday, February 21st, 2011

Finally, Spring Up Harmony is now officially available on PC Windows!

You can download it here: http://www.frozax.com/suh/blog/springupharmony_setup.exe

Have a look at the new trailer:

If you want to talk about Spring Up Harmony on your site or blog, you can download hi-res screenshots here.

Please help us getting coverage by talking about our game to your friends on facebook, twitter or in real life!

Have fun and try to get your name on the top of the online rankings!

Thanks!

Yes, multi-threading in XNA/C# can be that simple!

Wednesday, April 14th, 2010

I never really liked multi-threading, because of all the additional problems it creates: synchronization, deadlocks, concurrent access to memory… But with my recent experience with multi-threading in XNA/C#, you can really do simple and efficient optimizations.

While looking for possible performance improvements in Spring Up Harmony for Xbox 360 (PC), I have seen a simple situation really suited for multi-threading. You can see that situation with the following screenshot of my in-game profiler (click to enlarge):
Frozax-4
I have two tasks with performance issues since I started to run the game on Xbox 360 : the dynamics of the background effect and the computation of the estimation of the launch of the ball (running a simplified physics simulation multiple times, through Box2D.XNA). On this screenshot, these tasks are called VelGrid.U(9) and Launchers.U(14). The first part of VelGrid.U (Comp.Balls,10) uses the data of the physics simulation but DynaColLines(11) doesn’t. Therefore, the VelGrid.DynaColLines and Launchers.U are totally independent with each others. No data is shared between these code sections. Perfect candidates for my initiation to multi-threading in XNA! :)

The e-book found here (recommended in multiple threading articles) is really awesome and helped me find the algorithm I need to use. I want to start the Launchers.U at the same time than VelGrid.DynaColLines and wait until both are finished. I know this is not optimal, but it allows me to simplify the problem and avoid so many threading pitfalls.

I just have to use two AutoResetEvents. The Launchers.U section is created in a thread and waits for a “Go” signal from VelGrid. After doing its job, it sets a Ready signal so that VelGrid knows when to carry on after doing its own stuff. Two different cases can happen, depending on which section finishes before the other.

Here are screenshots of the in-game profiler showing the differences (taken on X360). Every code section prefixed by a * means it’s executed on the thread.

Case 1 : The code on the main thread completed before the code on the worker thread:

thread_slower
The Velgrid section has to wait for the Launchers to complete, shown with the red arrow.

Case 2 : the code on the main thread completed after the code on the worker thread:

thread_faster

The thread is idle while the main thread still works (red arrow).

With this simple threading mechanism (coded and tested in a few hours only), I have been able to optimize the game. In the basic test level shown here, instead of 2.3 + 3.1 = 5.4 milliseconds spent on the main thread for both features, the game now spends 3.6 milliseconds, running two threads at the same time (33% gain). In this test scene, the Velgrid.DynaColLines is “free”.

Since I took these screenshots, I have made a few more changes : now, the whole Box2D update used while the game is in motion is threaded too.

Last important thing to know, on Xbox 360, you must choose which core to use for your thread. Just read the msdn page about the SetProcessorAffinity, everything you need to know is here. You can see in this article that I still have a few cores available :)

In conclusion, if you have independent sections of code that take some time to run, you can improve that very quickly using this method.

On-screen profiling for XNA

Wednesday, April 7th, 2010

A few days ago, I read an article called Among Friends: How Naughty Dog Built Uncharted 2. The interesting screenshots on the third page gave me the urge to create what I call an “on-screen profiling” tool for Spring Up XNA. I talked before about profilers and how to use them to find which sections of your code need to be optimized. But a visual tool is really handy, because it’s real time, and with Edit and Continue on PC, you can even see your improvements live!

So, I spend some time working on it, and here is a sample screenshot (click to enlarge):

onscreen_profiling_sample_x360The bars show the timeline of the current frame. In the bars, there is the name of the section. For clarity, all profiled sections are also displayed in plain text with the following informations: Name, Time elapsed this frame (in millisecond), smooth time elapsed, percentage of the 60 fps frame (16.6 ms). The vertical magenta line is the limit of the 60 fps frame. On this screenshot, my objective of 60 fps is not met, there are some bars displayed after it :)

I am really happy with the results, you instantly see where optimization is needed and you also see the results quickly. For instance, after seeing the previous screenshot, I concentrated on the “Velgrid.D” section (section drawing the background effect that is seen in motion here). After some improvement, it still was not fast enough. I noticed that the problem was simply the overhead of calling SpriteBatch.Draw more than 5000 times. I therefore decided to write my own vertex+pixel shaders and you can see the result here:

onscreen_profiling_final_x360It’s now so fast that we can’t even see the name of the section in the bars and I have to have a look at the list to see the exact time taken by this section of the game (number 15).

The profiling works obviously on both Xbox 360 and PC so I could compare both hardware. As I could read here and there, the X360 build is much slower than the Windows one. I made two screenshots of the same scene with a scale of the bars so that the length in pixels of the full frame is around the same on each platform. Here is the screenshot of the windows build that you can compare to the first screenshot of this post: 
onscreen_profiling_pc_scaled

The “slower” sections are not the same. Globally, the X360 is better at using its GPU and the PC using its CPU. Of course, this is heavily dependant on the PC platform. For information, I am using a 3.4 GHz computer with a X850 graphics card.

And just for fun :) , the first screenshot of the profiler on X360, before I started any optimizations:

onscreen_profiling_first version x360The frame took 165% of my objective target frame (60 fps). I can’t even see it all on screen. I am now at 75% of the frame, and with an additional feature (glow around objects, section 9 on the second screenshot).

So the small amount time taken to make this in-game tool is very well spent. It’s obviously quicker than running a profiler and waiting for the results, even if it’s not as precise. And the great thing is that this was easy and interesting to program :)

Video : Dynamic level demo and background effect update

Tuesday, February 23rd, 2010

The development of Spring Up XNA has been going pretty well last week.

Here is a new video, please note that it is still not the final art, just placeholders for now :

You can see the following:

  • New ways of using the physics engine in the levels (joints, gravity…)
  • Small improvements on the background : slight halo around targets, bloom reacting to matches, especially when hitting sparkling balls (the sparkling balls are part of a modification of gameplay from Spring Up PC/Mac. I will talk about it later. This is also the reason I cropped the borders of the video ;) ).
  • New particle effects (code in place, art also not final)

These days, I also implemented the sound effects (I just recoded the wavs available in the original version), improved the level editor, added many types of objects (bumpers, shrinkable balls, motors, splines…), added player score with statistics…

Globally, it’s going well, but I am having difficulties in level design. I find it very hard to innovate in each level but I still have a few interesting level prototypes in place.

Hope you like it!

Box2D.XNA : a great 2D physics engine

Friday, February 5th, 2010

Box2D is a 2D physics engine created by Erin Catto. On Win/Mac, I used a very early version of Box2D (it was released nearly two years ago!). I just made a few specific changes for the game. Of course, as I told in a previous article, XNA games must be made in C# and Box2D is made in C++. I could find multiple open-source projects of ports of Box2D in C#. They are based on the last version of the C++ engine and a lot of changes occured since I developed Spring Up!.  It means that to use a C# port, I have to adapt a lot of my physics code. But this is a good thing for the following reasons:

  • I will have the new version of the engine : there are probably some debug and optimisations.
  • New features : can be used to improve the game
  • Lots of C# code already written, I won’t have to port it myself.

Among the two or three C# ports available, I decided to go with Box2D.XNA. This port is written by Brandon and Nathan Furtwangler and they are doing a very good job! They are very active: when I fixed them a bug, they put it back in the code base in less than a day and they port the changes of the C++ version very quickly.
Compared to the old C++ engine I was using previously, the new version has been greatly improved, here are some examples:

  • Dynamic/Static/Kinetic types are included on bodies, no need to play with infinite mass directly.
  • Collision filtering is now included in the API. I developed my own system in Spring Up! but throw it away in C#.
  • Motors are included. I also developed basic motors myself in C++.
  • More joints types: only one type was available.
  • Collision detection includes polygons, not just only circles and rectangles.

As I’m still working with the level editor, I started to include new features in Spring Up! Here is a simple video showing a new possibility made with Box2D.XNA (showing motors, complex shapes, joints and collision detection).

As you can see, the gameplay does not seem that interesting in this sample but it’s just made to test the dynamics for now. I will concentrate on level design later and I am sure I will face a lot of difficulties.

In conclusion, if you need 2D physics in your game, use Box2D, and if it’s for XNA, use the Box2D.XNA port!

Video : Level Editor

Tuesday, January 26th, 2010

I am mostly working on the level editor. I was not sure when I started this project that I would need a specific level editor. But Spring Up! X360 needs some serious changes in the level design to improve the quality and to adapt to the X360 platform, therefore I need this new level editor. Working on tools with C# is great : it’s really powerful and efficient! Technically speaking, the level editor is just a Game Component (DrawableGameComponent XNA class) of the Game. When the “Editor” component is created, all the new mouse and keyboard shortcuts are available.

As you can see in the video, here are some features implemented: create, move, rotate and delete items and targets. You can set up objects as static, dynamic or with a motor. There is also a snap feature. And as the game is running at the same time, you can play directly in the editor.

You can also see some of the new shapes that will be available in Spring Up! XNA : a triangle and pentagon.

That’s it for today, I hope you liked it!

Spring Up! XNA : first try at background effects

Wednesday, January 20th, 2010

I spend some time trying to create an interesting visual effect in the background of Spring Up! XNA. The backgrounds of the PC/Mac versions are not really nice. I tried to do something more abstract and animated depending on the flow of the game. Geometry Wars 1 and 2 did a very good job at that. While trying to develop an effect, I came up with many different results. I uploaded a video of one of this effect (you can see it in full res here).

Of course, feedback is very much welcomed (negative, positive, ideas…).
I personally have some concerns about a few things:

  • Black background, is it too simple?
  • When background is colorful, I think the player might not see the “real game” because it attracts the eye.
  • Colors are a bit too much “programmer art”. I made also some black and white tries that were nice too.

I have many variables available to tune this effect and each one of them really changes the final result. Basically, the algorithm here is a grid of particles that are animated and lit depending on the velocity and position of the moving elements around them.

I will also probably add thin trails behind objects. For boxes, I will try to attach multiple trails to  every corner.

I also have a bloom effect I did for fun before starting this project, I might try to add it in Spring Up!, probably on the trails, maybe on the background too.