Jump to content
  • Advertisement

warcod3

Member
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

98 Neutral

About warcod3

  • Rank
    Member
  1. warcod3

    What 3d graphic library to use?

    Thank you for your posts. I am trying now irrlicht, and in the far future maybe Ogre. Simon, I just thought the maximum perormance of the libraries vary more, that's why I asked. But as you said, I probabbly won't need that last milisecond that much. Thanks for the library suggestions. :)
  2. warcod3

    What 3d graphic library to use?

    Is it more performant than using glut?
  3. I just started making a game in visual c++ using glut. People say everywhere that glut is not suited for game development, and it is too old. -I really want to know what are glut's limitations, why is it so bad for game development. I like using it, but it is the only 3d library I tried so I can't compare. -And I also would like to know how large is the gap between opengl and directx in terms of performance, -and how hard would it be to learn directx after using glut. (I don't need a library that's cross-platform, I need a lib that works good in windows.) If you don't mind, please suggest some libraries which you know are good.
  4. warcod3

    create/delete objects

    Thanks. I will look into it.
  5. warcod3

    How to avoid depth fighting

    If I'm not wrong, there is no function like 'dedraw'. But why not draw one of the walls with a texture which includes the door? That would be simple too -if I'm not missing something.
  6. warcod3

    create/delete objects

    Thank you all! :) It's working now.
  7. warcod3

    How to avoid depth fighting

    One thing you can do is to use an object which does not draw itself for the door, and let the wall draw the door too. (I think this would be the best.) And another possible thing you can do, is to move the door outside the house by say 0.0001. Or maybe don't have a door object at all, use a texture which includes a door for the house, and check collision with that part of the house.
  8. warcod3

    create/delete objects

    Sorry. obj_list is a list. Thanks, I will try your method with a vector. But am I missing something, because I don't see where you delete the object. Is enough the erase in case of a vector? ->that's what the unique_ptr does? And thanks for the destructor part Stitchs.
  9. warcod3

    create/delete objects

    But I'm erasing it in the destructor. And tried erasing it before and after the 'delete' too. I always get the same error.
  10.     In the last few days I tried to understand some basic concepts in making games, and I'm stuck at the object oriented part. I made a few games in a program named game maker in the last years, and I was trying to implement a similar mechanism in c++.     I don't know much c++, maybe the basics. I created a simple ~simulation, where little cells reproduce and die. My problem is, that I create objects, but can't properly delete them. And that results in eating up the memory. If anyone could help me understand what am I doing wrong, I would be grateful. Here's the code:   The creation code: blbob *tmp; tmp = new blbob; tmp->x = x; tmp->y = y; blbob_numb++; in the while loop: it=obj_list.begin(); while(it!=obj_list.end()) { if((*it)->z==1) { (*it)->step(); it++; }else { it = obj_list.erase(it); } } And if I try to delete it using "delete", i get an error in vc++ and nothing in codeblocks.     in the destructor: ~blbob() { it = obj_list.erase(it); } in the while loop while(it!=obj_list.end()) { if((*it)->z==1) { (*it)->step(); it++; }else { delete *it; } }
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!