Okay. This weeks 'problem' is that I need to simulate a game. I have to make two singly linked lists which will contain a name of player, his attack (double/float) number and his defence number and so on for as many players as the user inputs. The point of the game is to try to break the other 'chain'. You do that by running into 'enemies' chain and trying to break it, you break it if your attack is greater then defence of two players that you are trying to separete. If you separate them you can pick one of …

Member Avatar
Member Avatar
+0 forum 8

Hi, all. I'm have a class EnemyController with a function Spawn(...) that instantiates a new object of the appropriate type. I want to call Spawn from somewhere like my TileMap class to create a new Enemy in my tile collision method. Here's what I have so far... class EnemyController { public: EnemyController() {} ~EnemyController() {} static void Spawn( int x, int y, EnemyType type ); virtual void OnUpdate( Camera& cam ) { int index = 0; for( auto i= EnemyList.begin(), end = EnemyList.end(); i != end; i++ ) { EnemyList.at( index )->GetState().OnUpdate(); EnemyList.at( index++ )->Draw( cam ); } } public: …

Member Avatar
Member Avatar
+0 forum 1

I have a serious problem with my game right now, after each kill I get the game starts lagging more and more. I thought it was because he was drawing the same thing twice and stuff and went trough some functions that was useless. But I cleaned it up as far as I can see anyways but it dident help. So now I turn to you guys, please help me, I really want to have enemies and not just one boss and I know that having one mayor file with code makes it a bit more difficoult then it would …

Member Avatar
Member Avatar
+0 forum 2

The End.