

If some of you are not aware, Ultimate 3D is an API which provides extended and advanced graphics for GameMaker. After some requests I decided to check out getting the SDK example working with ENIGMA. This extension should be built into ENIGMA's extension system instead of the way it currently is, then you wouldn't need to import all those scripts that make the dll callbacks. We could also make a special graphics system for extensions like this which completely disable all graphics output by ENIGMA to make it more optimal than the GM version. This only works on Windows because the extension is based on Direct3D if anyone wants to try it out.
Getting this work required a fix in our window flags which you can obtain from Git or you can simply update to the latest Portable ZIP.
https://github.com/enigma-dev/enigma-dev/pull/884Download the new Portable ZIP here if you don't want to update manually:
http://enigma-dev.org/docs/Wiki/Install:WindowsEnter the following in a terminal or with git-bash.exe if you have the Portable ZIP and want to update manually (you may also need to download the new LGM and plugin jars):
cd enigma-dev
git fetch
git pull
The rest of the porting required removing variable_local_* and variable_global_* function dependence. For Ultimate3DOptions I wrapped the variable initialization in a global.ultimate3d_key_initialized flag to emulate the previous behavior. I have removed the variable initialization for CreateWall or CreateFloor because the user is expected to do it anyway, so I see no reason why this was necessary as it would just make the object invisible if they were not initialized, these really should have just parameters to the scripts. This also requires that "Treat unitialized variables as 0" is enabled in Game Settings->Errors
This is the updated CreateWall() script for instance. I hope these changes are correct and that the original creator would agree with them, since something similar would be necessary to port it to Studio anyway.
// CreateWall()
// This function creates a wall object and associates it with the object
// the function is called by. Before you can call this function you have
// to set the variables x2 and y2 which define where the wall goes to
// from it's origin, the variable height which defines the height of the
// wall and the variable texture which gives the index of the texture that
// is to be used for the wall. For information on optional variables and
// more information on how to use primitive objects read the help file.
Init();
InitializePrimitiveVariables();
/*
if (!ultimate3d_createwall_initialized) {
ultimate3d_createwall_initialized = true;
x2=0;
y2=0;
height=0;
}
*/
u3d_index=external_call(global.u3d_create_wall,x2,y2,height,texture,texx1,texy1,texx2,texy2,partsx,partsy);
if(u3d_index){
u3d_type=7;
}
return u3d_index!=0;
There was another small bug, I had to rename the floor object to floor2, because of the floor function and current naming conflicts.
Download:
https://www.dropbox.com/s/6dbrhs17lr6m290/U3DSDKENIGMA.zip?dl=0Size: 1.96 mb's
Website:
http://ultimate3d.org/Special shout out to the creator for helping with this port too!