# Eielef

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

### 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
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! 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 . I wonder if that guy will ever read my reply.

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.

### 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!
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.49873805046081543, "perplexity": 1558.9429739483714}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2013-20/segments/1368701409268/warc/CC-MAIN-20130516105009-00044-ip-10-60-113-184.ec2.internal.warc.gz"}