Search found 9663 matches

by CuteAlien
Wed May 10, 2006 4:49 pm
Forum: Beginners Help
Topic: A "real" timer
Replies: 6
Views: 600

You can wrap the Irrlicht Timer in an own class for which you can create as many timer instances as you need. I can give you my code as example how i did it - maybe it helps: timer.h: #ifndef TIMER_H #define TIMER_H class Timer { public: Timer(irr::ITimer * irrlichtTimer_, bool startRunning_=false);...
by CuteAlien
Tue May 09, 2006 3:39 pm
Forum: Open Discussion and Dev Announcements
Topic: Game design pattern question
Replies: 2
Views: 333

A good way to find the answer to that is to ask yourself it the class have a "is a" or "has a" relationship. So if the Football player "is a" scene node you would derive it from a scene node. You would have this relations if the football player class does for example en...
by CuteAlien
Thu May 04, 2006 4:33 pm
Forum: Code Snippets
Topic: (C++) Simple speed profiler
Replies: 2
Views: 9649

(C++) Simple speed profiler

Reason for this profiler: Normal profilers like gprof are one way to find bottlenecks, but in games the most important stuff is often the peaktimes of some lines, or we need to find out the times of a specific piece of code. Features: This profiler uses a few defines which can be added in code and c...
by CuteAlien
Tue May 02, 2006 9:10 pm
Forum: Advanced Help
Topic: CLEARING BUFFERS PROBLEM
Replies: 1
Views: 351

Interesting, i have exactly the same problem with OpenGL. I need a seperate call for the z-buffer to clear it, because it doesn't work with the flags. I've also no idea - so far i just use two calls.
by CuteAlien
Tue Apr 25, 2006 12:34 am
Forum: Beginners Help
Topic: Timing
Replies: 8
Views: 851

Making it only static won't make a difference. Additionally you need to call the if statement regularly (for example in main loop). And in most cases it's better to use member variables than static's. Using sleep is the best way to go if you don't want to do anything in your application within that ...
by CuteAlien
Wed Apr 19, 2006 10:35 pm
Forum: Beginners Help
Topic: Problem with lists.
Replies: 10
Views: 430

Your Instance() function does not create an object. It just returns a pointer to an Object which has already been created. If i get it right, what you try to do is dynamically creating objects. You do that by creating them on the heap with new. GameEntity * entity = new GameEntity(); Now you can pas...
by CuteAlien
Wed Apr 19, 2006 5:13 pm
Forum: Beginners Help
Topic: How to create outdoor level?
Replies: 4
Views: 392

For Houses and other Objects you place on the map you usually write an editor. To prevent houses from flying you can place them slighlty into the ground. Sometimes in games people put around the borders where the objects meets the floor some other stuff (like flowers in front of a house) to hide the...
by CuteAlien
Wed Apr 19, 2006 4:50 pm
Forum: Beginners Help
Topic: Problem with lists.
Replies: 10
Views: 430

Sudi wrote:U don't know whats iside his Instance method.......
No i don't, but guessing from the calling convention classname::Instance i guess it might be a static function. Maybe he sets it to return the pointer which he uses as parameter before calling this function, but that doesn't make much sense.
by CuteAlien
Wed Apr 19, 2006 4:43 pm
Forum: Beginners Help
Topic: Problem with lists.
Replies: 10
Views: 430

In AddEntitity you ignore the entity parameter, as i in the first line you'll just get a new pointer to that GameEntity::Instance();
by CuteAlien
Thu Apr 13, 2006 2:15 pm
Forum: Project Announcements
Topic: Created obj + mtl loader
Replies: 42
Views: 27204

hybrid wrote:The new patch just replaces the old one. Maybe I should add a revision to the patches such that the changes becomre more visible. So simply remove the previous patch (patch -R ...), download the new one and apply it.
The link to the patch does not work currently, maybe a typo in the url?
by CuteAlien
Thu Apr 13, 2006 1:24 pm
Forum: Project Announcements
Topic: Created obj + mtl loader
Replies: 42
Views: 27204

I always keep my assets (models, sounds, etc) in a separate sub-directory Yeah, i didn't know how to include that in that patch. I solved that problem slightly different, by not exchanging the original .obj loader but including the new one in my project and adding it as external Meshloader. This wa...
by CuteAlien
Tue Apr 11, 2006 4:04 pm
Forum: Project Announcements
Topic: Created obj + mtl loader
Replies: 42
Views: 27204

I found a page with some description of the .mtl format. Thought no word about colors inversed or not inversed: http://www.csit.fsu.edu/~burkardt/data/mtl/mtl.html For Alpha's it seems the default 1.0 in Maya means no transparence at all, so this seems to be inversed. I guess it would be a good idea...
by CuteAlien
Tue Apr 11, 2006 3:10 pm
Forum: Project Announcements
Topic: Created obj + mtl loader
Replies: 42
Views: 27204

hybrid wrote:Hehe, there was just someone complaining about .obj files inverting the colors without any patch :lol:
Sorry, that was me, i just forgot to mention there that i had the patch installed already.
by CuteAlien
Tue Apr 11, 2006 3:00 pm
Forum: Beginners Help
Topic: Trying to get ambience on purely transparent polygons
Replies: 5
Views: 186

hybrid wrote:Yes, obj files have inverted colors. Use my objmtl.patch to fix this problem.
Hm, i've posted to that already in the other thread ;). Somehowthe patch works for me only if i remove the part where the colors are inverted.
by CuteAlien
Tue Apr 11, 2006 2:47 pm
Forum: Project Announcements
Topic: Created obj + mtl loader
Replies: 42
Views: 27204

Nice work hybrid. My patch really is just a hack that "works", but so far i'm not deep enough in that stuff to provide a good solution and i'd be very glad if this could be done with less buffers :-) But i want to give feedback about another thing: In readColor you invert all the values (2...