This tip has helped so much - was using virtual functions but not making them abstract in the base class - so thanks :-) I've actually been told in another post that my whole design is flawed, since...
Type: Posts; User: Know_Your_Role
This tip has helped so much - was using virtual functions but not making them abstract in the base class - so thanks :-) I've actually been told in another post that my whole design is flawed, since...
Bubba - So you're saying the engine should plug into the game, not the other way round? Ironically this is how I first set this up before deciding it didn't look right! :(
I've managed to fix this issue but am having a similar issue. I have placed it under a seperate post, but a summary here: In "main" I am creating game objects of various types (Connect4, chess etc)...
Following further testing it does seem to be that because the data has now become type "Game" it is trying to use the member data from "Game" (which is blank") instead of the correct data taken from...
Hi all
Having a problem with a loss of member data when passing the object through to a seperate function. Relevant code fragments are:
Engine* theEngine = new Engine;
if (option == 1)
{...
Sorry I should've mentioned that - yes I have. But it's as though C4Game has been converted into an object of type Game, and as such it is using all the functions local to that class.
Hi all
Got a problem I constantly run into when creating small games as programming practice. I am currently practicing keeping the game engine seperate from the game itself, passing the specific...
Hi all
I'm wondering if it's possible to define a mutli-dimensional array using variables, such as the following:
int CustomCheckersBoard[a][b];
It doesn't seem anything usual but C++...
Hi all
Hoping someone can help, I'm a little stuck trying to follow what is turning out to be a rather unhelpful book on programming direct 3d :S
I have come across the line of code:
...
Thanks for that, I thought Windows API was already being included but I'll check when I get a second. :-)
Hi all
A book I'm learning Direct3D from is causing more problems than it's solving so far!
I am coming across a data type called "BOOL" - in capitals, not to be confused with the standard...
Hi all
Surprised I haven't been able to find a solution to this when it must be a common problem...
I am having trouble with a switch statement that is nested in a forever loop. The user is to...
Hi all
I'm learning to use Direct3D and DirectX at the moment, and I've come across a piece of code I'm a little confused by, could anyone clarify what the below is doing:
(BYTE**) &pVertices...
Hi all
I understand what I'm about to ask is beyond the juristiction of this board, however I'm sure most people on here must know what I'm on about and ppl have been very helpful in the past!
...
Hi all
I've just finished studying a huge book teaching the fundementals of C++ and I bought a couple of books about creating a basic game based on the language... however those I bought assume...
lol I wished I'd phrased my question that way first! That's all I needed to know really.... thanks very much!
OK I see your point about passing by value. However, my concern is that I want the data that will be in the elements created on the free store, not the stack. Is that done as standard with map...
Code Monkey - what you're saying makes sense, thanks. However I would not say "use auto_ptr" - since I don't know what auto_ptr is lol.
How would you suggest the best way is to delete the...
lol I seem to have caused some confusion with this one...
Consider the following code:
#include <map>
#include "EOJ_card.h"
using std::map;
Elysia & Syntax Error - both of your above pieces of code make much more sense to me now :-) I think I'm taking the wrong approach, like there's just one set way of creating a wrapper class - but...
But what you're saying doesn't make logical sense to me. You're saying that the wrapper class will derive from the OS-defined class - so surely what is in the wrapper class will be restricted to how...
OK lets see if I'm getting the idea (and there's a good chance I'm not!!). I could have two separate classes that inherit from the wrapper class (say one is Windows code and the other Linux). They...
Yes it is part of the standard library, however it's unclear whether the elements are being placed on the stack or in the free store? Pointers to data on the free store appear to be incompatable with...
Hi all
Yet another thread from your truly... I'm just wondering how I would be able to build a map container so that the elements were placed on the free store instead of the stack? Or does that...
DWKs - if you'd be willing, if you could show me how a wrapper class would be used in order to ensure portability to different platforms I'd really appreciate it. Like I say, I think visual aid will...