Daniel-Dane

If anyone here know about the programming language GML you would know that Game Maker uses DirectX. The problem is whenever one add a real API (button for example) into it, it will get an ugly border around or if it is an edit it will get artifacts. One solution could be to create a static child window beneath to solve it. But I was thinking whether there are other ways. Maybe turn of DX or D3D in the moment and then turn it on I am using a DLL for the API functions.



Re: Game Technologies: Graphics Real API functions in a DX world

Jim Perry

This would probably be better addressed on the GameMaker site.




Re: Game Technologies: Graphics Real API functions in a DX world

Daniel-Dane

1. It is Game Maker, not GameMaker. They are actually two different things.
2. What I can tell you is all we Game Maker's know. The creator of Game Maker (Mark Overmars) haven't -- by what I know -- told anything on how to solve it.
3. Since it is using Direct X (8+) I think this would be a nice place to ask:

How do I put real API in DX





Re: Game Technologies: Graphics Real API functions in a DX world

Ralf Kornmann

Why do you call Win32 window system functions ¡°real API¡±

Anyway it¡¯s a well know fact that standard window controls cannot share the same place with screen space that is draw by with DirectX (Direct3D/DirectDraw). Because of this all DirectX developer uses alternative UI element libraries.






Re: Game Technologies: Graphics Real API functions in a DX world

Daniel-Dane

I call them real because I could code my own, only problem would be it would not change with the windows theme and is quite slow.

And I hoped you wouldn't say this. So that means I can't do anything else than putting a child window into it Well, nothing to do then Sad. Thanks for your help/time.





Re: Game Technologies: Graphics Real API functions in a DX world

Ralf Kornmann

If a window is controlled by DirectX you should not add any child Window to it.






Re: Game Technologies: Graphics Real API functions in a DX world

Daniel-Dane

Why not It does work...





Re: Game Technologies: Graphics Real API functions in a DX world

Ralf Kornmann

As soon as you assign DirectX to a window DirectX is responsible to draw the complete window. You still can add child windows because the window manager doesn¡¯t care about this special behavior of DirectX. But as soon as the child windows try to draw anything to the DirectX controlled space it will end in a great mess.






Re: Game Technologies: Graphics Real API functions in a DX world

Daniel-Dane

In Game Maker DX is loaded into a child window, not the main window. Buttons, for example, do not get messed up. They work normally, the only thing is a black/grey rectangle around them. I just wish that DX didn't suck that much in that particular area :-/ ...




Re: Game Technologies: Graphics Real API functions in a DX world

The ZMan

You will also find that if you switch to full screen you do not see any of the UI elements - in this case DirectX drives the entire screen. You may find that creating your devices using this flag http://msdn2.microsoft.com/en-us/library/bb174432.aspx improves some things but the point is that DirectX is a gaming API and professional game developers do not have any need for the functionality you describe so it is not supported. Its just not designed to do this.

I'm surprised Game Maker doesn't have its own API generating functions or use some of the well written 3rd party ones e.g. http://www.cegui.org.uk/wiki/index.php/Main_Page - I'm not sure how game maker calls external libraries but maybe you can call this directly yourself.






Re: Game Technologies: Graphics Real API functions in a DX world

Daniel-Dane

I've heard -- but never tried -- that nothing works in fullscreen. Luckily I don't care . It is not possible to alter the DirectX settings in Game Maker or with any of the GML (Game Maker Language) functions. I don't know, and highly doubt, that it would be possible with a DLL.

Game Maker is made to create games. That is why it doesn't have its own API. Game Maker is capable of using DLL's. But in a very limited way; it can only use stdcall and cdecl calling conversions and can only use doubles for integers/reals (C++, Delphi, etc) and char* (C++ (Delphi: pchar)). Even though there have been created a numerous number of DLL's for Game Maker which has helped the users a lot.





Re: Game Technologies: Graphics Real API functions in a DX world

Nightmare_BE

hmmm, i would say if u really want to get into game development ... learn directX

I have looked at those "game making" products myself and dint like it. U will allways be limited to the features of that program, while u can do whatever u want when u use DX API





Re: Game Technologies: Graphics Real API functions in a DX world

Daniel-Dane

I am not limited. It is capable of using DLL's. That really helps a lot. If there weren't DLL's like 39dll, SOC or gmsock (all using the windows socket) you wouldn't see any online games.

Professional games have been made many times with GM.

And if I really wanted to use something professional, I would use OpenGL Wink.