Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Is there a comprehensive tutorial on changing scenes? — Gideros Forum

Is there a comprehensive tutorial on changing scenes?

rpallenrpallen Member
edited October 2017 in General questions
I'm in the process of choosing a game engine to use and I like a lot of things about Gideros. But I can't find anything that really explains how to transition between scenes in a project or how to really use scene manager. Or am I missing something?

I'd like to see how to do scene management without trying to figure it out from reading bits and pieces of people solving some problem.

Are there any tutorials or sample programs that I can look at to learn this?

Comments

  • antixantix Member
    edited October 2017
    @rpallen there is an example project here...

    https://github.com/gideros/Scene-Manager

    Is that sufficient?

    @hgy29 or @SinisterSoft, It might be good to have this included in the main distribution :)

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • piepie Member
    edited October 2017
    Actually you could also use Layout as "scene manager" it seems more advanced and difficult to use than scene manager, but the output gui is awesome! :) Thing is that gideros doesn't have "scenes" as game maker's rooms.. You can do pretty much as you like :)
    Here you can find the release notes
    http://appcodingeasy.com/Gideros-Mobile/Manage-Scenes-in-Gideros-Mobile
    And
    http://giderosmobile.com/forum/discussion/6651/layout-gideros-gui-framework
  • Thanks for responding, antix and pie. But unfortunately, this is what I meant when I said "figure it out from reading bits and pieces". I saw the pages you've suggested before I posted, but they're just a part of the puzzle of how to show different screens within a game. For example, when I start a game, there could be a splash screen with a button that you click that starts your actual playing of the game. There could be a different screen for showing your score and another screen for a more advanced level and so on.

    Pie said, "Thing is that gideros doesn't have "scenes" as game maker's rooms.. You can do pretty much as you like". I understand that, but it would be helpful if there was a video tutorial that explains at least one method of managing scenes as I described above.

    John Blackburn's excellent video tutorial on sprites (Sprites in Gideros) is almost 35 minutes long. Yet the only tutorial for scene management (which is a pretty important topic for games) is a fairly short text on a web page.

    I looked at the layout class page on github and watched John Blackburn's video on using this class for GUIs. It's an excellent video that takes 36 minutes to explain using the class for GUIS. I can see that it could be useful for scene management, but I don't really see to do so. It would be great if this video or another video showed how to use the layout class for scene management.

    Is there anywhere that gives a COMPREHENSIVE explanation or tutorial on scene management?

  • piepie Member
    edited October 2017
    I understand what you are saying, I suppose that if it's not listed between the other tutorials it doesn't exists.. :(
    There is a good book by Arturs Sosins though, the same guy who wrote scene manager and a bunch of other useful stuff.

    http://giderosmobile.com/forum/discussion/5831/thoughts-on-this-book-gideros-mobile-game-development-by-arturs-sosins/p1

    The book explains in easy words everything you need to know to get started and guides you through the development of a simple game. Unfortunately it is a bit outdated And it misses all the new gideros features. But its content is still valid And should get you up and running very fast ;)


    P.s. if you understand Sprite you should be able to use scene manager.
    Basically scenes are Sprites containing other Sprites. Scene manager provides a ready made way to switch between these
  • antix, I don't know what you mean when you say, "there is an example project here..."

    I went to that github page expecting to find a directory (or zip file containing a directory) of a Gideros project which I could then open in the Gideros IDE. I didn't find this, so I don't understand what you mean.
  • hgy29hgy29 Maintainer
    edited October 2017
    Hi @rpallen,

    I don't want to offend you but I feel like you're taking it the wrong way, trying to map the scene concept you had on a previous sdk to gideros, where there is no such concept.
    With gideros, you don't build scenes, you build sprite hierarchies, and sprite hierarchies can happen to describe a full scene or just a part of it.

    Since you are asking about managing scenes, lets suppose you figured out how to build the sprite hierarchies that would old your scenes, and call them sceneA and sceneB. With gideros you can transition from sceneA to sceneB with just two lines of lua:
    sceneA:removeFromParent() -- detach sceneA from the stage
    stage:addChild(sceneB) -- add sceneB to the stage
    Anyhow you're right about tutorials, but probably no one felt like writing one for this subject.
  • To hgy, no you didn't offend me. I was using love (love2d) which doesn't have any scene manager that I know of. And it seems to operate differently than the other lua based game engines I've looked at. In that, there's a draw function that's called every frame.

    My scene management in love consisted of an if statement that had a a section for each game state. That is, if gamestate = splash, draw splash screen. elseif gamestate = play, draw play screen, etc., etc.

    Again,this seems like a completely different way of handling things, which is why I'm looking for something to comprehensively explain how to handle scenes in Gideros.

    And I think I've found it. Please see my post to pie, which I'll post after this one.
  • Thanks a million pie.

    I bought the e-book version of Arturs Sosins' book and though it is a bit old, I'm sure it's going to help me learn Gideros.

    I looked at the part about Scene Manager and I now understand much better.

    One thing that had/has me confused, is he mentions both mouse and touch functions. The tutorials I've watched never refer to mouse, so I'm not sure whether his mouse references are old (and no longer really relevant) or if they're still valid. But I guess I'll find out when I more thoroughly read the book and try out some programming.

    Thanks again. This is the kind of thing I was looking for, though it would be nice if there was something similar in video (like John Blackburn's great videos).
  • @rpallen okay when you go to the github page I linked you can see all of the source files listed there. Further up the page on the right there is a button labelled "clone or download" which allows you to download the example which can then be loaded into Gideros Studio and played about with :)

    I think you can pretty much ignore mouse stuff if you aren't releasing to windows :)

    Great to see you made the leap from Love2d. I considered that once a long time ago but it was very difficult at that time to export to Android, in Gideros you can export APK files directly from Gideros Studio!
  • piepie Member
    edited October 2017
    Mouse And touch events are interchangeable if you flag the feature in your project properties.(right mouse button on prj name in the resources column)

    edit - they still both exist :)
  • Antix,
    The reason I'm leaving love2d is pretty much the Android issue. I found a way to make .a love2d game into an .apk file for Android. The way I was doing it wasn't very hard to make the file. The problem was I couldn't get the game to look like it did in the game window when I was doing the programming (using ZeroBrane on Linux). I decided to look to see if there was a better way (using lua since I already know that to a degree) and I think I've found a couple. Gideros is the front runner.

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • @rpallen, i hope you know that zerobrane works nicely together with gideros too.

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • Yes, keszegh, I'm aware of this and I'm not against using ZBS, especially since I'm used to it. But other than my already being familiar with ZBS I don't know why I'd use it instead of the Gideros IDE. Do you know of any reason to use it over Gideros' own IDE?
  • @rpallen debugging :) but I love gideros IDE and just switch to ZBS when I need that feature.


    ZBS also support live coding
  • The number one reason I use ZBS is also for the outline pane. Then there's the search / repeat functions which are better than Gideros Studio.
Sign In or Register to comment.