Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Any project with Jumper ? — Gideros Forum

Any project with Jumper ?

Hello all,
I'm trying to implement a little project using Jumper for pathfinding, but I'm unable to find a Gideros working project...
Does any of you happen to have any working example to share ?
Kind Regards


  • antixantix Member
    @oleg, there is no "Gideoros" example on using jumper on that site but I was just looking there and it raises an interesting question or two..

    1. Jumper supports a load of different algorithms for pathfinding. Do some perform better than others in certain cases? Which one performs best "on average"?

    2. Should Gideros have a native path finding ability as it would be faster than a Lua based one.. ie; just look at performance of native bump compared to bump.lua!

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • piepie Member
    @antix it works as it is, since it is pure lua: what's missing there is how to actually use it in a gideros game, but I feel it depends on how you would use it inside you project.
    I can share my experience with it, but it is one of the first things I did with gideros some years ago so my memory could not be that accurate.

    I don't think Jumper is a good option for real time games, maybe it is now with coroutines, but I think that there may be issues if you need to change paths "on the run": it returns a table with sub-tables (paths) of coordinates from A(x,y) to B(x1,y1).

    The game where I used it is turn based - and unfortunately still work in progress :smile: .
    Jumper may be used in turn based games without too much hassle since we can move everything of "unit speed" squares, then recalculate the paths for the next turn.

    @chuz0 Here a snippet I did to import a "collision layer" made in tiled into a format suitable to jumper.
    --roads = {datatojumpr ( map.layers[1].data, mapdata["mapwidth"], mapdata["mapheight"] )}
    function datatojumpr ( tble, width, height )
    --mapout will contain the collision values in a format suitable to jumper	
    	local mapout = {}
    	local counter =1
    --make a row of tiled data
    	local function makerow (val, width)
    			local values = {}
    			 for i=1, width do 
    				values[i] = val[counter] 	 				 		
    				counter = counter+1
    	return values
    --for every row, make a row
    		for h=1, height do
    			 table.insert( mapout, makerow(tble, width))
    		return mapout 
    There is some space for optimization here, and I suppose there is in Jumper too with the gideros special math operators.

    A native version would be certainly welcome, but someone would have to write it... and it seems pretty complex to me.
    Overall I remember it to be pretty fast as it is, what has to be avoided is to update a hundred paths on each frame :)

    Which algorithm is faster ishould not be a big issue: there are certainly scenarios where one is better than the other, but it seems to me that this choice is only an option to set when calling the pathfinder: not much work to make a real test directly in a game.

    Likes: Apollo14

    +1 -1 (+1 / -0 )Share on Facebook
  • chuz0chuz0 Member
    Thank you all for you answers. @pie I'll try to find time during the week to test it.
  • antixantix Member
    @pie @chuz0 specifically asked if anyone had an example for Gideros where @oleg just pointed him back to the projects github page.. a page that @chuz0 had most likely already found.. which does not contain the requested information :)

    I was asking about which one generally performs better because if Gideros was to get some native pathfinding.. then it would be better to create one of those algorithms, say A* for example, instead of all of them.
  • olegoleg Member
    @antix I gave that information which I had.
    It's hard for me to write in English so it's easier to give a link

    Likes: SinisterSoft

    my games:
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.