Units of measure to the rescue!
Physics can really improve immersion in a game, regardless of how faithful they are to reality. That's why I always enjoyed writing simple physics engine. Even though I have stuck to really simple physics engine, I always end up mixing accelerations and forces. That usually doesn't lead to much...
Categories: News
Parallel draw-update XNA game component
Video games are often demanding when it comes to computation power, especially simulations and 3d games. The Xbox 360 has 3 cores with two hardware threads each. Of these 2 are reserved for the system, leaving 4 available to the programmer.This article describes an easy to use custom XNA game...
Categories: News
Converting FS project files to target Xbox 360
Of interest to anyone using F# and XNA to make games targeting the Xbox 360: I'm working on a script to convert fsproj files for the PC platform to the Xbox platform.https://bitbucket.org/johdex/xnautils/src/a2cc6e8c7455/WinPc/ConvertFsProj.fsxIt's not 100% ready yet, the converted files need...
Categories: News
Defeating the blank page
Programmers have two ways to approach implementation of complex programs:Start by building bricks, combine them to build larger bricks, repeat until the brick is actually a house.Work the other way around.The second approach is actually the more sensible one for new problems. In general, you know...
Categories: News
An example of inheritance gone wrong
In an earlier post entitled Why inheritance for code reuse should be avoided I pointed out that the key problem was conforming to the Liskov Substitution Principle.Although I guess there is nothing controversial in what I wrote, I fear I probably did not convince anyone who wasn't already...
Categories: News
New e-book: FRIENDLY F# with game development and XNA
I received a mail from Giuseppe Maggiore, one of the authors of a new book: FRIENDLY F# with game development and XNA. Giuseppe helped me put together the project templates for F# and XNA on the Xbox 360.The main subject of the book is the F# language and its variousconstructs, but every single...
Categories: News
The forgotten control flow construct
There is a truly powerful control flow construct that many programmers have forgotten. It helps implement complex flows that ifs, whiles and matches can't handle. Not even throwing and catching exceptions can measure itself to this construct.You may wonder what kind of situation would require...
Categories: News
Is it worth it?
In my previous post, I explained why inheritance for code reuse is a bad idea. The blog was a bit on the theoretical side, and I wanted to know if I wasn't sitting in an ivory tower.For this reason, I have decided to rewrite one of my uses of inheritance by composition. The piece of code in...
Categories: News
Why inheritance for code reuse should be avoided
The question of when to use inheritance and when not to has been asked many times. I have noticed answers can be put in one of three categories:1. Use as much as you can. It's a convenient way to maximize code reuse with very few keystrokes. Actually, this answer is seldom explicitly given, but...
Categories: News
OOP without classes in F#
Did you know that F# allows to use some object-oriented features with types that are not classes? This includes methods, dynamic dispatch and open recursion.Methods are functions or procedures which are tightly coupled to a type of object.Dynamic dispatch is the ability to execute different...
Categories: News
Reference-counting just isn't enough and actually is harmful
I recently came across a blog entry titled "Why Garbage Collection is not Necessary and actually Harmful".I used to share the same opinion in my C++ days, when I used to think no better language could be written. A few years later, I have drastically changed my opinion on the subject. I am not...
Categories: News
My impressions of F# after three years
It will be soon 3 years that I have been using F# both professionally and privately.At work, I have used it to implement the simulator module of Prover iLock. This is a complete rewrite of the first version of the simulator, which was initially written in C#. The rewrite was necessary for a...
Categories: News
Is that a cloud, or is it a storm?
I was recently forced to spend some time at a hospital due to a bowel inflammation. The inflammation is due to a chronic disease whose cause is still unknown. It's also not clear whether there are non-surgical treatments to completely cure the disease. I won't go into details in this post,...
Categories: News
The myths about the risks of introducing F# in your development team
At work we are a couple people who have been using F#. All people who have used it are enthusiastic, yet I was surprised today when I heard a project leader had asked to limit the use of F#. There is a question on programmers' stack exchange which touches the subject titled "Real world pitfalls...
Categories: News
Planing and designing WorldConquest
I have been using fogbugz from FogCreek to plan and track my previous project, Asteroid Sharpshooter. So called "on-demand" installations are free for single developers. I chose fogbugz over other free alternatives because it's the only platform that I know of supporting a time planning process...
Categories: News
My next project: WorldConquest
I started working on a new project during the 2010 Christmas break. It's a turn-based strategy game whose working title is WorldConquest. The final title will differ, as there already are quite a few strategy games with identical or similar names.The game is loosely based on a game for Atari ST...
Categories: News
Using F# scripts for testing and performance measurement
I have just heard about a new project being started by a game developer, NPerformant.The developer writesAt various times in my “day job/career” I’ve used commercial profilers with varying results, but I don’t want or need to profile the whole application or even a whole library. I also...
Categories: News
"I'll Whack Your Fingers"-Oriented Programming
Every now and then, a question about how to transfer data between game screens pops up on the App Hub forums. The source of the problem is that many try to solve this problem using synchronous programming. This does not work because game screens require interaction with users, which cannot be...
Categories: News
Asteroid Sharpshooter: Post-mortem
IntroductionAsteroid Sharpshooter is a game published on the Xbox LIVE Marketplace, under the independent games section.It is written in F# and C#, using XNA Game Studio 3.1. The game falls in the category of 3d space shooters. Inspired by a classic, Asteroids, the game puts the player in space,...
Categories: News
Replacing LIVE functionality in XNA 4.0
Although the XNA framework supports multiple platforms, including Xbox and Windows on PC, there are parts that are not available on Windows PC.One such part is dedicated to interacting with Xbox LIVE, such as gamer profile information, permissions, avatars. (Actually, these parts are available...
Categories: News
