Sunrays, skinning, many many many other questions (40 total)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
EinsteinDarkangel
Posts: 31
Joined: Mon Nov 15, 2010 4:36 am
Location: Australia

Post by EinsteinDarkangel »

That is what i propose to do with the demos. Create a framework (of sorts) and evolve it.
Kalango
Posts: 157
Joined: Thu Apr 26, 2007 12:46 am

Post by Kalango »

EinsteinDarkangel wrote:Why doesn't this work?

unsigned long c = mtrand1.randInt();
wchar_t* str = reinterpret_cast<wchar_t*>(c);

The mtrand1.randInt() works fine but somehow the reinterpret_cast function is converting it into hexadecimal code!
Try to use stringw instead of a wchar_t*.
You should also try standart typecast.
EinsteinDarkangel
Posts: 31
Joined: Mon Nov 15, 2010 4:36 am
Location: Australia

Post by EinsteinDarkangel »

How do i convert an unsigned long into wchar_t? All the examples on the net are converting wchar_t to an unsigned long. I havent figured out how to get _ultow working.
EinsteinDarkangel
Posts: 31
Joined: Mon Nov 15, 2010 4:36 am
Location: Australia

Post by EinsteinDarkangel »

standard cast doesnt work, compiler throws up errors, tells me its an 'invalid conversion'
EinsteinDarkangel
Posts: 31
Joined: Mon Nov 15, 2010 4:36 am
Location: Australia

Post by EinsteinDarkangel »

By standard you mean static_cast, right?
EinsteinDarkangel
Posts: 31
Joined: Mon Nov 15, 2010 4:36 am
Location: Australia

Post by EinsteinDarkangel »

I have to keep it in wchar_t, otherwise my compiler will not let me put the string into a IGUIWindow and IGUIStaticText

Would
str += c
work?
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

EinsteinDarkangel wrote:I have to keep it in wchar_t, otherwise my compiler will not let me put the string into a IGUIWindow and IGUIStaticText

Would
str += c
work?
Why dont you just paste it in your project and test?
And please use the edit button, you just double double posted.. :?
Working on game: Marrbles (Currently stopped).
EinsteinDarkangel
Posts: 31
Joined: Mon Nov 15, 2010 4:36 am
Location: Australia

Post by EinsteinDarkangel »

str+=c
doesnt work.
Output is 0x523419c6 using std::cout

Quadruple posted you mean :D

Dou you know how to use _ultow. According to what i have read that is the correct function, but i just cant figure out how to use it!

And that Irrlicht book was really good...though it is a pity google translator doesnt do images :)
Last edited by EinsteinDarkangel on Wed Jan 19, 2011 10:35 pm, edited 1 time in total.
EinsteinDarkangel
Posts: 31
Joined: Mon Nov 15, 2010 4:36 am
Location: Australia

Boost Lexial_Cast

Post by EinsteinDarkangel »

Hopefully figured it out now....i have to use boost lexial_cast, which i will have to download in a couple of weeks once i am off a restriced internet connection. The boost library has somehow got to 37MB in size, so it must contain a lot of stuff. Though i am not sure about conversions with it to wchar_t*. It appers to convert from wchar_t and wchar_t*, but it only appears to convert to wchar_t. What is the difference and how do i convert one to the other?
EinsteinDarkangel
Posts: 31
Joined: Mon Nov 15, 2010 4:36 am
Location: Australia

Micropather

Post by EinsteinDarkangel »

Starting to build up my game framework :D
Going to be a patchwork of many other frameworks.
I have been looking at the Micropather source. How do I get the path from MicroPather into a usable node in Irrlicht?
eg. a line node
And then how do I get a model to follow that path for one frame, then re-calculate the path on the next frame?
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

Don't take this personally or anything, but I think you are taking on a bit too much at once here

You are asking a lot of pretty incoherent questions about random things, if you really want to design a game framework you should start by getting familiar with the simple basic concepts and then go on from there

As soon as you are familiar with everything you can start designing a framework architecture which you can implement, just picking up some small implementations here and there and patching them into one framework will become a huge mess after a while
EinsteinDarkangel
Posts: 31
Joined: Mon Nov 15, 2010 4:36 am
Location: Australia

Post by EinsteinDarkangel »

I am developing the basic framework now, but also i am trying to integrate some other libraries in. That is where all the random questions come from. unsigned long to Wide string is for an additional random number generator that is more effective than the one Irrlicht currently inmplements.
That is what optimization is for.
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

EinsteinDarkangel wrote:I am developing the basic framework now, but also i am trying to integrate some other libraries in. That is where all the random questions come from. unsigned long to Wide string is for an additional random number generator that is more effective than the one Irrlicht currently inmplements.
That is what optimization is for.
Just out of curiosity, why would you need a 'more effective' random number generator? The thing is that these systems mostly have a quality vs time complexity trade-off, and in real-time systems (like a rendering engine) optimization towards lesser time complexity is the way to go most of the time, especially for more or less elementary systems
EinsteinDarkangel
Posts: 31
Joined: Mon Nov 15, 2010 4:36 am
Location: Australia

Post by EinsteinDarkangel »

The Generator is useful when dealing with larger numbers than the in-built Irrlicht one. It is also simpler.

By the way, what is the distinction between .cpp files and .h files? What should i put in each?

Also, is it a better idea to have the menus in my game implemented in functions with the data in classes, or just as functions (this is the main menu, not the in game menu)

If I want to compile my program and then add on external maps generated in a custom map-maker, should I use a scripting language to access build-in functions, and my functions in order to place various objects and assign various objects? Is there a more effective way to do this, other than directly compiling everything together?

For the framework I am first creating the basic types, like the various menus and loaders and SetupGame() functions and distinguishing what each does......if only i could plan this with Gliffy......stupid download limited internet.

Is the Rain Engine a Rain Scene Node for Irrlicht?

What does the SAppContext & context do in the IEventReceiver?
Is it possible to have multiple definitions of this....say so I can Isolate the core drivers from the other stuff used.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

By the way, what is the distinction between .cpp files and .h files? What should i put in each?
You should really grab a a book of c++ or look at tutorials online http://www.learncpp.com/cpp-tutorial/19-header-files/

Code: Select all

Also, is it a better idea to have the menus in my game implemented in functions with the data in classes, or just as functions (this is the main menu, not the in game menu)
you should probably make a class with all the info is needed for a menu, but there are lots of ways to make menu's
If I want to compile my program and then add on external maps generated in a custom map-maker, should I use a scripting language to access build-in functions, and my functions in order to place various objects and assign various objects? Is there a more effective way to do this, other than directly compiling everything together?
Well... also there are some ways to do this, some model formats lets you group things and make nodes out of them, which you can access in irrlicht.
Or you can make your own map editor and save all the info you need in your custom format.
Is the Rain Engine a Rain Scene Node for Irrlicht?
Not sure, you could use particles for that, and maybe modify emitter affectors.
What does the SAppContext & context do in the IEventReceiver?
Is it possible to have multiple definitions of this....say so I can Isolate the core drivers from the other stuff used.
If you read more carefully you would have seen that SAppContex is just a structure that holds:

Code: Select all

struct SAppContext
{
        IrrlichtDevice *device;
        s32                             counter;
        IGUIListBox*    listbox;
};
Working on game: Marrbles (Currently stopped).
Post Reply