Sslaxx
|
|
Posted on: December 05, 2013, 09:17:12 am |
|
|
Location: UK Joined: Nov 2013
Posts: 72
|
https://dl.dropboxusercontent.com/u/67740160/TheLastAlpha_TitleTester.egmWhat this is supposed to do is: - rm_Initer sets stuff up in its creation code, then
- It calls rm_Logo, which creates an instance of obj_SslaxxWorks, which creates an alarm, which when counted down
- Calls rm_TitleScreen, which will then create and scroll down the title (from just off-screen)
It works right up to the creation of the title instance, but it then does not scroll down. Bizarrely, it does if you do not go to rm_Logo (i.e., jump straight to rm_TitleScreen from rm_Initer's creation code). Am I running into a bug somewhere, or is it something really dumb I'm doing (I'm a GM newbie, even if I have experience with other programming languages) I haven't realised? Thanks. [EDIT: Bit late now, but next time I'll also try to remember to say what OS I was trying this under - Linux.]
|
|
« Last Edit: December 06, 2013, 09:23:10 am by Sslaxx »
|
Logged
|
Stuart "Sslaxx" Moore.
|
|
|
Goombert
|
|
Reply #1 Posted on: December 06, 2013, 02:03:58 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Thanks for the test case Sslaxx, that really helps in resolving this issues. However, sadly I am not able to reproduce the issue as your title screen loads and does scroll down to the center with no changes to the file :\ I tested on Windows 7 with all 3 graphics systems and got the same results on the latest version. Notice in the following screen cap it is half way through scrolling.
|
|
|
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.
|
|
|
TheExDeus
|
|
Reply #2 Posted on: December 06, 2013, 02:41:43 am |
|
|
Joined: Apr 2008
Posts: 1860
|
It seems to work for me. At the start there is the Sslaxxworks logo, then after about 2 seconds it goes to The Last Alpha room where the logo slowly goes from top to middle, while a sound is being played. I think that is what you wanted. Are you sure you end up in rm_TitleScreen in your case? Because the only explanation I would have why it's not working for you is because alarm gets broken and you don't even go to rm_TitleScreen and stay in rm_SslaxxWorks.
Also, in rm_Initer's creation code you have "obj_Logo.TitleInCenter = false" which is invalid. Obj_logo isn't created at that point and so you are assigning an unexisting variable. "Obj_logo." doesn't change the whole object, but only an instance. It usually is the last (or the first, can't remember) instance of that object created, but in rm_Initer you don't have that instance at all. It should technically scream about uninitialized variables in Debug mode, but our debugger sadly doesn't catch this right now. It just doesn't really do anything. Also in obj_Logo mouse enter you have "global.TitleInCenter" which is not actually global. So this variable is also uninitialized. If you run Debug, then this will error.
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #3 Posted on: December 06, 2013, 03:02:47 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Could also be related, Harri, to me comitting fixes for persistent object and the room system for Windows only, I've been rather cautious not to break Linux.
|
|
|
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.
|
|
|
|
TheExDeus
|
|
Reply #5 Posted on: December 06, 2013, 08:51:48 am |
|
|
Joined: Apr 2008
Posts: 1860
|
Yet it all does, weird. It doesn't for me on Windows. As the variable is not set, then it defaults to 0, and if (0){} should not execute that sound playing. You seem to have all bunch of weird stuff going on. Are global variables defined in the same way in ENIGMA (i.e. using "globalvar" or initializing a "global.<name>" variable with a value)? You can either use global.<name> or "global var name", globalvar is not supported as far as I know. This is because we have variables types as well (unlike GM) and so "global var" could technically be also "global int" and so on.
|
|
|
Logged
|
|
|
|
Sslaxx
|
|
Reply #6 Posted on: December 06, 2013, 09:04:43 am |
|
|
Location: UK Joined: Nov 2013
Posts: 72
|
Yet it all does, weird. It doesn't for me on Windows. As the variable is not set, then it defaults to 0, and if (0){} should not execute that sound playing. You seem to have all bunch of weird stuff going on.
Are global variables defined in the same way in ENIGMA (i.e. using "globalvar" or initializing a "global.<name>" variable with a value)? You can either use global.<name> or "global var name", globalvar is not supported as far as I know. This is because we have variables types as well (unlike GM) and so "global var" could technically be also "global int" and so on.
Yeah, the former sprung up out of misunderstanding what I was reading in GM tutorials and GM:S's help system. As for the latter, I was aware of that, but thought that it'd support variants in a similar fashion it does (at least as far as I understand) with other variables declared similarly. I shall be trying to fix that all up, now that I have a better understanding about it (and now I realise my code basically only worked because of bugs!).
|
|
|
Logged
|
Stuart "Sslaxx" Moore.
|
|
|
|
Sslaxx
|
|
Reply #8 Posted on: December 06, 2013, 11:29:45 am |
|
|
Location: UK Joined: Nov 2013
Posts: 72
|
Yeah, been holding off on updating my ENIGMA install because I know its stability right now isn't guaranteed. Might give that a try and see if it works (assuming it's stable enough to be functional of course). And while I'm at it, https://dl.dropboxusercontent.com/u/67740160/TheLastAlpha_TitleTester_HopefullyLessDerp.egm - fixed up the variables issues (hopefully!). EDIT: Updated to the latest Git as time of typing (with some minor editing to gcc_backend.cpp), and it works as expected under Linux.
|
|
« Last Edit: December 06, 2013, 12:17:59 pm by Sslaxx »
|
Logged
|
Stuart "Sslaxx" Moore.
|
|
|
|