User Tag List

Page 5 of 5 FirstFirst ... 3 4 5
Results 41 to 45 of 45

Thread: Pathfinding on Android

  1. #41
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I'm afraid I don't have either exporter, so can't help you. As you say, it doesn't use any extensions, so there's no reason why it should behave any differently.

  2. #42
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well the second revision worked, I think I pinpointed the problem down to the way you flooded the array with paths. I'm going to try to combine the two into one tonight and see if that works.

    Edit: It turns out that Android exporter automatically works off floating point values and so my game was trying to get floating point value positions from the array. I put floor() around the start X and Y of the pathfind and it works now.

  3. #43
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, since I can't edit my post now, I thought I should also note that clearing the textual array for the path causes Android games to crash on phones. I was looking through the forums and someone else had this problem with text arrays as well.

  4. #44
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I figured out a solution to the problem until Clickteam fixes this issue. Save a blank array before anything alters it and then just load that array every time you need to clear the array. Using a numerical array doesn't fix the problem either as I tried converting MuddyMole's pathfinding example to purely numerical arrays and it still crashed so use this workaround if you're getting crashes.

    Also also MuddyMole, your final A* pathfind example works without any lag on my underpowered phone so you did a great job. I only have a 10x8 grid however so I don't know how it would fare on larger grids.

  5. #45
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Ryan's Avatar
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    1,279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to chip in as the person who created the Arcane Engine that HappyFrog posted, I think it's possible to do a mobile RTS you just have to keep it small (think mini-RTS).
    - You'll be working on a touch device so the units must be big and easy to select, therefore heavily limit the max supply (perhaps 24, when adding the enemy you'll have 48 total, that's still a LOT of calculation each move)
    - Make the units beefier to account for the lower supply (like they did with Warcraft 3)
    - Run your gameplay events each MOVE, not each frame. A move can be whenever a unit enters a new square. If units are idle don't update their information (their sight distance, position, etc. remain the same).
    - Implement a pinch-and-zoom feature, this means you'll be resizing many tiles very often so keep your tiles big, simple (think cartoon or pixel-art style) and in low number (maps must be small, 10x10 grid is still 100 objects... far too many for mobile, keep the tile number very low by creating many pre-stitched-together tiles, kind of like how you'd design platform game art)
    - Try to avoid many distance calculations, each unit should have a large square to test of overlaps and to see if a unit is within attacking distance. Only if the square overlaps then run the length distance calculation.
    - Consider scrapping fog-of-war, and just fade in&out enemy units when they're in range. Mobile users aren't going to expect bells and whistles, and there's nothing wrong with revealing the map from the beginning. If you still want some mystery in your map, make the fog of war zone-based (when a unit enters an new zone, reveal it). This will free up heaps of processing power do other, more important stuff.

Page 5 of 5 FirstFirst ... 3 4 5

Similar Threads

  1. Setting up the Android SDK for the Android Export Module
    By Jeff in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 2nd October 2013, 04:08 PM
  2. Pathfinding extensions for Android?
    By Disthron in forum Android Export Module Version 2.0
    Replies: 1
    Last Post: 11th May 2013, 06:43 PM
  3. Need Android Class Name and Android Package Name to create my facebook ads
    By paobrasil in forum Android Export Module Version 2.0
    Replies: 8
    Last Post: 17th April 2013, 04:49 PM
  4. [Building Error] Android Dialogs & Android Lights
    By ProdigyX in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 20th March 2013, 10:05 AM
  5. [Bug?] Android Object/Android Menu Combo
    By scottige in forum Android Export Module Version 2.0
    Replies: 5
    Last Post: 9th December 2012, 12:16 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
  •