GameMaker Question

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
J. Baker
Addict
Addict
Posts: 2192
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

GameMaker Question

Post 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?
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post 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
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
User avatar
J. Baker
Addict
Addict
Posts: 2192
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post by J. Baker »

Thanks for the information. I'll pass that on. :D
User avatar
J. Baker
Addict
Addict
Posts: 2192
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post 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.
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Post 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. :)
cya,
...Danilo
...:-=< http://codedan.net/work >=-:...
-= FaceBook.com/DaniloKrahn =-
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post 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.
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
User avatar
J. Baker
Addict
Addict
Posts: 2192
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post 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
venom
User
User
Posts: 56
Joined: Fri Jul 25, 2003 1:54 pm
Location: Australia

Post 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.
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post 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.
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
User avatar
J. Baker
Addict
Addict
Posts: 2192
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post 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.
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

Post 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
~Dreglor
Post Reply