Ninjadoodle Posted June 10, 2018 Share Posted June 10, 2018 Hi @enpu I have a strange question, because I feel like I saw something like this in the Panda repo a long time ago. I'm wondering what the possibility is of having a 'sort of' loader, that serves as a shell to load a bunch of smaller games. Let's say I make a one button game and want to release it as a standalone on the web, yet on mobile I want to put it in a package with a bunch of other one button minigames. Normally this would mean, having to keep two separate projects and 'copying' all the assets and code into a compilation project. I really feel like Panda 1 had something like this on Github, but I don't think it was ever documented - that's why I'm asking Thank you in advance for any feedback! Quote Link to comment Share on other sites More sharing options...
8bitdna Posted June 11, 2018 Share Posted June 11, 2018 Hi @Ninjadoodle I don't know about the 'loader' but if you use Git maybe use something like submodules might help with a little scripting? I've not delved hugely into using Git (I should learn more to be honest) but as I understand it this would solve the 'pulling together' all the projects into a single version and keep things in sync quite nicely. You'd still need to build the 'loader' and so, sorry I can't help anymore Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 11, 2018 Author Share Posted June 11, 2018 Hi @8bitdna Thanks for the tips To be honest, unless there is an easy way to do this, I will just end up pasting everything into a new compilation project. The Git stuff is probably a bit over my head, and I kind of don't want to go down that path lol. I do realize that it would probably lead to some nice shortcuts, but one of my goals is to start releasing regular content (games/videos), and I feel that this be a huge distraction. If @enpu, still has that old code lying around somewhere, he might be willing to port it to Panda 2 - I think it would make a great addition! Thanks again!! Quote Link to comment Share on other sites More sharing options...
8bitdna Posted June 11, 2018 Share Posted June 11, 2018 Hi @Ninjadoodle Yes, totally understand. So many tools, technology and so on that I've ended up for some time in going round in circles, your post has reminded me to focus and get things done Hopefully @enpu has something to help speed things up for you Pete Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 11, 2018 Author Share Posted June 11, 2018 @8bitdna Yeah, the choice and tech can get really overwhelming. I've spent too much time being lost and overthinking/planning stuff, yet I have nothing to show for all that stress and internal struggle, lol. Right now I'm retraining myself, to be ok with stuff not being perfect, and just getting it out there - game devs are notorious for vaporware, feature creep and impostor syndrome - time to leave that stuff behind! The best thing is to just get stuff done, and if it's worth developing further - it can always be done down the line Quote Link to comment Share on other sites More sharing options...
8bitdna Posted June 11, 2018 Share Posted June 11, 2018 @Ninjadoodle Definitely the same story here. Spent faaaarrrrrrrrr too much time overthinking and looking for a one size fits all type solution I can 'really learn'. I love the web and Panda 2 makes life very easy to start that journey, time to get some things completed. I'm sure there's awful games going to be coming from me, bit embarrassed about that but need to learn and get stuff out there. Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 11, 2018 Author Share Posted June 11, 2018 @8bitdna I think we're always our biggest critics Somebody once said - "I dare you to produce 100 pieces of work, and see what happens." The problem is that most people don't ever get to that point. I keep remembering that Angry Birds was Rovio's 52nd game! One other quote I love is "Fail early, fail often, fail forward" - Will Smith - here is a link to the vid. 8bitdna 1 Quote Link to comment Share on other sites More sharing options...
8bitdna Posted June 11, 2018 Share Posted June 11, 2018 @Ninjadoodle Fantastic article and vid, time to fail forward Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
enpu Posted June 11, 2018 Share Posted June 11, 2018 @Ninjadoodle So what you are after for, is a way to share assets and modules for multiple projects? You can have multiple html files on same folder, which you can open in Panda 2 as individual projects, and still use same media folder for example. Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 11, 2018 Author Share Posted June 11, 2018 Hi @enpu Sorry I didn’t explain it properly ... I was wondering whether there was a way to package a whole bunch of mini games into one big game without having to make a separate project - then be able to publish this game as normal. Quote Link to comment Share on other sites More sharing options...
enpu Posted June 12, 2018 Share Posted June 12, 2018 @Ninjadoodle Could you just have all your mini games as different scenes? Then you would have all in one project that you can easily publish. Or do you need them to be as individual projects in Panda 2? Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 12, 2018 Author Share Posted June 12, 2018 Hi @enpu In my case it's a little bit more complicated. I am planning on releasing online games separately - for example Lightybulb 1, 2 and 3 Each game has 20 levels. For various reasons I would like to keep them as separate games on the web, but when publishing to App Store / Steam / Facebook etc. I would like to put all 60 levels together and have a selection screen which will allow you to play 1, 2 or 3. Right now, to do this, I would have to paste each of the episodes into a separate compilation project and keep another code base. This is not a huge deal, but it does mean that whenever I fix a bug and so on, I would have to do it twice. If some kind of loader like this was possible and easy enough to do, that would be awesome! Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 12, 2018 Author Share Posted June 12, 2018 @enpu Thinking about this, I'm not actually even sure it's doable. Maybe I'll have to re-think my publishing strategy. I'm not sure how the menus / game saves / sound buttons etc. would even work with the above system. I don't really want to publish a whole bunch of tiny games to iOS for example, as it just means more maintenance. On my website however, it would be better to have separate episodes (small games) for several reasons. If anyone has any ideas that I haven't though of, I'd be happy to listen lol. Quote Link to comment Share on other sites More sharing options...
enpu Posted June 12, 2018 Share Posted June 12, 2018 @Ninjadoodle That sure is a complicated situation you got there. I would suggest you to think to put all into one project. Then make one scene that would act as the "selection screen", then other scenes will be the actual games. Then on your website you could make links to that game with different url parameters, which would change the starting scene of your project. That way it would look like it's separate games, but actually one single project. Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 12, 2018 Author Share Posted June 12, 2018 Hi @enpu Thanks heaps for the tip - that is actually one possible solution I think tho, that I will most likely just release updates / level packs for games instead - that way I won’t have to worry. I’ll think about it a little and see what I come up with. Thanks again! Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 12, 2018 Author Share Posted June 12, 2018 Hi @enpu I've had a think about this and thought of a way that I think might work. I just want to double check if this is actually possible, and that you would still be able to compile / export games at the end. Normally I would keep 3 separate projects + folders for 3 different episodes. Then, once I I am ready to create an app / compilation, I would create another project that would load all the levels and assets from the individual 'episode' folders. This means that any fixes I make to the levels, would only have to be done once, and the new project would pretty much just be new 'main' and 'menu' modules. This would require loading the main module from the project folder, and the level modules from outside folders - Would this be doable? Thanks heaps for your help Quote Link to comment Share on other sites More sharing options...
enpu Posted June 13, 2018 Share Posted June 13, 2018 @Ninjadoodle Yeah that sounds like it should work, though you might want to double check it. Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 13, 2018 Author Share Posted June 13, 2018 Hi @enpu Awesome, I'm trying this now ... but can't seem to load a module from another 'src' folder. I have a feeling this was posted somewhere, but I cant find the info Basically, for the above to work - I think I would need to load modules from different places, but I'm not sure that's possible with Panda. Quote Link to comment Share on other sites More sharing options...
enpu Posted June 13, 2018 Share Posted June 13, 2018 @Ninjadoodle Yeah project can have only one source folder, but source folder can have multiple subfolders. You could try to put all your projects in same folder, would that work for you? Every project would use the same source folder, but every project could have their own game specific modules. Also then every project would use same engine folder, which would be handy. Also media folder could have subfolders for each project. Your folder structure could look something like this: Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 13, 2018 Author Share Posted June 13, 2018 Hi @enpu I think this could work, I need to try and see Just one question - I would need to name the HTML files manually instead of letting the editor do it. Also I assume the same with the main.js files? Quote Link to comment Share on other sites More sharing options...
enpu Posted June 13, 2018 Share Posted June 13, 2018 Yeah would require some manual work outside of Panda. This will change in the next release Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted July 19, 2018 Author Share Posted July 19, 2018 Hi @enpu I'm trying to get my head around the example you've given me above. I've put the projects in the same folder, and I've renamed the index files ... game1.html, game2.html, game3.html I've also change the code inside index.html ... to reflect the new modules name ... instead of main I have each index file loading ... game1.js, game2.js, game3.js For some reason, when trying to run the game ... I get this -> Uncaught Scene Main not found Any idea what I night be doing wrong? Quote Link to comment Share on other sites More sharing options...
enpu Posted July 19, 2018 Share Posted July 19, 2018 That means the engine is trying to start scene named Main, but it's not found. Does your modules have scene named Main? You can also change the starting scene in config: game.config = { system: { startScene: 'MyStartScene' } }; Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted July 19, 2018 Author Share Posted July 19, 2018 Hi @enpu No it doesn't have a main, because I have multiple 'main' files in the src folder - I've renamed them game1, game2, game 3 instead. Does that mean that in this case, I need to change the starting scene in config, because the engine is automatically looking for a file called main? Just trying to understand it better Quote Link to comment Share on other sites More sharing options...
enpu Posted July 19, 2018 Share Posted July 19, 2018 No it's not looking for a file named main. It is looking for a scene named Main. That's different thing. And yes if your game doesn't have scene named Main, then you need to change the starting scene from config. Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.