Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 11 Sep 2009
Offline Last Active Jan 12 2015 08:33 AM

Posts I've Made

In Topic: Game management

12 February 2013 - 09:27 AM

A (classroom) way to get startet with organising your code in a OOP way would be to to write down the details of your game.


There is a gameboard.

It is divided into 9 squares.

3 times 3 squares.

The game is played by two players.

One player uses X as marker.

One player uses O as marker.

The player take turns alternating.

The player with three markers in a line wins.

The line can be horizontal, vertical, diagonal.


Might have forgotten some things.


Now you start looking at the summary you have.


There is a gameboard => gameboard class

It is divided into 9 squares. =>  square class

3 times 3 squares. =>  gameboard needs to keep track of 9 squares in 3 times 3 alignment

The game is played by two players. =>  player class

One player uses X as marker. One player uses O as marker. => player class needs to keep track of used marker by player => gameboard needs to store the placed marker and position

The player take turns alternating. => main class / game loop needs information about active player

The player with three markers in a line wins. The line can be horizontal, vertical, diagonal. => main class / game loop needs to check condition every loop.


So gameboard class could double as main or game class.

Gets a 3 x 3 datastructure that takes square / tile object

square / tile object gets property playermarker symbol and getter and setter

player object gets properties for playername, playermarker symbol

and so on ....


And so you continue until you have everything (entities, functionality, etc.) that is in you game written down and placed in some class / function / functions file.


If you are unsure after doing that, you can upload the document / diagramm (UML) here and get feedback.



In Topic: AI programming quick start Q

06 February 2013 - 04:27 AM

Visit www.edx.org and checkout the AI online course (Starts 18th Feb and it is free). It should give you an idea if you like it or not.

In Topic: Strange IP address hitting my website

06 February 2013 - 04:25 AM

It is also possible that some browser plugin reported that you accessed the domain. But in that case it would be more likely that you have a google or bing bot on your page and not some unknown bot/scanner/whatever.


You could simply exclude every IP but your own in the .htaccess if you need to be sure, you are the only one that can access the subdomain. (assuming your sever setup supports it)

In Topic: Multithreaded pathfinding

22 October 2012 - 12:20 PM

Hi Sparkon,

are you sure, that you need to do all the calculation every time?

I don't know which game you are building exactly, but there might be a way to use precalculated A* for example.

See http://www.gamedev.net/page/books/index.html/_/technical/game-programming-9/advanced-game-programming-a-gamedevnet-collection-r723

e. g. if you have many rooms and the player moves in the building as does the enemy (AI). You could calculate the routes between the room at buildtime. Than you just lookup position (enemy room) and destination (player room) and have the best way. You can even have seperate calculations for different conditions like locked doors, spawned health packs etc.

As soon as player and enemy are in the same room you can use nearly any pathfinding algorithm for the 'last mile'.

-- GWDev

In Topic: License server and open ports

15 September 2012 - 07:12 AM

Will it be really bad if I ask the user to enter his MAC address on my future website (right after he inputs his username, company name, etc.) instead of doing it automatically?

This might be a problem with business customers. The one buying the license might not know this information.
E.g. I simply tell IT Service to buy X of that and Y of this, but usually i do not include the MAC Adresses. And to be honest, this extra work to collect all the information (computers might not be delivered for new employees. Existing ones are changed every few years), i would do this for an absolute must have software. Otherwise i would simply choose to buy a different product (if available).
If you are not sure about the price of your software now, this might be something to think about before you invest time in a license server.
You could simply offer a company or site license and be done with this problem. This is only a problem with really expensive software.