ENIGMA Forums

Contributing to ENIGMA => Proposals => Topic started by: MrGriggs on December 15, 2010, 08:02:23 am

Title: Random speed ups and slow downs with compiled games
Post by: MrGriggs on December 15, 2010, 08:02:23 am
As explained in the subject I have been experiencing "random speed ups and slow downs with compiled games" that are generated from ENIGMA, I have tried both the "Run" and "Compile" options and both return the same results, not only does fraps report a differance in frame rate for the application, the game does noticably run faster and slower randomly (Character suddely moves fast corresponding to the times that the frame rate also changes).

I have a feeling it has something to do with the bbox collisions although I'm not sure, I am still testing with this to try and confirm it.

I have noted developers such as Josh with this problem I'm experiencing and would like to know if anyone else has been experiencing it as well.



http://www.megaupload.com/?d=JNZPH2KH Link to .exe (With speed ups/slowdowns) Hold up for jump then move left and right for a bit you will notice it after a while... Well... Hopefully.



Thank you  :)


I'm on windows 7 Professional 64 bit
q6600 Processor 3.30@ghz
ati hd 5770
Title: Re: Random speed ups and slow downs with compiled games
Post by: TheExDeus on December 15, 2010, 10:54:28 am
Can you give us the .gmk/.gm6/.gm7 so we can test it too? I haven't experienced any slow downs or speed ups. Its sound like you don't have limited room speed (fps) and so it runs as fast as it can (which can also cause slow downs, or at least seem slow compared to running lightning fast).
Title: Re: Random speed ups and slow downs with compiled games
Post by: MrGriggs on December 15, 2010, 01:57:25 pm
Will do I'll upload it about 10 tonight, if you can can you also upload an .exe for me to try out that you compiled yourself or by someone who reports not having such issue so I can try it out :)
Title: Re: Random speed ups and slow downs with compiled games
Post by: MrGriggs on December 15, 2010, 06:06:32 pm
Here is the source.

Running a syntax error check does not return any errors within LGM.


[23:15] <MrGriggs> i can still compile other games btw
[23:15] <MrGriggs> it's just that one in particular
[23:16] <MrGriggs> i've even tried copying the code into another
[23:16] <MrGriggs> same error

http://www.megaupload.com/?d=SR0K4IU6

It seems enigma won't even compile it now...

Code: [Select]
Scouring for Make
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-pc-mingw32
Make detected. Accessile from `\MinGW\bin\mingw32-make.exe`. Informing the Envir
onment.

Scouring for Java
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
Calling `\Program Files (x86)\Java\jre6\bin\java.exe -jar l*.jar`

Java Version: 10600 (1.6.0_22)
Loading lib files in C:\Users\Lee\Desktop\Enigmer\lgm16b4.jar
01_move.lgl 02_main1.lgl 03_main2.lgl 04_control.lgl
 05_score.lgl 06_extra.lgl 07_draw.lgl
[all] [all]
[all] [none]
Info: jna.jar is not an LGM plugin: java.lang.Exception: No plugin entry point (
LGM-Plugin)
Auto-update disabled: SvnKit missing, corrupted, or unusable. Please download to
 plugins/shared/svnkit.jar in order to enable auto-update.Info: svnkit.jar is no
t an LGM plugin: java.lang.Exception: No plugin entry point (LGM-Plugin)

Initializing Enigma:
Linking up to IDEProbing for GCC...
Scouring for Make
ENIGMA: Failed to create process `cpp'.
Good news; it should seem I can reach make from `'
ENIGMA: Failed to create process `/MinGW/bin/make'.
ENIGMA: Failed to create process `/MinGW/bin/make.exe'.
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-pc-mingw32
ENIGMA: Failed to create process `/MinGW/bin/gcc'.
3.4.5
GCC located. Path: `/MinGW/bin/gcc.exe'
Successfully loaded GCC definitions
12dirs:
"/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/"
"/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/mingw32/"
"/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/backward/"
"/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/"
"/MinGW/bin/../lib/gcc/mingw32/3.4.5/include/"
"/mingw/lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/"
"/mingw/lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/mingw32/"
"/mingw/lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/backward/"
"/mingw/lib/gcc/mingw32/3.4.5/../../../../include/"
"/mingw/include/"
"/mingw/lib/gcc/mingw32/3.4.5/include/"
"/mingw/include/"
Parsing settings...





ERROR! IDE has not specified a target networking library!









Opened ENIGMAsystem/SHELL/Graphics_Systems/OpenGL/Config/win32.ey









Opened ENIGMAsystem/SHELL/Audio_Systems/OpenAL/Config/win32.ey




Clearing IDE editables... Rewriting API switchboard header... This could hurt co
mpile time.
Clearance checked.
Creating swap.
Initializing global scope.Undefining _GLIBCXX_EXPORT_TEMPLATE
Dumping whiteSpace definitions...Opening ENIGMA for parse...
Successfully parsed ENIGMA's engine (175ms)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Initializing EDL Parser...
Grabbing locals...
Finding parent...found >> Checking ancestor object_collisions
 >> Checking ancestor object_transform
 >> Checking ancestor object_graphics
 >> Checking ancestor object_planar
 >> Checking ancestor object_basic
Determining build target...




Starting platform inspection
 - ENIGMAsystem/SHELL/Platforms/./About.ey: Failed!
 - ENIGMAsystem/SHELL/Platforms/../About.ey: Failed!
 - ENIGMAsystem/SHELL/Platforms/.svn/About.ey: Failed!
 - ENIGMAsystem/SHELL/Platforms/Android/About.ey: Failed!
 - ENIGMAsystem/SHELL/Platforms/Cocoa/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/iPhone/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/platforms_mandatory.h/About.ey: Failed!
 - ENIGMAsystem/SHELL/Platforms/Win32/About.ey: Opened.
 - ENIGMAsystem/SHELL/Platforms/xlib/About.ey: Opened.
 Done.
time taken to load file: 37 ms
Initializing dialog boxes
Initialized.
Building for mode (0)
Cleaning up from previous executions
Finding parent...found >> Checking ancestor object_collisions
 >> Checking ancestor object_transform
 >> Checking ancestor object_graphics
 >> Checking ancestor object_planar
 >> Checking ancestor object_basic
Grabbing locals
Location in memory of structure: 04E44280
File version: 600

Error: Incorrect version. File is too old for this compiler.COPYING SOME F*CKING
 RESOURCES:
Copying sprite names [1]
Copying sound names [0]
Copying background names [1]
Copying path names [kidding, these are totally not implemented :P] [0]
Copying script names [0]
Copying font names [kidding, these are totally not implemented :P] [0]
Copying timeline names [kidding, these are totally not implemented :P] [0]
Copying object names [2]
Copying room names [1]
SYNTAX CHECKING AND PRIMARY PARSING:
0 Scripts:
"Linking" scripts
`Linking' 0 scripts in 0 passes...
Completing script "Link"
Done.
2 Objects:
 obj_p: 12 events:
  Event[0]:   Parsing 1 sub-events:
Check `obj_p::create...Done. Starting parse...Second pass...done. <collecting va
riables...
Collecting some variables...
Adding `Move' because that's just what I do.
Adding `Left' because that's just what I do.
Adding `Right' because that's just what I do.
Adding `bl' because that's just what I do.
Adding `bt' because that's just what I do.
Adding `br' because that's just what I do.
Adding `bb' because that's just what I do.
Adding `Grav' because that's just what I do.
Adding `Jumping' because that's just what I do.
Adding `JumpAmmount' because that's just what I do.
 done>Done.
  Event[3]:   Parsing 1 sub-events:
Check `obj_p::step...Done. Starting parse...Second pass...done. <collecting vari
ables...
Collecting some variables...
  Calls script `keyboard_check'
Ignoring `vk_up' because it's a global.
  Calls script `collision_bbox_rect'
Ignoring `obj_4' because it's a global.
Ignoring `x' because it's a shared local.
Ignoring `bl' because it's already a local.
Ignoring `y' because it's a shared local.
Ignoring `bt' because it's already a local.
Ignoring `x' because it's a shared local.
Ignoring `br' because it's already a local.
Ignoring `y' because it's a shared local.
Ignoring `bb' because it's already a local.
Ignoring `JumpAmmount' because it's already a local.
Ignoring `Jumping' because it's already a local.
Ignoring `JumpAmmount' because it's already a local.
  Calls script `collision_bbox_rect'
Ignoring `obj_4' because it's a global.
Ignoring `x' because it's a shared local.
Ignoring `bl' because it's already a local.
Ignoring `y' because it's a shared local.
Ignoring `bt' because it's already a local.
Ignoring `JumpAmmount' because it's already a local.
Ignoring `x' because it's a shared local.
Ignoring `br' because it's already a local.
Ignoring `y' because it's a shared local.
Ignoring `bb' because it's already a local.
Ignoring `y' because it's a shared local.
Ignoring `JumpAmmount' because it's already a local.
Ignoring `JumpAmmount' because it's already a local.
Ignoring `JumpAmmount' because it's already a local.
  Calls script `collision_bbox_rect'
Ignoring `obj_4' because it's a global.
Ignoring `x' because it's a shared local.
Ignoring `bl' because it's already a local.
Ignoring `y' because it's a shared local.
Ignoring `bt' because it's already a local.
Ignoring `x' because it's a shared local.
Ignoring `br' because it's already a local.
Ignoring `y' because it's a shared local.
Ignoring `bb' because it's already a local.
Ignoring `Grav' because it's already a local.
Ignoring `Grav' because it's already a local.
Ignoring `Grav' because it's already a local.
Ignoring `y' because it's a shared local.
Ignoring `Grav' because it's already a local.
Ignoring `Grav' because it's already a local.
Ignoring `Move' because it's already a local.
Ignoring `Move' because it's already a local.
  Calls script `keyboard_check'
Ignoring `vk_right' because it's a global.
Title: Re: Random speed ups and slow downs with compiled games
Post by: MrGriggs on December 15, 2010, 06:24:50 pm
I ran two tests, one using the collision system and one without, yet with both I experienced random fluctuations in speed.

It seems that at a room speed of 30 fraps indicates that the fps is steadily 50, then it will go up  to 60 (Increasing the visible speed movement of everything) then it will idle there, then drop down again randomly. This is while I'm not doing anything else in the background.
Title: Re: Random speed ups and slow downs with compiled games
Post by: TheExDeus on December 15, 2010, 06:37:02 pm
You could of just added the source as an attachment. They are small enough to be allowed. I waited a whole minute just to get downloading. :D
Title: Re: Random speed ups and slow downs with compiled games
Post by: MrGriggs on December 15, 2010, 06:37:46 pm
Sorry about that, I hadn't realised that there were attachments allowed on this forum :\
Title: Re: Random speed ups and slow downs with compiled games
Post by: TheExDeus on December 15, 2010, 06:44:25 pm
Also, I am too not able to compile the source. It just froze at parsing. Josh should take a look at that.
But I did run your posted exe and I don't experience any speed difference. Jumped and moved around for about 3 minutes and it seemed to go the same speed all the time. You should of added: room_caption=string(fps) somewhere in step/draw event, because I don't know if FPS dropped, I can just tell you that it seemed smooth to me.
Title: Re: Random speed ups and slow downs with compiled games
Post by: MrGriggs on December 15, 2010, 06:48:31 pm
Yeah, I get the same error, I could compile it before I updated the SVN. Then after I was returned with all that "is not a global variable" and such.
Title: Re: Random speed ups and slow downs with compiled games
Post by: MrGriggs on December 15, 2010, 06:59:43 pm
http://www.megaupload.com/?d=FWK4D7AZ

Here is an exe where the fps is displayed and is most noticeable with the slowdowns.

Strange how it stays cleanly at 400, then drops to 100 and stays at that cleanly, then back up without jitter...


The only code in this game is this
Code: [Select]
x+=1
if x-128>room_width x = x=-128

room_caption=string(fps)

In the "normal step" event.
Title: Re: Random speed ups and slow downs with compiled games
Post by: Josh @ Dreamland on December 15, 2010, 09:58:27 pm
It was a syntax error the checker missed. Most of the parsers didn't give a shit (the formatter never gives a shit), but the variable harvester was pretty pissed about it.

Fixed r566.
Title: Re: Random speed ups and slow downs with compiled games
Post by: TheExDeus on December 16, 2010, 08:16:48 am
http://www.megaupload.com/?d=FWK4D7AZ

Here is an exe where the fps is displayed and is most noticeable with the slowdowns.

Strange how it stays cleanly at 400, then drops to 100 and stays at that cleanly, then back up without jitter...


The only code in this game is this
Code: [Select]
x+=1
if x-128>room_width x = x=-128

room_caption=string(fps)

In the "normal step" event.
That is also smooth for me. Thou I don't get 400fps, but only 76/81, but quite constant 76/81. That counter can jump between the two numbers, but the fps in the game itself is more constant. So I don't experience any large slowdowns/speedups. And didn't you mean:
if x-128>room_width x = x-128
Title: Re: Random speed ups and slow downs with compiled games
Post by: MrGriggs on December 16, 2010, 12:25:25 pm
http://www.megaupload.com/?d=FWK4D7AZ

Here is an exe where the fps is displayed and is most noticeable with the slowdowns.

Strange how it stays cleanly at 400, then drops to 100 and stays at that cleanly, then back up without jitter...


The only code in this game is this
Code: [Select]
x+=1
if x-128>room_width x = x=-128

room_caption=string(fps)

In the "normal step" event.
That is also smooth for me. Thou I don't get 400fps, but only 76/81, but quite constant 76/81. That counter can jump between the two numbers, but the fps in the game itself is more constant. So I don't experience any large slowdowns/speedups. And didn't you mean:
if x-128>room_width x = x-128


You are correct, the game now compiles, thank you :).


Still experiencing random 400 - 100 fps with the .exe I uploaded... Also does it in my platform game, 60 - 50, which is a noticeable speed difference.



The .exe that I am experiencing the issue with is set to a stupidly high 400 room speed, though...
Title: Re: Random speed ups and slow downs with compiled games
Post by: RetroX on December 16, 2010, 04:53:08 pm
400-100 is likely just your CPU/GPU.  That's probably normal.
Title: Re: Random speed ups and slow downs with compiled games
Post by: TheExDeus on December 16, 2010, 05:15:43 pm
Is ENIGMA forced with vsync? Because I actually wandered why I get only 76-81fps with that example where there is nothing going on. Only three lines of code. I went to my curve's example's last room where there is much more calculations and drawing and I got the exact number which jumps exactly between 76/81Fps. I have 75Hz, and ENIGMA's fps variable is known to be unstable (where FPS itself is not). So FPS could in reality be limited to 75Hz.
Title: Re: Random speed ups and slow downs with compiled games
Post by: RetroX on December 17, 2010, 04:12:22 pm
As far as I know, VSync is still turned on, unless Josh turned it off.  You can probably force it with your driver settings.