Page 1 of 1

GameMaker Question

Posted: Sat Dec 13, 2003 5:45 am
by J. Baker
I not sure if any of you are familiar with the game making software called Game Maker? Well now with Game Maker you can use dll files from other languages to use as you wish with it.

My question is that some one on the Game Maker forum asked about what programming languages would be good for a beginer to make dll's for Game Maker and I suggested Pure Basic. Then some one replied that Pure Basic wouldn't be good for this becuase it doesn't support "doubles". Do any of you know what he meant by this?

Posted: Sat Dec 13, 2003 7:23 am
by Codemonger
Doubles would be in Vb language

A "single" is a single precision float 32 bit and a "double" is a double float or 64 bit variable.

but you could suggest to them that PB does with the user lib support doubles or 64 bit ...

You could also suggest to them how useless Doubles are in game programming as they are so slow ... they are not supported natively by the CPU. And what game would need that kind of accuracy, only CAD programs need that kind of accuracy to reduce artifacts in super high precision math for 3d drawing. That is why DirectX does not contend with OPENGL when it comes to serious CAD programs. OPENGL supports doubles just for this reason. Games do not need this high precision. blah blah blah ... ok I'll shut up

Posted: Sat Dec 13, 2003 7:51 am
by J. Baker
Thanks for the information. I'll pass that on. :D

Posted: Sat Dec 13, 2003 8:15 am
by J. Baker
Is there any information on creating a simple dll and then calling on it from an executable? I would like to see and learn how this is done.

Posted: Sat Dec 13, 2003 10:30 am
by Danilo
Codemonger wrote:how useless Doubles are in game programming as they are so
slow ... they are not supported natively by the CPU.
You talking about what you heared 10 years ago or do you
talk about your own tests you did today? :twisted:

If you talk about your own tests you made today (lets say on
PIII or PIV), i'd like to see your test code. :)

Posted: Sat Dec 13, 2003 5:52 pm
by Codemonger
Funny thing I had a debate about this sort of subject on the blitzbasic forum regarding Math, a while back... Everyone thinks overloading the CPU is OK nowadays, because we have fast processors. Their is no need for double precision math in games, the user will never notice the difference of objects rotating.

You do not need the full "PI" value you only need the first X digits, the end result is not noticeable for realtime applications. Until 64 bit processors become the norm for a CPU, I sure wouldn't use a double.

I have never done a test on this subject as far as speed goes, never had a need for doubles. But you must remeber that lets say in 3D video, and even the BUS of the system, if you are sending out large precision numbers, you will fill the bandwidth of those pipelines quicker and they become slower because you are sending twice as much information. Effectively decreases the speed of data throughput.

The latest articles from the nvidia website on proper usage of vertex and index buffers, suggests to increase speed in your game you should use lookup tables for COS and SIN etc.. A lot of newage people laugh at this. I guess they think they have enough cpu cycles to waste away. In my game X-Hex I used lookup tables and increased the speed dramatically. This of course was only used when I needed to do bulk calculations that could cause potential slow downs.

As far as OpenGl goes, it fully supports Floats or single precision math. It doesn't need to use doubles, they just offer doubles for high-end applications. You will not see it used in games.

Posted: Tue Dec 16, 2003 6:27 am
by J. Baker
Ok, I saw that the user libs have the doubles that I ask about, like you said. How would I use this in a dll or what are the functions of this lib? Thanks :D

Posted: Tue Dec 16, 2003 8:48 am
by venom
You could also suggest to them how useless Doubles are in game programming as they are so slow ... they are not supported natively by the CPU.
Are you sure? Even the pentium supported 80-bit floating point numbers natively.

Posted: Wed Dec 17, 2003 11:00 pm
by Codemonger
Newer processors have many optimizations for more precise floats, but their are still bandwidth limitations and bottlenecks throughout the rest of your computer. UnFortunately I don't make the hardware.

I wish I could use 64bit floats for all my programming, and I could. It's just not realistic right now for realtime applications. that's all. GameMaker is not made for cutting edge games either. We are talking about 2D, and I don't think super precise math is needed for 2D.

Posted: Wed Dec 17, 2003 11:14 pm
by J. Baker
Actually Game Maker can make 3D games with the xception3d.dll which I think is based off the ogre engine.

I just need to know more about doubles so I can use it with GM.

Posted: Thu Dec 18, 2003 5:36 am
by Dreglor
well i try my doing pb with gm maker the only thingk i could do is return strings
and xeceptions dll is based off opengl i think