D2P Games
Discover our games:
D2P Games is an independent video games development studio based in Montreal. You can follow our progress from this blog ! About us

Archives for September 2010



Reckless Squad available for pre-order!

By Dri on September 30th, 2010, posted in Reckless Squad

We’re proud to announce that Reckless Squad is now available for pre-order on GamersGate.com!

The game is available for PC Windows and Mac OS X for a modest price of $9.95 USD.

Finally, it will be released on October 11th, 2010.

If you want to try the game, we have a demo version here.

See the product page for more information!

Share on Facebook  View Comments


Weekly News #22 : Demo released!

By Paul on September 17th, 2010, posted in Reckless Squad

Today is an important day for Reckless Squad: the demo is out!

You can download it freely on the game’s page: http://www.d2p-games.com/reckless_squad/

Check it out and don’t hesitate to share it with other people!

Geoff Gibson of DIYGamer.com was nice enough to write a preview of the game: http://www.diygamer.com/2010/09/great-big-convoy-reckless-squad-preview/

“Overall, Reckless Squad is a fun game. I thoroughly enjoyed playing my preview version
“[...] I’m sure they’ll have no problem convincing people to buy their simple, yet addictive, convoy RTS.”

Pretty cool, isn’t it?

If you are a video game journalist, don’t hesitate to contact us. We’d love to send you a version of Reckless Squad and answer all your questions. Now more than ever, we need you to talk about the game and spread the word.

Finally, it seems that you like the technical articles, particularly on Reddit and Tweeter. Is there a particular subject you want us to address?

Share on Facebook  View Comments


How to optimize your game

By Dri on September 3rd, 2010, posted in Technical

Optimization is a special keyword in the world of video games. If you go to player-centric websites chances are you will hear it a lot.

Video games are interactive simulations and simulations are a very specific type of software. You don’t program a game like you program a business app. Games need to update themselves over time, not only when the user click on a button, and this can quickly lead to performance problems.

Here are some tips about optimizing your game based on what I experienced during the development of our game, Reckless Squad.

1.     Profile

You can’t just optimize all your code, it’s not realist. You don’t have time for that and you will needlessly obfuscate your code base and make it harder to maintain.

So how do you decide which parts of your code need to be optimized?

Enter profiler. A profiler can take many forms, but its purpose is always the same: telling you how long the different parts of your code take. All the major IDE ship with one, and if you don’t have one you can always do it manually with the good old time() function.

Start by profiling on a high level, is it your update() or your draw() function that takes this much time? Once you know you can be more specific and see if it’s updatePlayer() or updateUserInterface().

2.     Don’t run it

Now that you know what is slowing down your game, you can start optimizing it. Here is the most effective and easy way to make a function run fast: don’t call it.

If it’s not running, it won’t take time, it’s obvious!

Okay, it’s not that simple, you wrote this code for a reason, right? You still need to run it, but maybe not that often.

Reckless Squad is a RTS game, with a lot of units, all updating at once. I quickly discovered that the AI was what took the most time. I asked myself: “is it really important that the AI run at 60Hz?” The answer was obvious: no.

So instead of running the AI code every time, I do it less often. Performances increases.

There is a problem with this approach: every time the code does run, you will experiment a sudden performance drop. Spreading the execution of this function across the frames will prevent this.

In my example I only update the AI of a fragment of the unit list each frame, allowing a sort of load balancing.

3.     Know your platform

Every platform, language or SDK have its little secrets. Knowing some of them can be interesting from a performance standpoint.

For Reckless Squad we’re working with Lua. Lua is already a fast language but extra-performances can be obtained if you know how it works. There is some good information about it on the wiki.

To give other examples, using StringBuilder to concatenate strings in .NET or calling reserve() on the C++’s vector are other good practices specific to their platform/language/framework.

Similarly if your platform has 2 cores, it’s a good idea to use them effectively. And if you’re working for console or mobile devices, knowing your platforms and its pitfalls is increasingly important.

4.     Think like a computer

Object Oriented Programming is cool. It’s easy to learn and to use because it naturally maps our way of thinking as humans. My computer in front of me is an object, it’s actually in a turned on state and it execute various methods like shutting himself down. It’s seems very natural to think like this when you code too.

However it’s not how computers work. Computers are calculators, processors. They take a bunch of input data and apply to them a specific transformation to get different output data.

If you can think this way too, you can present the problem in a more computer-friendly fashion.

I won’t go into details about it, because others had already done a great job:

Actually, for Reckless Squad we use OOP almost everywhere. Except in a few strategic places where performance is critical.

So I’m not saying you have to toss OOP out of the window, but we have multi-paradigm languages for a good reason: don’t hesitate to change your approach depending of the problem.

5.     No magic

Despite a popular belief among some players, optimization is not magic. No amount of optimizations will ever make Crysis work on a VoodooFX.

You have to draw the line, to choose a minimal configuration and stick to it. If the game runs fine on this platform, then you’re good, you don’t need to optimize anymore.

Maybe you’ve spotted some places where some optimizations can be done, but don’t do it. If it ain’t broke, don’t fix it.

You’re making a game, not a benchmark.

Share on Facebook  View Comments