Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Weirdest bug

This topic is 6302 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was writting this small space game, but I changed everything and decided to restart from scratch, or nearly. In the older one I could load tga textures and apply them to quads and everything was working perfectly. I copied those functions into my new game and changed them, these had alwasy worked in all my projects, but somehow they don''t work in the new, one, the problem is this, I always get the same texture applied no matter which I specify. I have looked through the code again and again and again with no results. I even copied and pasted the code from the project that works into the new one, used the graphics from the old one. And then I get always the same texture again ( not the same as before I changed the graphics of course ). I have even started copying initialisation functions and the like Ctr-c and Ctr-V right into my new project and commenting out. I have checked everything. My project settings, my include files... Does someone know what is causing this ? If need be I am willing to post my code. WHO DO THEY THINK THEY''RE FOOLING : YOU ?
GARAL website

Share this post


Link to post
Share on other sites
Advertisement
;-))) You said "functions". This always happens when using functions. Use a clean OOP model with nice classes, asserts and lots of proper commentation. Then you are probably never have such a problem again.

Your descriptiption is far far far to high-level, nobody can help you because they don''t have the slightest idea how your code really looks. Don''t post 20 sites of code and hope that some one will read them, try to post only small parts that focuss on the problem, then you have a good chance that someone picks up the error...

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity

Share this post


Link to post
Share on other sites
Thats what I am going to do. I will encensulate all that graphic stuff in a nice, clean commented class/es which I will redo from stratch. I will comment the whole thing and put error detection. That will be a little more work but in the long run im sure it will prove to be the better decision.

WHO DO THEY
THINK THEY''RE
FOOLING : YOU ?



GARAL website

Share this post


Link to post
Share on other sites
Try to check out what Bas Kuenen wrote on his website. I think we see FAR to less tutorials on engine structure. Just imagine how big an engine with OpenGL, D3D8, AI, Network, Joystick support, BSP trees, skeletal animation, LOD, fmod support and terrain rendering can become !

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity

Share this post


Link to post
Share on other sites
I rewrote the thing in OOP and everything and it works fine. Now Ill just make a derived class from this C_graphic class to handle tiling.

And to beleive just 2 month ago I was a firm anti-OOP beleiver. Let''s just say my mentality has changed a lot in the last few weeks.

WHO DO THEY
THINK THEY''RE
FOOLING : YOU ?



GARAL website

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!