Jump to content


Eielef

Member Since 04 Dec 2012
Offline Last Active Dec 15 2012 04:56 PM
-----

Posts I've Made

In Topic: The Hunt - looking for feedback

04 December 2012 - 11:51 PM

I think it's a cool idea!! So sad I don't have anyone else to play with right now, but I'll definitely will try it out with my friend tomorrow :lol:
Sometimes simple things are just cool. I actually believe that this concept has potential. With some better graphics (like actual people instead of white blocks) it would be a fine game, but anyway, I really like the game as it is.

I'm kind of new in the developing games world, but I think you did a great job for being your first time. You finished a game! I still haven't been able to acomplish that! :wacko: So, congrats. And I hope you keep programming cooler stuff.

Regards!

P.D: What is the languaje you used?

P.P.D: Ops, I just realised that this was posted like 4 months ago :D. I wonder if that guy will ever read my reply.

In Topic: Musician looking to do soundtracks for free

04 December 2012 - 10:43 PM

Hi there! Good tracks! What software do you use to compose them?

In Topic: Help with std::deque list

04 December 2012 - 10:23 PM

Hmmm, well, I think both have the same functions, so I guess it'll be easy to change to std::vector.

About the debbuger, I actually don't. I guess I should have learned how to use it by now :

Btw, the "DESTRUIR ENEMIGOS" section was there so, if one of the enemies hits the player, then every enemy on game is deleted, so the player can have a break. But since I'm thinking about implementing flags now, Instead of emptying the list, I'll just change the state of the enemies.

Thanks for the advices!

In Topic: Help with std::deque list

04 December 2012 - 09:45 PM

Thank you for the help, I don't know how I didn't see it. I changed the code a little bit now:
void GS_Juego::HandleCollisions() {
for(int i=EnemyQueue.size()-1;i>=0;i--) {
  for(int j=WeaponsQueue.size()-1;j>=0;j--) {
   if(EnemyQueue[i]->CheckCollision(WeaponsQueue[j])) {
	delete EnemyQueue[i];
	delete WeaponsQueue[j];
	EnemyQueue.erase(EnemyQueue.begin()+i);
	WeaponsQueue.erase(WeaponsQueue.begin()+j);
   }
  }
}
for(int i=0;i<EnemyQueue.size();i++) {
  if(EnemyQueue[i]->CheckCollision(Player1)) {
   EnemyQueue.erase(EnemyQueue.begin()+i);
   while(!EnemyQueue.empty()){
	EnemyQueue.erase(EnemyQueue.begin());
   }
  }
}
}
Still, if I shoot several times and I hit an enemy with the first bullet before the rest dissapears, the program crashes and says "deque subscript out of range".

Actually, I didn't use flags because I didn't want to check the list twice, one for checking collisions and one more for deleting, but I just realised I have to check it again when I update all the objects, so I'll change the implementation, since I'm thinking it'll be better for handling destroying animations and all that.

About using the deque list... well, I looked up all of them in the internet, trying to figure it out which one was better to use. I'm not sure yet what's the main difference between std::vector and std::deque, and I don't remember why I'm using std::deque in that code. Do you think it's better to use std::list or std::vector instead?

Thanks again!