Search found 1042 matches

by monkeycracks
Sun May 24, 2009 10:05 am
Forum: Code Snippets
Topic: Hexagon Grids
Replies: 5
Views: 2535

Hexagon Grids

Here you can find my Hexagon Grid project. It doesn't currently have any plans to be used by me, but it was a fun learning process. I based the code from an article that I found at http://www.codeproject.com/KB/graphics/hexagonal_part1.aspx. It's fairly easy to use, with the code being: #include &qu...
by monkeycracks
Sun Jan 18, 2009 4:06 pm
Forum: Beginners Help
Topic: Texture quality
Replies: 4
Views: 485

Texture quality

The textures seem to become extremely blurred or their quality reduced after they are a certain distance from the camera. I've tried this with Anti Aliasing on and off, same result. Using OpenGL : http://img228.imageshack.us/img228/6166/badxu3.png Anyone know what's happening here and how to fix it?
by monkeycracks
Sun Nov 23, 2008 3:28 pm
Forum: Beginners Help
Topic: Singleton question
Replies: 19
Views: 1780

That's what I was thinking. Murcho has the constructor and destructor both public in his IrrSingleton class. Me confused.
by monkeycracks
Sun Nov 23, 2008 2:14 pm
Forum: Beginners Help
Topic: Singleton question
Replies: 19
Views: 1780

@Murcho -snip- Just curious, doesn't having the constructor as public make it quite possible to just do new Engine();? @rogerborg I suppose using globals would be fine, but why would I use a global instead of a singleton? Less code i suppose, but it doesn't give me my plastic scissors that I so desi...
by monkeycracks
Sun Nov 23, 2008 10:32 am
Forum: Beginners Help
Topic: Singleton question
Replies: 19
Views: 1780

Either way works for me, and I thought one of the points for using a singleton was to not have to pass pointers around. For example, in the IrrWizard framework they pass the GameManager class around to each state, but in my framework I only have a GameManager class for init and release of core objec...
by monkeycracks
Sun Nov 23, 2008 10:02 am
Forum: Beginners Help
Topic: Singleton question
Replies: 19
Views: 1780

Fair enough.

Is there any reason to store the pointer rather than just use Class::Instance()->displayHello();?
by monkeycracks
Sun Nov 23, 2008 8:45 am
Forum: Beginners Help
Topic: Singleton question
Replies: 19
Views: 1780

Singleton question

I've been studying the singleton design pattern lately, and there's something I don't quite understand. In this example : #include <irrlicht.h> #include <iostream> class CCore { private: CCore() { } static CCore* m_instance; public: static CCore* Instance() { if(m_instance == 0) { m_instance = new C...
by monkeycracks
Tue Nov 18, 2008 2:31 am
Forum: Beginners Help
Topic: Removing an element and resizing a vector
Replies: 14
Views: 708

I'm using a std::list now, and this was a good opportunity for me to learn iterators. Thanks for the tip on how to do it with vectors though.
by monkeycracks
Mon Nov 17, 2008 7:05 pm
Forum: Everything 2d/3d Graphics
Topic: B3D not working (loader or export?)
Replies: 15
Views: 2442

Why don't you post the settings you exported with, what code you use to load the model, and etc. etc. etc.

This gets asked every time. Please just do it from now on.
by monkeycracks
Mon Nov 17, 2008 3:03 am
Forum: Beginners Help
Topic: Removing an element and resizing a vector
Replies: 14
Views: 708

Sweet, well thruogh some printfs I've found that it behaves as expected and automatically resizes, so I'm pretty happy. Thanks for the nudge towards iterators and stuff.
by monkeycracks
Sun Nov 16, 2008 10:52 pm
Forum: Beginners Help
Topic: Removing an element and resizing a vector
Replies: 14
Views: 708

std::list<Object*>::iterator i; for(i = objList.begin(); i != objList.end(); i++) { if((*i) == PointerToObject) { delete (*i); objList.erase(i); break; } } Correct? Edit : Blindside, I would try that, but I switched to an std::list rather than std::vector. Is there any advantage to using the Irrlic...
by monkeycracks
Sun Nov 16, 2008 10:34 pm
Forum: Beginners Help
Topic: Removing an element and resizing a vector
Replies: 14
Views: 708

Thanks JP. I never would've caught the break. I was thinking using a list might be better here, but I wasn't really sure. I've never really gone in-depth with iterators, lists, and vectors so maybe I'll do some reading then.
by monkeycracks
Sun Nov 16, 2008 1:08 pm
Forum: Beginners Help
Topic: Removing an element and resizing a vector
Replies: 14
Views: 708

Removing an element and resizing a vector

I'm holding some objects in a std::vector and I'm not quite sure how to go about removing a choice element from the vector and resizing it(if this is even necessary). So far I've got this : for(int x = 0; x < (int)vec.size(); x++) { if(vec[x] == pointertoobject) { delete vec[x]; } } This is great an...
by monkeycracks
Fri Nov 14, 2008 11:36 am
Forum: Project Announcements
Topic: IrrPhysx 0.2 - Nvidia Physx 2.8.1 wrapper
Replies: 425
Views: 111415

The game example was pretty nice. The only buggy thing I noticed was that if you try to jump on the tables it doesn't behave as expected.
by monkeycracks
Thu Nov 06, 2008 3:30 am
Forum: Project Announcements
Topic: [Help Wanted] - Realms of Forlorn Hope
Replies: 129
Views: 27306

You may want to put a few limitations on that (buildings have to be so close to a main plot for each potential town area) so the game doesn't become cluttered with random shops and buildings.