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.
Printable View
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.
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.
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.
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.
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.