Pages: 1 2 3 »
  Print  
Author Topic: Summary  (Read 5767 times)
Offline (Male) Josh @ Dreamland
Posted on: March 25, 2010, 10:11:28 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
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
Offline (Male) Josh @ Dreamland
Reply #1 Posted on: March 25, 2010, 10:26:00 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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:
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.
« 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
Offline (Unknown gender) freezway
Reply #2 Posted on: March 25, 2010, 10:55:14 PM

Member
Joined: Dec 2009
Posts: 220

View Profile
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
Offline (Male) Josh @ Dreamland
Reply #3 Posted on: March 25, 2010, 10:57:16 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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
Offline (Unknown gender) freezway
Reply #4 Posted on: March 25, 2010, 10:59:26 PM

Member
Joined: Dec 2009
Posts: 220

View Profile
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
Offline (Male) Josh @ Dreamland
Reply #5 Posted on: March 25, 2010, 11:00:32 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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
Offline (Unknown gender) MrJackSparrow2
Reply #6 Posted on: March 25, 2010, 11:01:25 PM
Member
Joined: Apr 2008
Posts: 35

View Profile Email
That was absolutely gorgeous.
Logged
Offline (Male) Josh @ Dreamland
Reply #7 Posted on: March 25, 2010, 11:04:37 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
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
Offline (Unknown gender) MrJackSparrow2
Reply #8 Posted on: March 25, 2010, 11:06:56 PM
Member
Joined: Apr 2008
Posts: 35

View Profile Email
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.
Logged
Offline (Unknown gender) freezway
Reply #9 Posted on: March 26, 2010, 12:29:55 AM

Member
Joined: Dec 2009
Posts: 220

View Profile
so what does this mean in terms of R4 release date?  :clap: < 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
Offline (Male) kkg
Reply #10 Posted on: March 26, 2010, 04:40:24 AM

Member
Location: Australia
Joined: Nov 2009
Posts: 84
MSN Messenger - kamikazigames@gmail.com
View Profile Email
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.
Offline (Unknown gender) The 11th plague of Egypt
Reply #11 Posted on: March 26, 2010, 04:46:43 AM
Member
Joined: Dec 2009
Posts: 276

View Profile
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.
« Last Edit: March 26, 2010, 04:54:50 AM by The 11th plague of Egypt » Logged
Offline (Male) Josh @ Dreamland
Reply #12 Posted on: March 26, 2010, 08:01:09 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
> 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
Offline (Male) retep998
Reply #13 Posted on: March 26, 2010, 08:09:36 AM

Member
Location: Where else?
Joined: Jan 2010
Posts: 248
MSN Messenger - retep998@charter.net AOL Instant Messenger - retep998 Yahoo Instant Messenger - retep998
View Profile Email
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.
Logged
Offline (Male) RetroX
Reply #14 Posted on: March 26, 2010, 09:51:43 AM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
clock() is accurate for me.

Code: [Select]
#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;
  }
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Pages: 1 2 3 »
  Print