Pages: 1
  Print  
Author Topic: Ultimate3D 2.1 Ported  (Read 15015 times)
Offline (Male) Goombert
Posted on: May 17, 2013, 12:19:08 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2991

View Profile


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/884

Download the new Portable ZIP here if you don't want to update manually:
http://enigma-dev.org/docs/Wiki/Install:Windows

Enter 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):
Code: (Bash) [Select]
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.
Code: (EDL) [Select]
// 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=0
Size: 1.96 mb's

Website: http://ultimate3d.org/

Special shout out to the creator for helping with this port too!
« Last Edit: December 09, 2014, 11:55:30 pm by Robert B Colton » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) fervi
Reply #1 Posted on: May 18, 2013, 10:55:49 am
Member
Joined: Feb 2013
Posts: 78

View Profile Email
Linux or it didn't happen

Fervi
Logged
Offline (Male) Goombert
Reply #2 Posted on: May 18, 2013, 10:59:30 am

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2991

View Profile
I can't do anything about that I am not the one who wrote it to use DirectX.  :(
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) Ideka
Reply #3 Posted on: May 18, 2013, 12:07:24 pm

Member
Joined: Apr 2011
Posts: 85

View Profile
Why would you even bother then?
Logged
Offline (Male) Goombert
Reply #4 Posted on: May 18, 2013, 02:21:37 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2991

View Profile
Some people requested that I attempt to get it to work it only took me a little bit, and nonetheless at least it provides more capability to ENIGMA. Just putting this here in case anybody is interested in continuing it. However I should mention that the scripts that make dll call backs should be made into an ENIGMA extension and all those scripts hidden from the end user when using the extension.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) Aragon
Reply #5 Posted on: June 05, 2014, 04:01:06 am
Member
Joined: May 2014
Posts: 2

View Profile
Somebody had given another shot on this with any luck? I would love to port my game!
Logged
Offline (Male) Goombert
Reply #6 Posted on: June 05, 2014, 05:11:45 am

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2991

View Profile
No I have not Aragon, it would probably be a good idea for someone to take another shot at it as we are another year into development and have some major improvements such as inheritance, polymorphism, threading, and various bug fixes in major areas.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) Goombert
Reply #7 Posted on: December 07, 2014, 05:30:05 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2991

View Profile
Just an update, this extension has now been almost completely ported and should work about the same as it would with GM: Studio, it requires use of my special modified scripts which can be downloaded above. I had to fix some of our window flags to add the missing flags from GM8.1 that allow child windows to clip and render on top of our main window.
https://github.com/enigma-dev/enigma-dev/pull/884

Download the new Portable ZIP here if you don't want to update manually:
http://enigma-dev.org/docs/Wiki/Install:Windows

Enter 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):
Code: (Bash) [Select]
cd enigma-dev
git fetch
git pull
« Last Edit: December 09, 2014, 11:55:15 pm by Robert B Colton » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Pages: 1
  Print