Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: PGDmC: Knight Fever

  1. #11
    Quote Originally Posted by Winwardo View Post
    Considering that the computers at my school where I want this to be able to play can barely run OpenGL and require all textures to be a power of 2 in size, I thought I'd put it down to 512x512 just incase. It would be using practically the same amount of memory either way, but this way I can be definite that it will run on older machines.
    (We're talking horrible beige clacky keyboards and towers here in some cases, not a pretty sight)
    You mean really old computers? Sounds like 10+ years old. Not that an old computer is useless but it is getting a bit hard to accept computers without at least half-decent GPUs.

  2. #12
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Also most newer cards, even the fairly older ones mind you, don't nessiccarily need to be 1:1 scale (square). They can be rectangular in size as long as both dimensions are each power of 2. So for example a 'modern day' card should support 512x1024 sized textures, but it never hurts to test this.

    There is a tool that used to be hosted on Delphi3D.com before when the site was still online. It was a great resource from way back that has since turned into a ghost site and eventually inactive. It was called glinfo and when ran, it would tell you exactly what maximum size your textures could be on that system. Great for testing systems and your development system to set yourself a target minimum/maximum for OpenGL version and specs.

    There is this other one now that should work for most platforms that you can develop for using Object Pascal. It's called GLview 3.0 and it'll work on win32/64 and Mac OS X as well as iOS and Android devices too. Maybe see if they'll let you run this program on your school? It was approved for the iPhone/iPad by Apple so that kinda says something. Worked alright when I ran in on my devices.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #13
    Considering that the computers at my school where I want this to be able to play can barely run OpenGL and require all textures to be a power of 2 in size, I thought I'd put it down to 512x512 just incase. It would be using practically the same amount of memory either way, but this way I can be definite that it will run on older machines.
    (We're talking horrible beige clacky keyboards and towers here in some cases, not a pretty sight)

    Thanks for the info though, was not aware of 4096^2 textures being supported at all
    TIP:
    you can determine at runtime the maximum texture size that is allowed using the following code:

    Code:
    var
    max_texturesize: integer;
    
    ....
    
    ....
    glGetIntegerv(GL_MAX_TEXTURE_SIZE, @max_texturesize);
    
    if max_texturesize >= 1024 then
    (code to load 1024X1024 texture)
    else
    (code to handle lower texture sizes)
    Last edited by Jimmy Valavanis; 30-03-2012 at 04:07 PM.

  4. #14
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Wait, theres a limit on tex size? I have a practice of loading everything to textures etc and Ive done 12 megapixels on my Radeon 4330 and GMA 4500MHD no problems at all (the gma was a little sluggish) but other than that no hitches... I would say 2048x2048 is pretty clean nowadays - most screens exceed at least one dimension of that 1024x1024 limit after all

    Now, that is an elegant solution there jimmy - noted for prometheus
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  5. #15
    Quote Originally Posted by code_glitch View Post
    Wait, theres a limit on tex size? I have a practice of loading everything to textures etc and Ive done 12 megapixels on my Radeon 4330 and GMA 4500MHD no problems at all (the gma was a little sluggish) but other than that no hitches... I would say 2048x2048 is pretty clean nowadays - most screens exceed at least one dimension of that 1024x1024 limit after all

    Now, that is an elegant solution there jimmy - noted for prometheus
    Yes there is definitely a limit to texture sizes, even on latest video cards If you try and load too many textures, or too large ones, then the card will swap in/out textures and other data to fit and your program will drop FPS like nothing else if you are not careful...

    cheers,
    Paul
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  6. #16
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    glGetIntegerv is a very handy function for getting whatever piece of information from your system supports from OpenGL and other non-OpenGL values.

    My system coincidentally can support 2D and 3D textures at 8196x8196 and 8196x8196x8196 respectively. And after trying it on my Mac, I'd highly recommend try out GLview. Tells you a lot of useful information should you get deep into OpenGL and 3D programming.

    GLview webpage
    Jason McMillen
    Pascal Game Development
    Co-Founder





  7. #17
    Another medieval game for the contest! We have 3, right?

    The current graphics looks cool. It reminds me the good old ZX and MSX games.
    No signature provided yet.

  8. #18
    Quote Originally Posted by ?ëu?±o Mart??nez View Post
    Another medieval game for the contest! We have 3, right?
    It is just 1/3 of the games, hardly a strong trend. And medieval themes are among the most popular ones. Medieval and SF. Are there two SF games or more?

  9. #19
    The game is practically ready for upload, I just need to get all the art finished and into the game. Here's the main menu and a pic of you ingame.





    The gameplay is very simple, two buttons for attacking, three buttons for movement, goblins spawn progressively faster as time goes on, and anytime a goblin dies without you killing it (such as in a lava pit) you lose points. Will have the game up ASAP

    EDIT: Also, it suffers from a crippling bug that closes the game due to accessing a bad part of memory. I can't replicate this bug, and even with a try except statement and other stuff, it still SIGSEGVs.

    Code:
    function grabCollisionArrayPixel(xz,yz:integer;xx,yy:integer) : byte;
    begin
      if ((yz mod 512) = 0) then inc(yz);
      if ((xz mod 512) = 0) then inc(xz);
      if(yy < 1) then yy := 1;
      if(xx < 1) then xx := 1;
      try
        result := arrayCollisionPixels[yy,xx]^[ (512 * (yz mod 512)) + (xz mod 512) ];
      except
        raise exception.create('Bad memory access');
        writeln('SIGSEGV noted');
        result := 255;
      end;
    end;
    If anybody could help me with stopping this from crashing I would majorly appreciate it. It's certainly not xx and yy being out of bound, and the second value can range from 0 to 262144. By my calculations, (512 * (yz mod 512)) + (xz mod 512) should never be larget than 262143, even if yz and xz are both 511. So any ideas?
    Last edited by Winwardo; 16-07-2011 at 02:59 PM.

  10. #20
    function grabCollisionArrayPixel(xz,yz:integer;xx,yy:intege r) : byte;
    begin
    if ((yz mod 512) = 0) then inc(yz);
    if ((xz mod 512) = 0) then inc(xz);
    if(yy < 1) then yy := 1;
    if(xx < 1) then xx := 1;
    try
    result := arrayCollisionPixels[yy,xx]^[ (512 * (yz mod 512)) + (xz mod 512) ];
    except
    raise exception.create('Bad memory access');
    writeln('SIGSEGV noted');
    result := 255;
    end;
    end;

    If anybody could help me with stopping this from crashing I would majorly appreciate it. It's certainly not xx and yy being out of bound, and the second value can range from 0 to 262144. By my calculations, (512 * (yz mod 512)) + (xz mod 512) should never be larget than 262143, even if yz and xz are both 511. So any ideas?
    What about if yz or xz are negative?
    eg
    xz = -10;

    xz mod 512 gives a result -10 (!!)
    Last edited by Jimmy Valavanis; 30-03-2012 at 04:08 PM.

Page 2 of 3 FirstFirst 123 LastLast

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
  •