Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / [suggestion] Scene commands

Author
Message
Zigi
14
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 5th Apr 2019 19:28
Hi.

I would like to recommend in order to keep the Tier1 syntax consistent, Scene Editor commands like scene_clean() and scene_fade() should be named like SceneClean() and SceneFade() instead. The current form just looks weird and out of place, I also dislike this syntax, personally I_find_this_hard_to_read.
I would also recommend to add the following commands:

SceneGoTo("scene name") command, so it would go ahead, clean the current scene and setup and load the next one entered between the () just for convenience.

The next thing would most likely come up is the ability to be able to pause/save the current scene, go to another and then be able to go back to a paused/saved scene anytime. So I would also recommend to look in to this scenario and add SceneSave() command, that is going to save the current scene at the current state permanently. You probably don't want to overwrite the original data however, in case the player want to start a new game from fresh. So you more likely want to save an instance of the current scene and let us choose a name something like SceneSave("name") which is going to save an instance of the current scene at the current state at the given name, and then we could switch to this scene any time.

I realize at the moment, scenes are noting but pure Tier1 code that is being compiled in to bytcode. So a solution could be maybe to also add support for "external scenes" that basically means we can load scenes from external files.

I think it would be very useful.

Thanks.
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 5th Apr 2019 19:41
Quote: "I realize at the moment, scenes are noting but pure Tier1 code that is being compiled in to bytcode. So a solution could be maybe to also add support for "external scenes" that basically means we can load scenes from external files"

That is the point. The editor should also export all the scene data in .json format
ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 5th Apr 2019 22:09
george++ wrote: "The editor should also export all the scene data in .json format"

Yes, +1. This would also allow us to use our scenes in other flavors of AppGameKit, such as python or C#.
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 5th Apr 2019 23:37
I haven't yet looked at how the scenes are exported but I am very surprised to learn that it is exported in code. That is horrible!
I also vote +1 for JSON exporting. I very much doubt I would use it if it is exported in code.
ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 6th Apr 2019 05:26
The scene isn't really "exported" as agk code, the scene file is agk code. If I were to create a scene called "MyWorld", AppGameKit Studio would create the file "MyWorld.scene" which is just a agk source file with the .scene extension that you would #INSERT.

As AppGameKit can already load JSON straight into UDTs, we could have one general SceneManager.agc file to include. This would define the UDTs and setup functions.


Then in our own code, we would access sprites and whatever as follows:


Zigi
14
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 6th Apr 2019 11:34 Edited at: 6th Apr 2019 11:52
Agree it would be great if scenes would be saved as JSON then we could use commands like @ShaunRW mentioned to handle it



I like it so much better than the current way



It would also get rid of the underscore from the code that I dislike and would be also more powerful since we could then do what I suggesting, save/pause and load scenes during runtime.

As I mentioned in an other topic, since it is alpha only it would be ok to break backward compatibility and change core functionality now for the better even if it means more work and postpone the release by a month or two. I hope TGC going to consider it.
I really don't mind when AGKS going to be released since I stick with the Classic for my current project anyway so I don't personally rush to get a final release version in June.
Zolarius
16
Years of Service
User Offline
Joined: 8th Jul 2007
Location: Vancouver, WA USA
Posted: 7th Apr 2019 22:38
Add this post to Github under WISH LIST please.

This idea would also facilitate pausing the game for displaying an ad for your revenue and resume where the player left off, thus ensuring they are watching the ad you are getting paid to have in your program.
Full time contractor -- Struggling programmer since 1985!
Many ideas and no completions yet! Hoping AppGameKit will solve that for me. Thanks TGC and members for your support.
ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 8th Apr 2019 03:40
@zolarius: There is already an official method to submit feature requests.
https://forum.thegamecreators.com/thread/224038

Can we get someone to confirm which method to use.
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 8th Apr 2019 07:26
ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 9th Apr 2019 13:27
I've added the request for JSON export to github. https://github.com/TheGameCreators/AGK-Studio/issues/269
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 9th Apr 2019 14:58
Quote: "I've added the request for JSON export to github"

Zigi
14
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 13th Apr 2019 13:07 Edited at: 13th Apr 2019 13:13
Thanks for the post on GitHub.
Since the part to save levels as JSON seems to received some attention from Preben (did add the flag 'enhancement' on github), only would like to add that currently C++ devs can not benefit from the scene editor since it generate Tier1 code which also means C++ devs need to port the entire scene code over to C++ or redo all the scenes in a 3rd party editor in case someone would like to port a Tier1 game over to C++ for example. I can't really say either of these options would be ideal.
If the editor would save the level as JSON, it could also benefit C++ coders in the future and even allow people to use AppGameKit Studio for level editing even with different game engines like Phaser, MonoGame, LibGDX, Cocos2D..etc so it could also compete in the world of 3rd party level editors which is pretty empty to be honest. The only 3rd party level editor worth mentioning in my opinion is Tiled. Since TGC decided not to offer Tiled support out of the box but instead develop their own level editor (again), I think it would make sense to compete with Tiled on all fronts and offer AGKS also as a 3rd party level editor for using the levels outside AppGameKit which may also require the option to export not only the level data in JSON but all assets along with it if we choose so, then we can just import the level in to any engine we want.

Thanks.
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 13th Apr 2019 15:29
@Zigi: +1

Login to post a reply

Server time is: 2024-04-25 03:14:40
Your offset time is: 2024-04-25 03:14:40