ENIGMA Forums
General fluff => Announcements => Topic started by: Josh @ Dreamland on March 25, 2010, 10:11:28 pm
-
Perfect summary of the project today as I tested serp's optimization fix (which was quite full of linker errors):
Game Maker
(http://dl.dropbox.com/u/1052740/GMflame.png)
Can't do anything fast.
ENIGMA
(http://dl.dropbox.com/u/1052740/ENIGMAflames.png)
Can't do anything right.
So.
...Fix'd
(http://dl.dropbox.com/u/1052740/ENIGMAflames2.png)
Today's lessons: Always remember to use unsigned chars when the situation calls for them, and don't be afraid to use an equation that makes sense when calculating framerate. Even when Linux won't let you use clock().
...I'll probably end up externalizing a function that uses clock() on Windows and gettimeofday() on Linux.
Technical blah:
They're actually geometric curves and trig: GM's nightmare, really. I used 20 lines each curve.
Draw
draw_set_color(merge_color(c_red,c_yellow,.3));
draw_set_blend_mode(bm_add);
for (i=0; i<cc; i+=1) {
draw_set_alpha(min(.1,alpha[i]));
for (ii=0; ii<ic; ii+=1) {
draw_line(xo[i]+lengthdir_x(ii,ang[i]),yo[i]+lengthdir_y(ii,ang[i]),xo[i]+lengthdir_x(ic-ii,ang[i]+90),yo[i]+lengthdir_y(ic-ii,ang[i]+90));
}
yo[i] -= vs[i];
ang[i] += rot[i];
alpha[i] -= .001;
if (alpha[i] < 0)
cci = i;
}
room_caption = "Number of particles: " + string(cc) + " FPS: " + string(fps) + " ... Sad, really.";
Step
repeat (2)
{
xo[cci] = mouse_x - 16 + random(32);
yo[cci] = mouse_y - 16 + random(32);
ang[cci] = random(90);
alpha[cci] = .12;
rot[cci] = random(10) - 5;
vs[cci] = .5 + random(2);
cci += 1;
if (cci > cc)
cc = cci;
}
Create
cc = 20;
cci = cc;
ic = 20;
for (i=0; i<cc; i+=1)
{
xo[i] = mouse_x - 16 + random(32);
yo[i] = mouse_y - 16 + random(32);
ang[i] = random(90);
alpha[i] = .12;
rot[i] = random(10) - 5;
vs[i] = .5 + random(1);
}
LGM can't actually pass that to ENIGMA yet, so I copy-pasted the code manually. Crude but effective.
The difference between ENIGMA's and GM's was (in addition to the caption) the repeat() value, which was 8 in ENIGMA.
I allocated like, 60 values more than I seemed to ever need, but you never know.
Anyway, thanks much to serp, who is the reason the game is like 288 KB. As opposed to like 420, which it has been before. He's probably also the reason it runs smoothly, and is certainly the problem I ran into five linker errors copy-pasting code. <3
-
Also, for your consideration, what happens if you don't use var for fucking everything (I revised to use int and double):
(http://dl.dropbox.com/u/1052740/ENIGMAflame3.png)
I'd up the room speed, but I know that if my framerate limiter doesn't get it, the vsync will. So...
(http://dl.dropbox.com/u/1052740/ENIGMAflame4.png)
*Realizes he's being a dumbass*
*uploads executables*
http://dl.dropbox.com/u/1052740/GMflames.zip (Over 9000 sets of at least 100 bytes; estimated forever on dial-up)
http://dl.dropbox.com/u/1052740/SHELL.zip (Three versions included; 300 KB)
Broken old version:
http://dl.dropbox.com/u/1052740/ENIGMAflames.zip (at least a hundred kilobytes, but barely. Like, 30 seconds on dial-up.)
So yes, do feel free to run those. And if for some reason the ENIGMA one doesn't work, errors, segfaults, or by some miracle runs more slowly than Game Maker's, do let me know.
And in conclusion, no, tr0ll, this really never does get old.
-
GNU/linux executables?
EDIT: also GOOD JOB!
-
FACK.
My Linux box is presently sleeping off a headache. Ehhh... I'd tell you to download serp's GIT repo, but I don't have the link and wouldn't wish it on anyone. *shrug*
WINE should be kind to ENIGMA... It doesn't use very much...
*Fumbles a liveCD into nearby computer*
-
OOOH it does work... i get ~33fps at ~2k particles
EDIT: does this mean R4 is coming soon, also i need to think out my post more before i post 'em.
-
Good, that liveCD was 64Bit. >_<
And yes, it does. Ism gave me some structures I needed, and I'll be returning one to her tomorrow.
-
That was absolutely gorgeous.
-
Grazie. I was pretty pleased Vista didn't bite me. And neither did my odd texture-binding checks; there was no speed difference with or without them.
-
I ran it on Windows 7, so I had no Vista issues. I knew Enigma would dominate GM, I just didn't know the true extent of it's rapage until now. I am thoroughly impressed! I can't wait to get my hands on R4.
-
so what does this mean in terms of R4 release date? :clap: < for all ur hard work.
-
Game maker: 271 particles at 24 fps
ENIGMA: 2033 particles at 29.44 fps
Fuck haha, nice work man :)
Really looking forward to all the work you're all putting in. I'll be sure to contribute in any way I can when it comes to testing time. I've been following this site every day ^_^
EDIT: Those results were on Win7 Pro 64-bit on the system in my sig. Also, If the ENIGMA window went out of focus for a while, once I opened it back up the particles would disappear straight away instead of fading away. The particle number did not change though. D:!
-
20.5 fps with 1955 particles for Enigma
16-17 fps with 260 particles for GM
on my Win 7 laptop with an Ati 4570 card.
Why do you need 2 different cc and cci variables?
BTW I see you just bought GM8.
-
> so what does this mean in terms of R4 release date?
Every time I set a release date, something goes wrong and I end up needing more time.
> Why do you need 2 different cc and cci variables?
One tells me how many objects I'm drawing. The other recycles the array to prevent reallocation.
-
30 fps with 2000 particles on a college computer.
Win xp pro loaded with antivirus and other college shit
Intel core 2 duo 2.2GHz
ATI FireGL v5200
I'll test it at home eventually.
GM can only hit 19 fps with 260 particles...
Um yeah, enigma is amazing.
-
clock() is accurate for me.
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <cmath>
int main()
{
clock_t current=0,previous=0;
std::cout << 10 << std::endl;
while (true)
{
previous=current;
current=clock();
if (floor(current/CLOCKS_PER_SEC)!=floor(previous/CLOCKS_PER_SEC))
{
std::cout << 10-(double)current/CLOCKS_PER_SEC << std::endl;
}
if (current/CLOCKS_PER_SEC>=10)
{
return EXIT_SUCCESS;
}
}
return EXIT_SUCCESS;
}
-
GM: 260, 5-6 fps
Enigma: 1940, 11.13 fps
Fantastic work, Josh. Are we expecting more speedups in future (not that it needs it) from other work?
I was also impressed by the loading time vs. GM.
-
I'm hoping to improve var's speed from R3's. Have a newer version lying around somewhere. Other than that, not that I can tell. I ran a best-case version of this with beyond-perfect general-purpose optimization, and it ran the same speed. So, I think this is as good as we're getting from lines.
Loading time will increase slightly with sprites, but it shouldn't require a "Loading" form.
I'm just glad it consistently performs faster than GM, with some seven times the particles. XD
-
Looks like R4 is certainly set to silence a few critics/sceptics.
My view is once a collision system is fully integrated (if I was Josh I would personally work on this myself), then the Enigma community base will start to grow considerably. When it reaches that stage I believe peeps from the GMC will finally stand up and notice, and I see it causing a few waves over there.
-
Also, I am going to start correcting you every single time that you say "Linux" and not "GNU/Linux" when you're not referring to the kernel.
-
Retro, it's not a requirement. You can choose either term, and no one's yet 'proved' you have to use one over the other.
RMS is an outspoken idiot. He could use his high profile to actually push Linux adoption rather than petty naming conflicts.
-
Nice. I got a LARGE speed increase compared to GM.
Thou when I launched Enigma for about 1-2minutes (not sure, how long I played with it :D), it crashed. It would be nice if you implemented some logging or something. :P
Here is the not-so-explanatory general purpose Windows useless error:
(http://img340.imageshack.us/img340/9068/crashb.png)
edit: Ou, and my specs (which could help with the diagnostic) are: Core2Duo 2.66ghz E6750, Geforce 8800 GTS 512mb and 2gb ram.
edit2: Here is what that error says when I click the "see what data this error contains" button:AppName: enigmaengine.exe AppVer: 0.0.0.0 ModName: enigmaengine.exe
ModVer: 0.0.0.0 Offset: 0000e73c
I replicated the error with launching the exe for about 3-4 minutes now. Thou both times I had vlc player showing a video (I doubt thats the cause, but I don't have the patience to run the exe for 4minutes without doing anything else :D).
-
i get the wine equiviland of that if i run it for a while
-
I can replicate that as well. Running for a portion of time will indeed crash the game.
(http://img13.imageshack.us/img13/4026/enigmak.png)
-
Heh, don't worry, guys, it wasn't an ENIGMA bug. Just an error with how the particle system was designed (specifically when I started using double instead of var).
Those who are interested can download the fix (and some extra-hoursepower builds, three total):
http://dl.dropbox.com/u/1052740/SHELL.zip
-
woooo it works.... i get like 20 fps on floor, 15 on 4096 and 30-33 on 2048
-
Just curious, but shouldn't an error like that be reported in a more typical fashion, rather than crashing to hell?
-
Retro, it's not a requirement. You can choose either term, and no one's yet 'proved' you have to use one over the other.
People think that tomatoes are a vegetable but they're really a fruit.
Does the fact that most people say the first make it correct?
-
seriously guys? are we really gunna argue over this?
EDIT: dammit, anyone know a good image host. Photobucket is bloated and imageshack is slow.
-
> Just curious, but shouldn't an error like that be reported in a more typical fashion, rather than crashing to hell?
We can have a debate over this if we need, but basically I think it's best to leave errors for the testing phase and let the fast code be fast on its own.
The goal is to incorporate some sort of tracker for bounds overflows, but that can be difficult when a scalar type is used. Also, that's really something for debug mode. :P
-
i was talking about the argument of the correct way to refer to (GNU/Linux)/linux
-
seriously guys? are we really gunna argue over this?
wer gunna
No, really, it's annoying. You don't name your car "engine," yet calling GNU/Linux is essentially doing just that. People don't seem to understand that aspect of it. Not to mention that ChromeOS uses Linux, but it is not GNU/Linux.
Either way, I suppose that I'll drop it, because I'm obviously changing nobody's opinion.
-
Car is significantly easier to type than engine...
-
+1 for that comment!
anyway, what all is left for R4? also, are there gunna be any native binaries of this example?
-
Car is significantly easier to type than engine...
I like car. The car in car is fast and I love how wonderfully fast that car is.
Too bad that there are so many variations of car that it's difficult to decide the balance between which car is the best.
-
> anyway, what all is left for R4? also, are there gunna be any native binaries of this example?
Finishing scopes in the GML formatter and syntax checker; not imperative but still desirable. Formatting with() and implementing improved switch().
That's enough work until Sunday.
Then all that's left is setting up communications between LGM and ENIGMA, including better resource translation and error reporting/lookup.
-
sweet. cant wait!
-
Very impressive =]
-
Very nice. ENIGMA is about 14 times faster, assuming time period is directly proportional to number of particles. ^_^