Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 14 May 2006
Online Last Active Today, 04:30 AM

Topics I've Started

Exporting and the issues that transpire!

10 January 2013 - 12:13 AM

Hey all,


I would like to start a discussion on the ever present issue that I am sure all programmers must face at some point, the issue or warning of exporting classes that contain standard template library classes; for example std::vector and std::string.  What do you think the most efficient, platform agnostic and cost effective solution is?


The first solution that comes to my mind is to just re-write aspects of the STL that you want to use.



  • Full control
  • Probably faster (But situational)
  • No problems exporting your own classes
  • Can be thread friendly
  • Easier to debug


  • Very cost in-effective
  • Needs a lot of testing


Another solution is to just ignore it and build different libraries for different implementations, so use msvc, gcc, clang and name your libraries after what they were compiled with. E.g. MyLibWindows64MSVC or MyLibWindows32GCC



  • Very cost effective
  • Full usage of stl


  • Hard for clients to use


How have you solved this problem or how would you solve this problem?

Upgrading, One Button or Many?

04 January 2012 - 05:51 AM

Hey all,

In a game I am currently working on, the player has four guns, these guns specifically need to be used to kill specific enemies. After each round of shooting the player can opt to upgrade guns, using money they collected throughout the round, and I was wondering what is better:
  • Having a single button for each gun that you can press which will upgrade parts of the weapon automagically.
  • Having a button for each stat that the player themselves can pick and choose.
I think 1 allows the designer to design the waves to fit with upgrading the weapons and it fits with the casual game market we are going for (Mobile games). 2 will allow the player to have more control over the game, but may also open avenues for weapons to become overpowered.

I would love to hear your input!


Component Based Entity System Question

14 September 2011 - 06:37 AM

Hey all, I would like your opinion on something...Okay so:

Say you have a component based entity system and your system is kind of normal:

Where an Entity is a ComponentContainer and an AttributeContainer.

Components are things that use attributes (The entity holds the attributes so that two components can say...access the Mesh attribute or health...) and can add\get attributes to an Entity.

Attributes are pretty obvious.

Now lets say you have your Renderable3D component, and when it gets added to an Entity or created you need it to also get added to the Renderer so it can be rendered...

How would you do this? Make the Renderer a singleton? (OnEntityAdded or Initialise on the component could then just add itself...)

Or have a GameSystem that would hold a Renderer* and was a singleton?

Or...? A solution without singletons!?

Non-Static Member Function Pointers!

29 April 2010 - 12:12 AM

Hey all! First of all the error I am having: error C2064: term does not evaluate to a function taking 0 arguments So, basically what I am trying to do is implement a Button class, which can be given a function(pointer!) through it's constructor which it then uses when it is 'activated'. Here is basic code showing what I have: Button

class GameManager; // Pre-declare of game manager.

class Button
    Button(void (GameManager::*aFunctionPointer)(void)); // Takes a function pointer and assigns it to mFunctionPointer

    void Activate(); // This just calls mFunctionPointer (like: mFunctionPointer();) 
    void (GameManager::*mFunctionPointer)(void);

#include "button.h"

class GameManager
void testfunction(void)
    // writes to my log output.

     mTestButton = new Button(GameManager::testfunction);
Button *mTestButton;


I did a search on here, and found that boost lib was heavily recommended :(. I kind of feel like not installing and using boost JUST for this. I also removed the parenthises on the end of: mFunctionPointer(); when it was called in Activate, so it looked like this: mFunctionPointer That worked and when I ran in debug, it showed the correct function being pointed to (but obviously didn't call it). Now I believe I know the problem, but not the solution. It wants something like(?): (aGameManager.*mFunctionPointer)(); However button doesn't know about GameManager (besides the pre-declare) I can't have it as an argument for Activate, and I can't copy a GameManager (Via passing into a function argument). Hopefully this wasn't too long-winded, thanks for any help! So what to do?

Best network grid-based movement.

02 February 2009 - 07:09 PM

Okay, I have a 2D game that I have been making multiplayer, it is grid based movement (16*16), I have tried a method of just sending something along the lines of: move left -> other people recieve move left. move right -> other people recieve move right. move up -> other people recieve move up. move down -> other people recieve move down. They will only send these when they are snapped to a grid position and if a direction is being pressed you cannot press any other direction. The reciever of the message will queue up move events and only process the next move once the last move has finished (hopefully finishing on the grid). However for some reason this will eventually make one out of sync. I have thought of just making waypoints to send (i,e 16,16,moveleft), then when someone recieves that and they finish the last waypoint movement they would process the next waypoint. Anyway, I am looking for peoples thoughts of how you would go about networking grid based movement. Thanks!