User Tag List

Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 40

Thread: Isometric Tank Engine (Real Movement) collide problem

  1. #1
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    warlords's Avatar
    Join Date
    Oct 2011
    Location
    Denmark
    Posts
    717
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Isometric Tank Engine (Real Movement) collide problem



    Isometric Tank Engine (Real Movement)

    This game engine is using s a big map by 2000 * 2000 pixels.
    By Pressing "1" you add a Tank. You add as many you wanted, it can control up to 8 Tanks controlled by a pathfinder system. The rest of the tank will
    follow after the other Tank.

    + Isometric Tank Engine
    + 2D/3D example (2D Topview movement is hidden)
    + Tank Movement (Real movement , not overlap each other)
    + Up to 8 Tanks can be moved by a pathfinder (add more)
    + Mouse Drag - Select Tanks

    Control:
    + Left Click = Move Army
    + Right Click = Shoot in direction of 360 / Deselect Tank

    Patrice Cervellin - Clic+Path - RPG starter Kit from clickstore
    I use this pathfinder from Clic+Path

    Thanks to Nivram, fredetmumu and Patrice Cervellin

    Think Tank af Audionautix er licenseret under en Creative Commons – tilskrivning 4.0-licens. https://creativecommons.org/licenses/by/4.0/
    Kunstner: http://audionautix.com/


    Collide problem:

    I have 4 objects that must be deleted each time you hit at mine!. When you hit a Tank some turrets from other tank
    go below the tank itself!. It reorder the system when delete a four object at same time?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,553
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Nice work!
    As for the turret destruction problem, it's easiest to just use Fusion's built-in object pairing system, instead of messing around with spread values etc.

    + tankHull overlapping mine
    -> tankHull: Subtract 1 from armour
    -> mine: Destroy

    + Armour of tankHull <= 0
    -> Start ForEach loop "destroyTank"

    + On ForEach loop "destroyTank"
    + Pick tankTurret at random
    -> tankHull: Destroy
    -> tankTurret: Destroy

    + Always
    -> tankTurret: Set X to X("tankHull")
    -> tankTurret: Set Y to Y("tankHull")

    Note that it doesn't matter which turret object gets destroyed, because Fusion will automatically position one turret on each hull. A ForEach loop is needed because there's always the chance that two or more tanks might get destroyed at exactly the same time.

    And then for your detectors, you would just say something like:

    + Always
    -> detectorLeft: Set position relative to tankHull
    -> detectorLeft: Set obstacleDetected to 0

    + detectorLeft is overlapping obstacle
    -> detectorLeft: Set obstacleDetected to 1

    + Always
    -> tankHull: Set obstacleDetectedLeft to obstacleDetected("detectorLeft")

    This way, all of your object data is stored in one object (the tankHull), so you never have to worry about which turret/detector belongs to which tank - only that you always have the same number of each.


    A few other thoughts:
    - Shadows under the tanks, shipping containers, etc would really improve the look of the game a lot.
    - The way you're using physics to push the tanks apart, so that they don't overlap, looks bad, as they start to drift sideways - it would be much better to use "flocking" (see also: "boids"), so that they naturally separate, but always move only in the direction they are facing.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    warlords's Avatar
    Join Date
    Oct 2011
    Location
    Denmark
    Posts
    717
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    MuddyMole I agree with you, I use now flocking engine , much better, big thanks

    How will you solved the shadow effect, should it be an image that follow or use Shadow Plugin, but I can't get them in multi objects?

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,553
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by warlords View Post
    How will you solved the shadow effect, should it be an image that follow or use Shadow Plugin, but I can't get them in multi objects?
    Using a separate layer would probably be best.
    Layer 1: Map terrain
    Layer 2: Shadow objects (give the whole layer a "subtract" or "multiply" shader effect, and each foreground object has a matching shadow object)
    Layer 3: Foreground objects (the tanks, buildings, projectiles, etc)
    Layer 4: User interface

    The advantage of a separate shadow layer is that you can have multiple shadows overlapping, but you still only have one level darkness (the shadow doesn't get darker, the more shadow objects overlap).
    I don't think it's worth making the buildings cast shadows on the tanks, but you could. Really, I think you just want a simple effect that makes the foreground objects feel like they are part of the same environment, and not kind of floating in space.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    warlords's Avatar
    Join Date
    Oct 2011
    Location
    Denmark
    Posts
    717
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Create a new app, use shadows object plugin, hit space and try to create shadow object anywhere. The Icon is gone, You can't pick any icon? if you say create at ... you can see the icon!

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,553
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I've never tried the shadow extension, but it does say that it's not compatible with Direct3D (ie. it only works in the "standard" software runtime, not DX9 or DX10), so that's probably the issue. I'd just use actives instead. Since you're using pre-rendered 3D models, that ought to make it easier to generate the shadow graphics.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    warlords's Avatar
    Join Date
    Oct 2011
    Location
    Denmark
    Posts
    717
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)


    I use flocking engine and now a small shadow. Multi select army...

  8. #8
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    warlords's Avatar
    Join Date
    Oct 2011
    Location
    Denmark
    Posts
    717
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Speaking about shadows. I just found a old file and it's called https://megajava.dk/download/autoshadowing2.mfa

    Shadow Engine ver. 1.0 by Andreas Orgetas
    ===========================
    Q - rotate shadow angle CounterClockwise
    E - rotate shadow angle Clockwise

    W - rotation Radius increase (increase _sh_R)
    S - rotation Radius decrease (decrease _sh_R)

    Arrow keys to move

    To use the engine

    1. Copy paste the two actives:
    - Shadow Engine v1.0
    - ShEng_trigger v1.0
    2. Add qualifier "0" to the object you want to be able to produce automatically a shadow, among with the Alterable Values and Flags at the side of this frame.
    3. Tune _sh_R value for each object
    4. Shadows will be placed on Layer 1, all other objects must be set to higher LAyers
    5. Set Layer 1 like the screenshot at the side


    Is it possible to change the code to another image that draw shadow without qualifer? I did try to copy 3 objects from here into my game, but it will not work. Can someone explain why what is happening!
    I also wanted a backdrop image behind the shadow? I need to create at layer 2 instead of layer 1. But Qualifer I think will not work right.

  9. #9
    Clicker Multimedia Fusion 2 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    goblincolony.com
    Posts
    118
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    All the engine does is create copies of each object (with "0" qualifier) then set their position accordingly. All the code is in the "shadow engine v1.0" objects behavior. It's set up in a way to manipulate shadows for dynamic lights. For your purposes I think it would be better to use purpose specific shadow objects and for any moving object just pair them using the same method as with the turrets.

    Though imho, judging from your shadowed version tanks, the quickest easiest way would be to just prebake the shadows in the tank sprite using alpha channel. I don't think overlaps would be that noticable. For the other movable objects such as the crates you'd need separate shadow objects for each (else break collisons).

    What method are you using for flocking btw?

  10. #10
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    warlords's Avatar
    Join Date
    Oct 2011
    Location
    Denmark
    Posts
    717
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    In fact, it is a top view game that has been converted into an Isometric game.

    I have to try more with alpha shadows and yes I forgot my turrets

    I hope I have answered well enough

    Many thanks for the help, I got a lot to think about

Page 1 of 4 1 2 3 ... LastLast

Similar Threads

  1. Isometric Engine Help Please
    By ZeoliteGod in forum Fusion 2.5
    Replies: 2
    Last Post: 27th March 2020, 11:28 PM
  2. Ultimate How-To: Real 3D Isometric Movement
    By JimJam in forum File Archive
    Replies: 5
    Last Post: 31st January 2013, 04:12 PM
  3. Isometric engine
    By DanielH in forum File Archive
    Replies: 7
    Last Post: 7th October 2011, 01:39 AM
  4. Custom Iso Movement Jump/Collide Problem
    By Kid_Roleplay in forum File Archive
    Replies: 8
    Last Post: 21st March 2010, 01:19 PM
  5. Problem with Movement Engine
    By Gerblegod7 in forum File Archive
    Replies: 3
    Last Post: 29th January 2007, 07:49 PM

Posting Permissions

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