Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 48

Thread: tankwars kent sarikaya - kryton9

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

    Re: tankwars kent sarikaya - kryton9

    Thanks Kent,

    the way you did the indicator reminds me of old classic game "F-29 Retaliator" ( or something like that ).
    It was flight sim, but it had similar icon used for missiles on hud I think


    Very nice,
    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
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: tankwars kent sarikaya - kryton9

    Glad you liked the new indicator Petr, I think it suits the tank pretty well. It was on my mind for future improvement, but while I was thinking of ai, got it finished.
    There is a bug in the game which will be addressed further down the line. When you move your tank in the z axis, the radar indicator for the shot does not match reality.
    The aspect ratio adjustment is messing it up when I move the tank. I am aware of this bug, but it is not critical for now. The actual 3d world stuff works, it is when translating to 2d and adjusting for aspect that it only messes up in the game z but radar y values. I tried some quick solutions, but none worked.

    Anyways onto the main topic now...

    Petr, I think I know the answer, but I want to make sure with you first.

    Ok, we have:
    Begin Const
    %TankFirst = 1
    %TankLast = Game.NumTanks
    %Tanks
    %Player
    %Light
    %Level
    %PlayerShot
    %Reticle
    %Explosion
    End Const

    But it gets really confusing when we add more elements as:
    Begin Const
    %TankFirst = 1
    %TankLast = Game.NumTanks
    %TankShotFirst
    %TankShotLast = %TankLast + Game.NumTanks
    %Tanks
    %Player
    %Light
    %Level
    %PlayerShot
    %Reticle
    %Explosion
    End Const

    Now you can imagine how confusing it gets when later on in the programs trying to do loops and when you create your arrays.
    The Constants don't match the dimension of the arrays and you get all sorts of errors.

    Right now the only solution I see is to keep offset variables for each entity that is an array, can you think of anything else?

    So I would have an offset variable for any array entity after the first set:
    %TankShotOffset = Game.NumTanks

    Then when I loop the array of TankShots it would look like
    For s = %TankShotFirst to %TankShotLast
    TankShot(s-%TankShotOffset).Alive = 1
    tbgl_EntitySetPos(%Game, s , TankShot(s-%TankShotOffset).Pos.x, TankShot(s-%TankShotOffset).Pos.y, TankShot(s-%TankShotOffset).Pos.z)
    Next

    Of this could also be written:
    For s = %TankShotFirst to %TankShotLast
    s = s - %TankShotOffset
    TankShot(s).Alive = 1
    tbgl_EntitySetPos(%Game, s + %TankShotOffset , TankShot(s).Pos.x, TankShot(s).Pos.y, TankShot(s).Pos.z)
    Next

    As you can see not the cleanest of solutions... just wanted to mention it to you so your super brain can work on it in the background till you find an amazing solution!

    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  3. #23
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    experimental version

    This is just to show why it won't be this way

    This is if the enemy tanks had the same capabilities that we the player would have.
    As you can see, it won't be any fun.

    I just wanted to share this version, so when you do see how it is handled,
    you won't wonder why I didn't do it this way

    Don't set it to difficulty 8, it crashes the game... right now 7 of the 8 tanks fire in the same manner our tank does.
    Same range and distance and ability to shoot. There is no collision tests for enemy shots at all. That will come later when I get a nice shot sequence that will be challenging but not crazy. But as you will see formations will be coming, so it should be pretty fun.

    I removed this attachment as it is outdated now.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  4. #24
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: tankwars kent sarikaya - kryton9

    Thanks to Petr's help and great bug hunting abilities.
    Here is pretty good early version of tanks shooting.
    The major bugs seem fixed with the great help from Petr.

    Not an official release till I add more to it to bring it to version 2.

    Under the Radar there is a tank integrity read out and how many times you have been hit / max hits you can take.

    Version 1.9.5 is in first post.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

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

    Re: tankwars kent sarikaya - kryton9

    Great Kent!
    I'm sorry I cannot contribute more on this project but it seems you are making great progression with this game.
    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

  6. #26
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: tankwars kent sarikaya - kryton9

    Thanks Eros. You are contributing greatly by making thinBasic better and better each day!
    I hope to make good progression today, that is all I dreamed about while sleeping
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  7. #27
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: tankwars kent sarikaya - kryton9

    I'm having fun playing with AI tests today.

    Right now, I have the enemy tanks fire only when they are in range to you. This way you know when you hear a shot, it was fired while the tank was in hitting range. Makes it much better already with that tweak alone.

    The next thing I want to work on that is annoying me is that the tanks right now are always aiming at you. I am using the cool entity command for this:
    TBGL_EntitySetTargetPos ... But it works too well

    You never see the tanks from the sides as before when I had them turning. So I need to replace this with something where the tanks have to turn to find you and you see them turning. I think it is worth the effort to add this as it should make it more interesting visually.

    Just wanted to keep you guys up to date on what is going on.

    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  8. #28
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Version 2.0

    Well, Version 2.0 is here.

    Major changes to it the last 2 days. Right now it is set on the easiest difficulty setting, but with the most tanks, 8.
    You get lots of hits before you get killed, so it is easy and fun.

    It is fun to just go in for a couple of minutes if you want to blow up some tanks and get fired upon. I want it to be a fun little break and not too hard of a game. I think it fits that with my tests.

    I added gamepad support, the standard keys still work as before.

    GamePad:
    Button 2 Forward
    Button 3 Backwards
    Button 6 or 8 Fire
    POVLeft Turn Left
    POVRight Turn Right

    You can go into the Input Subroutine if you want to change the gamepad settings for now.

    Next on the list:
    Splash Screen
    Instructions
    User Settings
    More Formations
    And Levels from easy to difficult depending on user's choices.

    I need help on how to make it turn without using the target command in tbgl. Right now it is too perfect. Once I understand that, then hopefully you will see the tanks in different views than the almost constant head on view.

    Enjoy!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

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

    Re: tankwars kent sarikaya - kryton9

    This is a very good version Kent, very good.
    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

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

    Re: tankwars kent sarikaya - kryton9

    Thanks Kent,

    very nice update!
    Regarding turning ... I prepaired little concept for you, hope it will be usable for the project.


    Petr

    UPDATED VERSION > Smarter and correct turning
    Attached Files Attached Files
    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 5 FirstFirst 12345 LastLast

Similar Threads

  1. tankwars petr schreiber - psch
    By Petr Schreiber in forum TBGL nmg_tankwars
    Replies: 16
    Last Post: 31-05-2008, 18:14

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
  •