Josh @ Dreamland
|
|
Posted on: March 25, 2010, 10:11:28 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Perfect summary of the project today as I tested serp's optimization fix (which was quite full of linker errors): Game Maker Can't do anything fast. ENIGMA Can't do anything right. So. ...Fix'd 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
|
|
« Last Edit: March 25, 2010, 10:46:05 pm by Josh @ Dreamland »
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
Josh @ Dreamland
|
|
Reply #1 Posted on: March 25, 2010, 10:26:00 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Also, for your consideration, what happens if you don't use var for fucking everything (I revised to use int and double): I'd up the room speed, but I know that if my framerate limiter doesn't get it, the vsync will. So... *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: h ttp://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.
|
|
« Last Edit: March 26, 2010, 07:45:12 pm by Josh @ Dreamland »
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
freezway
|
|
Reply #2 Posted on: March 25, 2010, 10:55:14 pm |
|
|
Joined: Dec 2009
Posts: 220
|
GNU/linux executables? EDIT: also GOOD JOB!
|
|
« Last Edit: March 26, 2010, 01:59:33 pm by freezway »
|
Logged
|
if you drop a cat with buttered toast strapped to its back, which side lands down? joshdreamland: our languages are based on the idea that it's going to end up FUBAR /kick retep998
|
|
|
Josh @ Dreamland
|
|
Reply #3 Posted on: March 25, 2010, 10:57:16 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
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*
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
freezway
|
|
Reply #4 Posted on: March 25, 2010, 10:59:26 pm |
|
|
Joined: Dec 2009
Posts: 220
|
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.
|
|
|
Logged
|
if you drop a cat with buttered toast strapped to its back, which side lands down? joshdreamland: our languages are based on the idea that it's going to end up FUBAR /kick retep998
|
|
|
Josh @ Dreamland
|
|
Reply #5 Posted on: March 25, 2010, 11:00:32 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
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.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
Josh @ Dreamland
|
|
Reply #7 Posted on: March 25, 2010, 11:04:37 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
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.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
freezway
|
|
Reply #9 Posted on: March 26, 2010, 12:29:55 am |
|
|
Joined: Dec 2009
Posts: 220
|
so what does this mean in terms of R4 release date? < for all ur hard work.
|
|
|
Logged
|
if you drop a cat with buttered toast strapped to its back, which side lands down? joshdreamland: our languages are based on the idea that it's going to end up FUBAR /kick retep998
|
|
|
kkg
|
|
Reply #10 Posted on: March 26, 2010, 04:40:24 am |
|
|
Location: Australia Joined: Nov 2009
Posts: 84
|
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:!
|
|
« Last Edit: March 26, 2010, 04:43:38 am by kkg »
|
Logged
|
PC: Core i7-2600 @ 3.8ghz | 4x 4gb G.Skill RipjawZ DDR3-2000 | GTX580 | Win7 x64 Time is the greatest teacher, however it kills every single one of its pupils.
|
|
|
|
Josh @ Dreamland
|
|
Reply #12 Posted on: March 26, 2010, 08:01:09 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
> 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.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
|