Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 54

Thread: RobotDuel - game for 2 players

  1. #21
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: RobotDuel - game for 2 players

    Hi,

    thanks for the offer Eros, but it seems I don't need any special function now.

    I'm afraid I can't release new version this weekend as I wanted, because I got few mad ideas which I would like to introduce and they are little bit time consuming .

    But they could make the fights more intense.

    At this time I have included:
    + Your pause code
    + Left-Right rocket launch
    + Few optimizations


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  2. #22
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: RobotDuel - game for 2 players

    Problems !

    I'v tested RobotDuel script on computer with 2GHz + Pentium 4 processor, 1 GB RAM and ATi Radeon X600 card. Sadly I can't continue the tests now.

    ... and I was shocked! The script behaved like a crazy one. After few steps with robot the robot returned back to its original location! Even if I fired rockets they "jumped" back after ~1 second. Also the overheat bars indicated the robots are continuously firing but no rockets/explosions were visible!

    Do you have similar terrible experience ? Any ideas ? Could it be done by some spyware/trojan/... running on background ?


    Thanks,
    Petr

    P.S. The game was running about 97 FPS
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #23

    Re: RobotDuel - game for 2 players

    Hi Petr,

    spyware/trojan? I'm not sure if they can drive a robot.
    Did you changed your module recently? Or mixed some TB module with different version?
    May be you are using TB for Win Me in Windows XP box?
    Other scripts running in regular way?

    Please keep us involved.

    Ciao,
    Roberto
    http://www.thinbasic.com

  4. #24
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: RobotDuel - game for 2 players

    No problems here Petr.

    Intel Centrino Duo, WinXP, ATI Mobility Radeon X1600,
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  5. #25
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: RobotDuel - game for 2 players

    Hi Roberto and Eros,

    thanks both for your replies.
    Regarding spyware/trojan/virus suspicion ...

    At first it seemed to me some hidden program is pressing the keys and that makes GetAsyncKeyState confused. But it would not explain why the ( periodical! ) robot and rockets position reset occured. It seemed like a calling of InitGame function every 1 second or so. But that would not make rockets jumping back. Or it could be some strange return value ( negative ) from help_CalcFrameRate proc.

    I used latest thinBASIC 1.0.10.1 and both official TBGL module 0.1.6 and pretty secret 0.1.7 too.

    I'm very confused, because it worked without problems on computers from PII 400MHz, Win 98 to Eros NASA One

    This computer was beetween this configurations, FPS shown were not extreme ( just very high )

    I'll try to get on that computer ASAP, or at least navigate test runs of the owner using email.

    The other TBGL scripts ran well, EXCEPT TBGL_Fun_SpaceShooterGame.tBasic, which showed me static screen with very weird output. I was also unable to get to the graphic drivers ( ATi Catalyst ) setup on that box. Very strange behaviour.


    Thanks,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  6. #26

    Re: RobotDuel - game for 2 players

    Hi Petr,

    I can start the robot but after fews seconds it reset back.

    Game is running on Intel Pentium 4 2.8GHz, ATI RADEON 9200, Windows XP sp2 @77FPS.

    Ciao,
    Roberto
    http://www.thinbasic.com

  7. #27
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: RobotDuel - game for 2 players

    Petr,

    I think the problem is related to help_CalcFramerate script function.
    If it returns low values (1 to 5 or so) than some strange camera shake plus reset occurs.

    It also depends on FPS capacity. On fast video card/computer like mine, script runs at about 140FPS and this problem does not occur or at least it is not so evident.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  8. #28
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: RobotDuel - game for 2 players

    Thanks for the information !,

    now comes the paradox . My brothers PC ( PII400 MHz, 256MB RAM and nVidia Geforce2 MX 400 64 MB) runs the script at 20 FPS. This is not super, but okay.

    Eros runs it at 140 FPS and it runs OK.

    If it returns low values (1 to 5 or so) than some strange camera shake plus reset occurs.
    Yes, then the robots make bigger steps to compensate the speed problems.
    But the probematic box runned it at 97 FPS, Roberto's PC runs it at very high 77 FPS too.

    This is not "extremely low" framerate and it is between two tested framerates

    I run it at 50 FPS and no problem occur.

    It seems 70 - 100 FPS is dead zone But why ? If the queryperformancecounter and queryperformancefrequency would not work, it would mean it would not report logical framerate, but it does.

    The only thing which occurs to me is to declare LastTime, ThisTime as QUADs, because Microsoft Win32API help says

    BOOL QueryPerformanceCounter(
    LARGE_INTEGER *lpPerformanceCount // address of current counter value
    );
    I presume thinBASIC equivalents are wrappers of this API.
    So Roberto, if you can, please try to replace the function mentioned by Eros with this corrected:

    [code=thinbasic]
    '------------------------------------------------------------------
    ' FPS CONTROL - to get the speed and synchronize animations
    '------------------------------------------------------------------
    FUNCTION help_CalcFramerate() AS SINGLE

    GLOBAL LastTime AS quad
    LOCAL ThisTime AS quad
    LOCAL FPS AS quad
    local Divisor as quad

    ThisTime = queryperformancecounter
    Divisor = ThisTime-LastTime
    if Divisor = 0 then Divisor = queryperformancefrequency
    FPS = queryperformancefrequency/Divisor
    IF FPS = 0 THEN FPS = 1
    LastTime = ThisTime

    FUNCTION = FPS

    END FUNCTION
    [/code]


    Thanks,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  9. #29

    Re: RobotDuel - game for 2 players

    Ok, I tryed and it working well!

    Ciao
    Roberto
    http://www.thinbasic.com

  10. #30
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: RobotDuel - game for 2 players

    Ok, I tryed and it working well!
    Yahoo Thanks for this message ! I will update the download this night to protect rest of the World from "Terrible mystery of jumping robots"


    Thanks to you and Eros for suggestions leading to solution of the problem,
    Petr


    P.S. Eros, when you'll have time, would it be possible to change "Returns: Number" to "Returns: QUAD" in help file for QueryPerformanceCounter and QueryPerformanceFrequency ?

    [EDIT] Version 1.6.4 is available for download
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Page 3 of 6 FirstFirst 12345 ... LastLast

Similar Threads

  1. Game: Game modes
    By Michael Hartlef in forum CM contest 2009
    Replies: 16
    Last Post: 05-10-2008, 04:58

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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