time-killer-games
|
|
Posted on: September 28, 2013, 01:59:22 pm |
|
|
"Guest"
|
Here's my idea on how to implement os_type for enigma. os_type will return the current platform the game was compiled for. This function is very useful for adjusting which code and which resources are to be used on which platforms. So I'm not entirely certain on how to implement this, but there needs to be an additional constant that can check wether a game was compiled with ENIGMA or if it was with GMS. Something like this:
if (os_type==os_enigma) { // Enigma code here... } else { // GM:Studio code here... }
Since GM:Studio won't recognize the os_enigma variable, I was thinking, os_enigma could be a constant which would automatically be added to every project wth the string "os_enigma" found anywhere in the project code when opened into LateralGM. The constant when saved in GMK or GMX format would be set to os_unknown by default. os_type will not ever return os_unknown which is good because this will help determine whether a game can be auto-checked on which enigne it was compiled with (ENIGMA or GMS).
Then if the game was saved in EGM format the os_enigma constant's default value will be ignored and automatically set to os_type, since os_type is equal to itself, if os_enigma was set to os_type it would always return true when compiled with ENIGMA because EGM format isn't supported by GM:Studio.
Just a suggestion, it should really help if a system like this was implimented. Cheers!
TKG
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #1 Posted on: September 28, 2013, 02:11:33 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
It's already implemented it was implemented years ago, the constants are just named different, somebody needs to go in and rename them.
|
|
|
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.
|
|
|
time-killer-games
|
|
Reply #2 Posted on: September 28, 2013, 03:57:29 pm |
|
|
"Guest"
|
Oh sweet, glad to here it's already been done. You mind providing a link to their wiki page?
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #3 Posted on: September 28, 2013, 04:03:26 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
To whose Wiki page?
|
|
|
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.
|
|
|
|
time-killer-games
|
|
Reply #5 Posted on: September 28, 2013, 06:08:35 pm |
|
|
"Guest"
|
To whose Wiki page?
The wiki page for those constants.
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #6 Posted on: September 29, 2013, 12:24:47 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
http://enigma-dev.org/docs/Wiki/Device_constantsI just checked and os_type is already implemented and working. It returns os_windows, os_win32, os_linux, etc. Depending on your platform.
|
|
|
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.
|
|
|
|
|
time-killer-games
|
|
Reply #9 Posted on: September 29, 2013, 04:04:38 pm |
|
|
"Guest"
|
It makes plenty of sense, I would like to load my images externally for a boost in performance, which works in enigma on all platforms but only if they are in BMP format. background_add() / sprite_add() isn't supported on all the platforms GMS has, but the ones that do work it only does with PNG format.This is just one out of many possible reasons one who want such suggested features.
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #10 Posted on: September 29, 2013, 05:27:28 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
http://enigma-dev.org/docs/Wiki/Device_constants
I just checked and os_type is already implemented and working. It returns os_windows, os_win32, os_linux, etc. Depending on your platform. No TKG I said Ideka's response did not make any sense. That said, png support was working idk how the fuck it broke it quit workin for me too.
|
|
|
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.
|
|
|
time-killer-games
|
|
Reply #11 Posted on: September 30, 2013, 07:49:19 pm |
|
|
"Guest"
|
Well would that not imply the same thing? Never mind. It doesn't matter that much. I wanted a constant for convenience, not because I really needed it.
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #12 Posted on: September 30, 2013, 07:52:08 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
... dude it's implemented?
|
|
|
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.
|
|
|
Ideka
|
|
Reply #13 Posted on: October 02, 2013, 02:37:39 pm |
|
|
Joined: Apr 2011
Posts: 85
|
http://enigma-dev.org/docs/Wiki/Device_constants
I just checked and os_type is already implemented and working. It returns os_windows, os_win32, os_linux, etc. Depending on your platform. No TKG I said Ideka's response did not make any sense. That said, png support was working idk how the fuck it broke it quit workin for me too.
It does make sense. TKG apparently wants to know if the game is running on ENIGMA or GM or whatever. BTW, TKG, why in the world would you use bmp images?
|
|
|
Logged
|
|
|
|
time-killer-games
|
|
Reply #14 Posted on: October 02, 2013, 03:15:08 pm |
|
|
"Guest"
|
I don' t. JPG would be my first choice for compression. But enigma only supports loading BMP. I've read tutorials on the web hat explain loading images, sound, models, etc externally it should give a huge performance boost. Aside from that external resources are also great for letting end users customize the UI, skins, characters, etc.
|
|
|
Logged
|
|
|
|
|