Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!

We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Member Since 17 Jan 2009
Offline Last Active May 05 2014 08:36 PM

#5040475 Xna or Unity for first rpg?

Posted by EJH on 07 March 2013 - 12:08 PM

Yeah either MonoGame or Unity imho. XNA may be doomed and I think it is a huge mistake by MS.

#4961464 Can I avoid the hassle of these IDE's?

Posted by EJH on 20 July 2012 - 02:57 PM

You should learn IDEs if you want to get a job. At most interviews if you said "i don't use IDEs" your resume would probably go in the trash as soon as you leave. Also, when working with non-trivial projects, debugging with cout and file writes doesn't even remotely compare to an IDE debugger.

#4936857 Finding RtNEAT tutorial/example code

Posted by EJH on 02 May 2012 - 12:44 PM

Real time Neuroevolution of augmenting topologies (RtNEAT)

Where can I find a simple example of RtNEAT algorithms being applied?

Additional Information:
I'm interested in researching real time genetic algorithms and RtNeat has seemed to be the best one out there (at least the most promising) since its has been applied to a real game. Anyways so far, I've been doing some research merely looking at research papers, which has been all and good but understanding exactly how the algorithm is applied has proved to be a challenge.

Once I practically understand it, looking at its advantages and disadvantages, I was going to create to create a version of my own and then use it for my dissertation. Anyway from my final year research I wanted to find out why it had been so difficult/slow to get real time genetic algorithms working in games.

Have you already seen Ken Stanley's NEAT users page? It has a bunch of implementations in various languages and lots of applications:


For game applications there are at least two that I know of that use rtNEAT or a variant:

Neuro Evolving Robotic Operatives (free game): http://nerogame.org/

Galactic Arms Race (will be on Steam soon): http://gar.eecs.ucf.edu/

If you have any questions that aren't answered on there, you can email Ken and he will most likely try to help you out.

#4894502 Game Loop & FrameRate Control Opinions

Posted by EJH on 16 December 2011 - 09:17 AM

Pretty sure both the Nvidia and ATI control panels can override a game's preference for Vsync. You can't always count on it being on.

Also, 30hz is good for physics but you absolutely want mouse, keyboard, and GUI updated at 60hz or more. Those are mainly what makes games feel sluggish at low FPS.

#4883044 What online game services are there?

Posted by EJH on 11 November 2011 - 03:20 PM

Are there any others?


Such as?

Battle.net does all of that.

Bungie.net has Halo stats and matchmaking.

There's also EA's Origin which is a Steam clone. Not sure if they do stats and matchmaking though.

#4867669 What's needed to recreate farmville

Posted by EJH on 30 September 2011 - 12:05 PM

What's needed to recreate farmville?

A large supply of bored house wives. Posted Image

#4859030 XNA loading texture2d at runtime

Posted by EJH on 08 September 2011 - 07:29 AM

After you get the file name. however you want, then do:

Texture2D tex = ContentManager.Load<Texture2D>(fileName);

#4855546 [C#] List for generic undo redo and Mementos

Posted by EJH on 30 August 2011 - 12:03 PM

Can you just make your history list of type "List<Object>"? You can store anything there. Then when someone hits Undo or Redo you just look at the most recent item's type:

if(item is TileMemento)


    // handle tile undo


else if (item is LightMemento)


    // handle light intensity undo


else if(item is EntityMemento)


   // handle entity undo


// etc...

That's about as simple way to do it as possible.

#4854096 Should I have one central Renderer or each game object should have one?

Posted by EJH on 26 August 2011 - 09:31 AM

This way is much cleaner. I will apply this strategy to TextureManager, SoundManager and LevelManager. Not sure if I should have only one BulletManager and only one EffectsManager.

Two options:

1. One BulletManager/EffectsManager which means before each level I will have to create new lists for bullets/effects.
2. BulletManager/EffectsManager per level. This way each time a new level begins, a new bullet manager/effects manager for that level is created.

Personally, I used only 1 GameObject manager which held lists of all currently active objects in the game. You might also separate Effects from Bullets (or other game objects). Bullets are interactive and collidable and can affect other game objects. Effects like sparks, explosions, and impacts are (usually) transient and cosmetic only.

The main reason I separate effects is for optimzation reasons. Depending on the type of game, if effects are triggered far from the player you don't even have to spawn the effect. For example, if a rocket lands on the other side of the map from the player, you can calculate damage to nearby units but never have to spawn the explosion effect (nor play the sound either). The player would never see/hear it anyway.

#4853774 Should I have one central Renderer or each game object should have one?

Posted by EJH on 25 August 2011 - 12:43 PM

Others might disagree, but I think a centralized renderer is a good thing for small projects with only a few programmers. I used a static Render class in my relatively small (69k SLOC, 166 .cs files in the Client) indie XNA game. Worked fine for me.

#4852308 Best way to send updates to the installed game.

Posted by EJH on 22 August 2011 - 08:36 AM

Due to some copyright reasons, the gamers shouldn't have access to the contents in the package from outside the game.

What is the best way to package the contents to achieve the above goals? Any encryption method maybe?

You can encrypt to keep casual meddlers out of your game files. But it is impossible to keep anyone skilled from getting your assets out of a file on their hard drive. If your game is popular just assume all the art and music assets will eventually be on the internet somewhere.

#4850898 sort algorithms

Posted by EJH on 18 August 2011 - 01:45 PM

Uhh you forgot to test Gnome Sort. Posted Image


#4847193 Ambient occlusion simulation for AAA projects

Posted by EJH on 10 August 2011 - 09:55 AM

Threads like this really make me question whether GD.net has the most subtle trolls in history:

- OP: "How do I get emails of AAA developers to use my algorithm despite the fact than I cannot show a demo, video, screenshot, or a even provide single numerical comparison. Oh and they have to sign an NDA."

- Guy later in thread: "My engine is superior to Crysis 2 yet I have never released a single game with it nor can I provide a demo. To prove my engine's superiority here is screenshot of some buttons and text rendered on a couple of planes."

Can't say this isn't entertaining though. Posted Image

#4847180 C# events at timed intervals

Posted by EJH on 10 August 2011 - 09:25 AM

Here's a C# simple static timer class I used on a game server. Uses a C# StopWatch to calculate the time elapsed since the previous frame in milliseconds.

// TimeMgr.cs - time elapsed since previous update 
// to use:
// - call TimeMgr.Initialize() on game start
// - at the start of every game update call TimeMgr.Update()
// - public field TimeMgr.timeElapsed is the elapsed 
//   milliseconds since the previous update
using System.Diagnostics;

public static class TimeMgr

    // stop watch and private vars
    private static Stopwatch stopWatch;
    private static float currentTime = 0f;
    private static float oldTime = 0f;

    // time elapsed since the previous tick
    public static float timeElapsed = 0f;

    // Initialize() - init stopwatch
    public static void Initialize()
        stopWatch = new Stopwatch();

    // Update() - save previous time elapsed
    //          - update current time elapsed
    public static void Update()
        oldTime = currentTime;
        currentTime = (float)stopWatch.ElapsedMilliseconds;
        timeElapsed = currentTime - oldTime;


#4844685 visual studio 2010 worth it?

Posted by EJH on 04 August 2011 - 02:34 PM

Unless you need 64-bit compilation, the Express versions are free. So I'd say yeah, totally worth it. ;)