Results 1 to 10 of 45

Thread: ZenGL

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by dazappa
    With Game Maker, which is notoriously slow, it can still handle drawing a max of 6300 sprites at 30 FPS
    What sprites did you use in Game Maker, and what about sorting sprites by layers(in Game Maker)? Also, give me a log file please, and info about your PC. And if you can - attach "benches" here(with sources and exe for Game Maker bench ), please.

    Quote Originally Posted by dazappa
    I think ZGL needs some optimizations somewhere.
    Rendering in ZenGL is well optimized, be sure. Seems only Sprite Engine have some "problem" with stable sorting algorithm, or something happened in your benchmarks
    Last edited by Andru; 12-11-2010 at 06:08 AM.

  2. #2
    Quote Originally Posted by Andru View Post
    What sprites did you use in Game Maker, and what about sorting sprites by layers(in Game Maker)? Also, give me a log file please, and info about your PC. And if you can - attach "benches" here(with sources and exe for Game Maker bench ), please.


    Rendering in ZenGL is well optimized, be sure. Seems only Sprite Engine have some "problem" with stable sorting algorithm, or something happened in your benchmarks
    Aha! Yes I guess I should have expected the image to be critical. I restructured my bench of GM and did another quick dummy test in c++. Basically, they are all even for me now. All get about 3k 128x128 sized miku's drawn on the screen when the fps begins to drop below 30. I guess you have nothing to worry about then! Just me being silly with inaccurate bench marks.

    (So in my case, the limit is my GPU, likely. I have an i5 @ 2.3ghz, and an nvidia 310m) Time to play with ZGL some more now I guess. The particles demo has a warning not to use it in the source, but it seems to have run just fine for me! I can still post my mini-benches if you still want them heh.

  3. #3
    Quote Originally Posted by dazappa
    Aha! Yes I guess I should have expected the image to be critical.
    Yeah, fillrate is very critical

    Quote Originally Posted by dazappa
    The particles demo has a warning not to use it in the source, but it seems to have run just fine for me!
    Particles subsystem is not ready for simple use... all parameters are set by code, and there is no emitter manager in ZenGL for now.
    Last edited by Andru; 12-11-2010 at 07:12 AM.

  4. #4
    Currently playing around with point in poly (which seems to work), but I am very confused with mouse_x()/y() and mouse_dx()/dy().

    Here's a scenario:
    Code:
    if(col2d_PointInTriangle(mouse_X(),mouse_Y(),p1,p2,p3)) then
    begin
       // Visual response
    end;
    
    text_Draw( fntMain, 0, 64, 'FPS: ' + u_IntToStr( zgl_Get( SYS_FPS ) ) +' | '+u_inttostr(mouse_x())+','+u_inttostr(mouse_y()));
    The mouse coords initialize to where the mouse was when the game was launched, but never update after.

    Code:
    if(col2d_PointInTriangle(mouse_DX(),mouse_DY(),p1,p2,p3)) then
    begin
       // Visual response
    end;
    
    text_Draw( fntMain, 0, 64, 'FPS: ' + u_IntToStr( zgl_Get( SYS_FPS ) ) +' | '+u_inttostr(mouse_dx())+','+u_inttostr(mouse_dy()));
    Coords output are changing as I move the mouse, but still no collision response.

    Code:
    if(col2d_PointInTriangle(mouse_X(),mouse_Y(),p1,p2,p3)) then
    begin
       // Visual response
    end;
    No collision response

    Code:
    if(col2d_PointInTriangle(mouse_X(),mouse_Y(),p1,p2,p3)) then
    begin
       // Visual response
    end;
    
    text_Draw( fntMain, 0, 64, 'FPS: ' + u_IntToStr( zgl_Get( SYS_FPS ) ) +' | '+u_inttostr(mouse_dx())+','+u_inttostr(mouse_dy()));
    For some reason this works the way I want it to.

    Anyway, I can't really find docs anywhere so I'm a bit confused about their behaviors, but at least I got it working the way I wanted after some very random guessing.

  5. #5
    The mouse coords initialize to where the mouse was when the game was launched, but never update after.
    Did you watch this demo - "02 - Input"? There are few lines of code in function Timer(at end of it) that very important:
    Code:
      // EN: Necessarily clear all the states.
      key_ClearState();
      mouse_ClearState();
      joy_ClearState();
    Last edited by Andru; 12-11-2010 at 07:14 PM.

  6. #6
    I guess I had misunderstood its function based on the source. I thought it only cleared button states, at any rate it works nicely with mouse_clearState.

  7. #7
    Quote Originally Posted by dazappa
    I thought it only cleared button states
    Under Windows it also clearing yet another state, because WinAPI GetCursorPos is slow function, and ZenGL call it only one time per iteration.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •