Jump to content


Photo

Functions that DON'T exist in GMS


  • Please log in to reply
31 replies to this topic

#1 King Tetiro

King Tetiro

    King of Orenna

  • GMC Member
  • 2463 posts
  • Version:GM:Studio

Posted 04 March 2012 - 02:44 PM

Today, I found that variable_local_exists isn't in GMS currently. So what I recommend is we construct a list of functions that aren't currently in GMS that are in GM8.0+. This way, we can get onto testing the product fully without making the mistake of using functions that don't exist like I did lmao.

No Longer in GM
  • Miscellaneous variables and functions (variable_local_exists('var'), etc)
  • Joystick Functions (joystick_xpos(id), etc)
  • Dynamic Parsing (object_event_add(), etc)
  • object_set_parent
  • surface_create_ext(name,width,height)
  • mouse_set_up/down
  • Executing stuff (execute_file, execute_string, etc)
  • Editing Object Events
  • Draw_sprite_pos
  • 3D (HTML5 only)
  • argument_count (Either non-existant or broken)
  • window_get_mouse_x/y (Broken on Android)
  • string_byte_at(str, index)
  • ansi_char(val)

If you find functions or anything like that which don't exist, lemme know and I'll add it to the list. Also, if you find NEW functions, lemme know and I'll make a list of that too. In the mean time, I'm going to be looking through the Help file to find missing functions.

Newcomers
  • Yoyo Functions

Edited by King Tetiro, 20 March 2012 - 07:44 AM.

  • 1

#2 GameDevDan

GameDevDan

    YoYo Games Staff

  • Administrators
  • 1213 posts
  • Version:GM:Studio

Posted 04 March 2012 - 03:27 PM

I bloody hate the Help File lol


That's why YYGs hired Nocturne. To clean it up :D

Also, if you find NEW functions, lemme know and I'll make a list of that too


Start typing "YoYo_" into the code editor and you'll get a list of a ton of new functions.
  • 0

#3 iSeiren

iSeiren

    www.worrall.pw

  • GMC Member
  • 610 posts
  • Version:GM:Studio

Posted 04 March 2012 - 06:04 PM

Lots of New Functions

Spoiler

Edited by iSeiren, 04 March 2012 - 07:20 PM.

  • 0

#4 YellowAfterlife

YellowAfterlife

    GMC Member

  • Global Moderators
  • 3929 posts
  • Version:GM:Studio

Posted 04 March 2012 - 07:10 PM

<snip>

Please put that inside a [ spoiler ] tag.

Some functions I notice missing are object_event_add\object_event_clear\execute_string\execute_file - everything related to dynamic parsing overall.
  • 0

#5 Rani_sputnik

Rani_sputnik

    GMC Member

  • GMC Member
  • 413 posts
  • Version:GM:Studio

Posted 05 March 2012 - 09:17 AM

I believe dynamic parsing was removed because of the obfuscation pass in HTML5 (In case you were after a reason).

I haven't noticed anything else missing but I did open a demo that doesn't work because of a seemingly rouge function; surface_create_ext(name,width,height).
I don't remember that function existing before studio, but even in studio it doesn't work. It's hinted in the code, but then fails to compile. Obviously not a major though :)
  • 0

#6 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1917 posts
  • Version:GM:Studio

Posted 05 March 2012 - 02:34 PM

I believe dynamic parsing was removed because of the obfuscation pass in HTML5 (In case you were after a reason).


Dynamic parsing is missing in HTML5 and the other newer runners because they no longer include a gml compiler and interpreter. Dynamic code creation in GM has been done before because the runner included code to turn gml into executable code directly, which was extremely slow(though useful at times). Now, Yoyo has considered that something that is not necessary, and I have to agree with them. There are ways to do things without dynamic compilation of code at run-time. It is also a bit of a security measure, in that if you were loading gml from a file to execute(say to define objects, or for "expansions") someone could modify those files easily. Also, it means the end user will not have any access whatsoever to the gml compiler, and it will be that much harder to hack the games. Sure, they could just get access to GM, but it is at the least one more barrier.
  • 0

#7 Erik Leppen

Erik Leppen

    GMC Member

  • GMC Member
  • 2507 posts
  • Version:GM:Studio

Posted 05 March 2012 - 02:45 PM

mouse_wheel_up and mouse_wheel_down don't seem to work.

get_open_filename and get_save_filename don't seem to work right now. I really really hope these will be added soon, I use them in a lot of projects, especially for level editors.
  • 0

#8 alexandervrs

alexandervrs

    GMC Member

  • GMC Member
  • 681 posts
  • Version:GM:Studio

Posted 05 March 2012 - 02:59 PM

get_open_filename and get_save_filename don't seem to work right now. I really really hope these will be added soon, I use them in a lot of projects, especially for level editors.


Windows, Mac and Android do support those, however I think iOs is a little picky on the filesystem department.
Also in HTML there's no way to invoke the File open dialog rather than clicking on a file input field for... "security" issues.

Joystick Functions (joystick_xpos(id), etc)


Joystick functions work, both DirectInput and XInput devices... it's just not available for the mobile or web platforms

Edited by alexandervrs, 05 March 2012 - 03:06 PM.

  • 0

#9 zbox

zbox

    GMC Member

  • GMC:Member
  • 1711 posts
  • Version:Unknown

Posted 05 March 2012 - 09:51 PM

Draw_sprite_pos isn't there :(

#10 Chrscool8

Chrscool8

    Call me Chris.

  • GMC Member
  • 2104 posts
  • Version:GM:Studio

Posted 05 March 2012 - 10:20 PM

Is the Include Files option panel fixed? Like, is it like GM8.1's or HTML5's broken one?
  • 0

#11 nbeerbower

nbeerbower

    GMC Member

  • GMC Member
  • 467 posts

Posted 06 March 2012 - 01:02 AM

object_set_parent doesn't work :(
  • 0

#12 King Tetiro

King Tetiro

    King of Orenna

  • GMC Member
  • 2463 posts
  • Version:GM:Studio

Posted 06 March 2012 - 08:39 AM

I have updated the list for functions that don't exist. Keep em coming folks!
  • 0

#13 VikingAntics

VikingAntics

    GMC Member

  • GMC Member
  • 217 posts
  • Version:GM:Studio

Posted 06 March 2012 - 04:57 PM

I have updated the list for functions that don't exist. Keep em coming folks!


Hi King Tetiro,
Your original entry in the list on variable_local_exists/variable_global_exists was correct. It is in the editor, but it does not work under Studio/HTML5 version when you run your game. You will get an error in the debug window. Not sure for Android & iOS, but I think it is the same.

Thanks for your efforts.
  • 0

#14 Doogie_Forever

Doogie_Forever

    Dog Warrior

  • GMC Member
  • 824 posts
  • Version:GM:Studio

Posted 07 March 2012 - 08:08 AM

argument_count doesn't seem to exist or at the very least is broken in it's execution

VMError!! Occurred - Push :: Execution Error - Variable Get argument_count
at Script.magic_create (line -1) - <unknown source line>

[NOTE: It's already been committed to the bug reports.]

Edited by Doogie_Forever, 07 March 2012 - 08:09 AM.

  • 0

#15 Rani_sputnik

Rani_sputnik

    GMC Member

  • GMC Member
  • 413 posts
  • Version:GM:Studio

Posted 07 March 2012 - 08:14 AM


I believe dynamic parsing was removed because of the obfuscation pass in HTML5 (In case you were after a reason).


Dynamic parsing is missing in HTML5 and the other newer runners because they no longer include a gml compiler and interpreter. Dynamic code creation in GM has been done before because the runner included code to turn gml into executable code directly, which was extremely slow(though useful at times). Now, Yoyo has considered that something that is not necessary, and I have to agree with them. There are ways to do things without dynamic compilation of code at run-time. It is also a bit of a security measure, in that if you were loading gml from a file to execute(say to define objects, or for "expansions") someone could modify those files easily. Also, it means the end user will not have any access whatsoever to the gml compiler, and it will be that much harder to hack the games. Sure, they could just get access to GM, but it is at the least one more barrier.


I'd love to know your reference for this info... They are using a C++ runner. That in itself suggests that gml is interpreted. There is a compilation pass that is used for a speed up, but Mike has said in the pass that GML wont be compiled because it produces fatal crashes as opposed to friendly errors. Perhaps I am misunderstanding you?
  • 0

#16 Pokemonrey

Pokemonrey

    GMC Member

  • GMC Member
  • 53 posts

Posted 07 March 2012 - 10:46 PM

i believe the splash_show_web related functions are not working here either, such as opening to a certain part of a website, or just opening a website
  • 0

#17 Exe_Mas

Exe_Mas

    GMC Member

  • GMC Member
  • 161 posts

Posted 08 March 2012 - 02:53 AM

is instance_deactivate_all() working? In html5 and c++ runner fully works, but in Android it freezes and I can't reactivate objects.

Edited by Exe_Mas, 08 March 2012 - 03:32 AM.

  • 0

#18 dark_master4

dark_master4

    GMC Member

  • GMC Member
  • 1222 posts
  • Version:GM:Studio

Posted 08 March 2012 - 02:46 PM

I've got a couple:
- All DLL related functions (They're trying to be cross-platform.)
- sprite_get_texture
- draw_primitive_*
- screen_redraw/refresh
- All 3D functions are missing
- All mplay functions are missing (With DLLs removed, no multiplayer possible with the current version of Studio.)
- sprite_create_from_surface crash the game.
- You can't use # for a new line in draw_text
- instance_count

That's all I could find for now.

Edit: Added sprite_create_from_surface.
Edit2: # for new line.
Edit3: Added instance_count.

Edited by dark_master4, 08 March 2012 - 04:00 PM.

  • 0

#19 Exe_Mas

Exe_Mas

    GMC Member

  • GMC Member
  • 161 posts

Posted 08 March 2012 - 05:21 PM

Did anybody test the instance_deactivate_all? I can't imagine another pause engine without persistent rooms and instance_deactivate not working :(...
  • 0

#20 scurvycapn

scurvycapn

    GMC Member

  • GMC Member
  • 187 posts
  • Version:GM:Studio

Posted 08 March 2012 - 06:02 PM

I just tested instance_count and instance_deactivate_all and both worked just fine for me under C++ and Android.

Edited by scurvycapn, 08 March 2012 - 06:03 PM.

  • 0

#21 dark_master4

dark_master4

    GMC Member

  • GMC Member
  • 1222 posts
  • Version:GM:Studio

Posted 08 March 2012 - 07:09 PM

I just tested instance_count and instance_deactivate_all and both worked just fine for me under C++ and Android.

instance_count works? Didn't for me with the C++ runner.
  • 0

#22 Exe_Mas

Exe_Mas

    GMC Member

  • GMC Member
  • 161 posts

Posted 08 March 2012 - 07:22 PM

I just tested instance_count and instance_deactivate_all and both worked just fine for me under C++ and Android.

Thanks, but you could reactivate the objects again?
  • 0

#23 Exe_Mas

Exe_Mas

    GMC Member

  • GMC Member
  • 161 posts

Posted 08 March 2012 - 10:24 PM

Now it works, the issue seemed to be the sprite_create_from_screen function. I will try do it with surfaces for now. Thank you!
  • 0

#24 King Tetiro

King Tetiro

    King of Orenna

  • GMC Member
  • 2463 posts
  • Version:GM:Studio

Posted 10 March 2012 - 08:50 PM

Ok guys I'll update the topic tomorrow. Could someone clarify the following functions for Android and iOS?

game_end()
game_restart()

Would be nice to know if they work or not.
  • 0

#25 Kouri

Kouri

    GMC Member

  • GMC Member
  • 158 posts
  • Version:GM:Studio

Posted 10 March 2012 - 11:08 PM

Ok guys I'll update the topic tomorrow. Could someone clarify the following functions for Android and iOS?

game_end()
game_restart()

Would be nice to know if they work or not.


Working on my end. I've been using game_end() on the key-backspace-pressed event to end the game when the Back button is hit in Android. I've also used game_restart() without issue on my devices.
  • 0

#26 King Tetiro

King Tetiro

    King of Orenna

  • GMC Member
  • 2463 posts
  • Version:GM:Studio

Posted 11 March 2012 - 09:17 AM


Ok guys I'll update the topic tomorrow. Could someone clarify the following functions for Android and iOS?

game_end()
game_restart()

Would be nice to know if they work or not.


Working on my end. I've been using game_end() on the key-backspace-pressed event to end the game when the Back button is hit in Android. I've also used game_restart() without issue on my devices.


So game_end() does work on Android? Good good. Anyone know if it does on iOS?
  • 0

#27 WWAZman

WWAZman

    GMC Member

  • GMC Member
  • 1239 posts
  • Version:GM:Studio

Posted 18 March 2012 - 05:55 AM

TLDR and I'm kinda drunk..

I want a YoYo function.. that functions as a YoYo! .. no more wading around in precious code timing, I can have that platform do the YoYo maneuver! It's EASY!.. no wait, it's EaSy!
  • 1

#28 joshuaallen64

joshuaallen64

    GMC Member

  • GMC Member
  • 720 posts
  • Version:GM:Studio

Posted 18 March 2012 - 07:49 AM

It would seem window_mouse_get_x and window_mouse_get_ydon't work on android.


  • 0

#29 King Tetiro

King Tetiro

    King of Orenna

  • GMC Member
  • 2463 posts
  • Version:GM:Studio

Posted 18 March 2012 - 09:47 AM

Updated the list folks. Keep em coming
  • 0

#30 ObsidianNovels

ObsidianNovels

    GMC Member

  • GMC Member
  • 555 posts
  • Version:GM:HTML5

Posted 18 March 2012 - 07:24 PM

What is this "YoYo_EnableAds(x,y,w,h,freq)"? Sounds intriguing.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users