Results 1 to 10 of 18

Thread: Ponx - High DPI aware PONG style game for Linux

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by Jonax View Post
    I could learn a useful thing from the code. The Hypot function. I wasn't aware about that one, and I do use the Pythagoras a lot in my coding. I will use Hypot from now on instead of writing the whole sqrt(x*x+y*y) thingie.
    I strongly recommend you also check other functions in Math unit. I'm pretty sure you might find some other useful functions there. Also some of the functions in Math unit are also optimized to be able to make use of hardware acceleration making them more efficient.

  2. #2
    Quote Originally Posted by SilverWarior View Post
    I strongly recommend you also check other functions in Math unit. ..
    Nice. I'll have a look at the math unit. As you say there might be some other useful function I've missed. Even better if there is hardware acceleration.


    I have uploades a minor update to Ponx. Verision 0.92 now has somewhat smoother speed transition. Not totally smooth but better than before.


    The paddle got to wait for now but I haven't given it up totally, yet.
    Last edited by Jonax; 16-05-2022 at 09:39 AM. Reason: missed tag

  3. #3
    Update:

    New version with rounded Paddle and slightly different gameplay uploaded.

    Version number now 0.96 so there may be room for some further adjustments before the 1.0 release.
    What happened to versions 0.93 - 0.95? Except for 0.95 which briefly appeared they never made it. Failed approaches but learning experiences, I say.

    Ponx 0.96 for Linux is downloadable from:

    https://www.jonax.se/Linux.php

    ponx096.png

    Is compiled on Debian but runs on openSuSE also. Haven't tried other distros yet..
    Last edited by Jonax; 24-05-2022 at 02:35 PM. Reason: Minor adjustments

  4. #4
    Quote Originally Posted by Jonax View Post
    New version with rounded Paddle and slightly different gameplay uploaded.
    Let me guess. You decided to go with rounded edges on the paddle in order to simplify physics when ball hits edge of the paddle since this way you can actually use physics of two balls bouncing of each other.

  5. #5
    Quote Originally Posted by SilverWarior View Post
    Let me guess. You decided to go with rounded edges on the paddle in order to simplify physics when ball hits edge of the paddle since this way you can actually use physics of two balls bouncing of each other.
    Indeed thus the rounded edges. Round objects are so much easier. Though I took some liberties with the physics of bouncing. For further simplification of course. And for somewhat improving the gameplay, I hope. And when you mention bouncing balls I have an idea of making a remake of an ancient bouncing balls program I once made in Delphi 3. But no promises there. Haven't even started yet. Though I figure some code from this program can be recycled there.

  6. #6
    Quote Originally Posted by Jonax View Post
    And when you mention bouncing balls I have an idea of making a remake of an ancient bouncing balls program I once made in Delphi 3.
    Well if this old game you mention is heavily physics based then you should perhaps consider using some existing physics engine in that game instead of trying to handle all the physics yourself.

    Lately Box2d https://code.google.com/archive/p/box2d-delphi/ is considered as a basic 2D based physics engine that many Delphi developers use. Now while the headers are designed for Delphi I'm guessing you should not have to much trouble compiling them with FPC just make sure you enable Delphi mode https://www.freepascal.org/docs-html/prog/progse74.html (might not be necessary) and Advanced Records (which already seem to enabled by default in FPC 2.6.0 and newer) since the headers heavily rely on using them.

    Or perhaps you might decide to use Kraft Physics Engine https://github.com/BeRo1985/kraft instead. Kraft Physics Engine is much more advanced and also fully supports 3D physics. It is being used in Castle Game Engine https://castle-engine.io/ which is one of the most popular pascal based game engines lately.

  7. #7
    Thanks SilverWarior. I got to have a look at those engines. I just spawned a new Virtual Machine for the purpose. Noticed a new Lazarus version recently arrived. Though seems to be mostly smaller adjustments this time. But that's the easy part. The tricky thing will be to try out those physics engines.

    Meanwhile I will make an other attempt to handle the physics myself in the upcoming heavily physcis based game, or program. If it ever gets done of course. It's easy to talk about games to do but then really finishing them is a totally other matter. And I haven't even started yet..

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
  •