Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Any tutorials/code examples for simple platform/RPG style movement WITH collision? — Gideros Forum

Any tutorials/code examples for simple platform/RPG style movement WITH collision?

Seb7Seb7 Member
edited March 2014 in General questions
Been a little busy lately so I'm resuming my Gideros learning. I checked countless tutorials and examples but I cant really find a tutorial, video or not, for a simple platform or RPG game..

I m not talking about the entire game of course - just two simple things: in platform it's character moving left, right, jumping and stopping when it hits the wall. Doesn't even need to use box2d. (there is one by ar2rsawseen i think but it's very incomplete). The simplest as it can get - doesn't even need to have scrollable levels, like Rick Dangerous for example.

in RPG it is maybe centered on the map and then moves in all 4 directions and stops when it hits the wall. Something simple, like Gurk for android.

There are many tutorials on how to move a ball, how maps are displayed,how background is moved and so on but it seems that most are "specific solutions to specific problems" - they don't go one step further and tell us how to merge them. Community is really helpful here but the replies are a answers for a very specific solutions. This means they are made to show how something works but they are not written in a way that would be easily integrated with another part of the game code. It works great when you run that code but when you try to combine two solutions in the same program (for example I know how to make ball move with mouse and I know how to use physics in box2d but when I tried to join this I felt lost - I will post new thread soon to ask about this :) you realize they are written in different way.

Any idea why is Gideros lacking these kinds of tutorials after existing for 3 years, while some other SDK are full of them? Moving a character and checking if it hits the wall are the basic building blocks of every rpg or platform game. I really think that having such tutorials would help Gideros popularity much more, especially for beginners like myself. I think time that Gideros team would invest in such tutorials would be minimal and the benefit would really be much bigger. We are all thankful for all the people who contribute here but having a "Gideros team recommends this way" tutorial would really be helpful. It i unfortunate that Gideros doesn't have them because I much prefer Gideros than some other solutions :)

Again, I am not looking for a finished game - just basic movement and collision checking written efficiently for RPG or platform kind of game.

Any idea where to find those tutorials? Do they exist? Thank you for any advice..

Likes: DungDajHjep

+1 -1 (+1 / -0 )Share on Facebook

Comments

  • If you are happy to convert, there is a library that was an amazing library for RPG type functionality. It is now redundant at the framework for which it was made has changed.

    http://outlawgametools.github.io/Lime2DTileEngine/
    twitter: @ozapps | http://www.oz-apps.com | http://howto.oz-apps.com | http://reviewme.oz-apps.com
    Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
    Cool Vizify Profile at https://www.vizify.com/oz-apps
  • Seb7Seb7 Member
    edited March 2014
    OZApps ,thanks for reply but I'm not sure what to convert? Me converting to Corona? I'd rather use Gideros. Or did you mean convert/port that library to Gideros? How can I do this when I need to learn the simple collision with map first? :)

    Edit: I found one way to search for tutorials and that is search on github.com for "gideros",hopefully I can find something..
  • OZApps ,thanks for reply but I'm not sure what to convert? Me converting to Corona? I'd rather use Gideros. Or did you mean convert/port that library to Gideros?
    @Seb7, if you think I am asking you to convert to C*SDK then you are a very new user into developing with Lua to even think that possibility. Heavens No!! That is not what I am suggesting.

    Graham Ransom, the developer of that library has some amazing code that can be used with a little tweaks (hopefully) with Gideros.
    twitter: @ozapps | http://www.oz-apps.com | http://howto.oz-apps.com | http://reviewme.oz-apps.com
    Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
    Cool Vizify Profile at https://www.vizify.com/oz-apps
  • Seb7Seb7 Member
    edited March 2014
    @OZApps yes, I am very new to not only Lua or Gidero but to mobile developing :)

    @ar2rsawseen thank you, I already saw those. I found few examples on github when it comes to platformers. I am still searching for simple RPG code that would allow me to move character(map) in 4 direction a la Gurk (I am actually trying to do a similar game to one of my Amiga 500 favorites - King's Bounty) with a collision detection.

    Maybe my problem is that I am (mistakenly?) thinking that there will be "one right code" how to do this when I should just use maybe one of the examples provided here and adapt it. But I would not like to waste a lot of time on doing something the wrong way. The thing is that a lot of examples solve it their own way, maybe all the ways are correct and there is no "best" way?

    For example you gave example of tiles and I am not sure how to apply this to a simple RPG (movements in steps)collision - do I draw a map in tiled editor then draw collision layer ALL around every wall,tree etc? Or should we use this only when box2d is used, as in real physics? I think there was one example when someone said that we just move the hero sprite and then check if if both hero and wall sprites have collided? (eg I press up when he is below wall so it moves hero sprite INTO the wall so we know the collided so we move sprite back - fast so it is not visible)..

    Here is example so it is easier to image:
    i.imgur.com/By2DHrt.png

    Map is quite big - that brown wall,would you use tiled and draw collision layer around it or maybe any different technique?

    Anyway, thank you for always helping :) Maybe I should not think that there is 1 correct way of doing this and just adapt some existing code.
  • ar2rsawseenar2rsawseen Maintainer
    @Seb7 aha I see, so it is not more as side scroll, but more like a top view tile map.
    In this case I actually don't think you would need a box2d as most probably you can move only by tiles and you always will have a tile set that would be a reference matrix to check what tile is next and can you walk on it.

    If you want a free movement without tile restrictions, then yes you can use box2d over the tilemap but you would have to draw and control both tilemap and draw a chainshape around tilemaps where you can't walk. But most probably you could also not have too large worlds (as you could with simply TileMap, because they have offscreen culling), because box2d does not disable bodies outside the screen and use them all in calculations.

    Unfortunately I am not aware of such examples in Gideros, but maybe someone has something or saw something like that being created
Sign In or Register to comment.