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 / Where is the Subroutine List (Gosub)?

Author
Message
Scribble
7
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 1st Apr 2020 10:40
I just bought AppGameKit Studio!

But something confuses me.

In the IDE, where is the window that shows all the subroutines? The list of subroutines we can call with GOSUB ?

All I can see at the top are "Functions" and "Variables" list?

How can I enable the subroutine list?


And, is it possible to change the IDE code color scheme to be the same as AppGameKit Classic code color scheme?

Thanks in advance.
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 1st Apr 2020 13:09 Edited at: 1st Apr 2020 13:10
this is i think like the old AppGameKit , but it covers only the coding area.

Attachments

Login to view attachments
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 1st Apr 2020 13:12 Edited at: 1st Apr 2020 13:14
This might be a better solution for what you are searching :

Attachments

Login to view attachments
Scribble
7
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 1st Apr 2020 15:19
Thanks a lot haliop787. I wish AppGameKit just dont make nay changes from AppGameKit Classic IDE. It's near-prefect.

Still trying to find methods to view subroutines GOSUB list. It's impossible to carry over old code like this. At this rate I might have to revert back to use AppGameKit classic.
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 1st Apr 2020 17:54
hmm assuming you have an old code.. and the Ide's search functions..
CTRL-F

i do understand this could be not as easy as to find a function
but
if you list all your GoSubs with an additional // then you can find it quickly
so

goSub // First go sub

goSub // GamePlay go sub

goSub // UpdateScore go sub

then easily you can search for them with CTRL - F , and once you searched something the search window also the replace , has its own History tab just near the search line.
so it could be much easier , and you cannot really compare the new IDE to the old one.. since you have much more in it like the Media viewer.. the help files documented to the right etc...
and do not forget this is Old code...
actually since i was 16 i never used Gosub anymore.. i actually used it only for my first game which was in Pascal and it was 19 years ago.
once you have functions , arrays etc... why do you need go sub? (really asking)
Scribble
7
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 1st Apr 2020 20:41
@haliop787

I'm using GOSUB to divide large body of routine codes into smaller segments. Those codes usually don't have replaceble parameters, unlike function.

The reason I'm using GOSUB for those part of codes, because I have found out after testing in DBPro, LOOP run faster, almost 5x more, if compared to functions, even with the same codes.
So I deduce that GOSUB did not burden the CPU as much as functions, so GOSUB ran faster.
I only use function for pieces of codes that do certain work that needs variable inputs, such as making NPC characters, calculating smoothed-out values, ect.
But for routines such as loading assets, making stages, initializing database arrays, ect, I always use GOSUB.
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 1st Apr 2020 21:33
Aha i had no idea that it is much faster.
I Should then reconsider using them.

you can post a Github request if the gosub does not shows in the UI tables.
https://forum.thegamecreators.com/thread/224038
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 2nd Apr 2020 09:58
Gosubs are NOT faster than Functions!
Quote: "I have found out after testing in DBPro"
'.
Maybe they were faster in DBPro but since you are posting in an AppGameKit forum, I assume you are now using AppGameKit and not DBPro. In which case a test you have done in DBPro is totally meaningless. The only way to test it in AppGameKit is to test it in AGK.
Like this:

That code call gosub one million times then does the same with functions and prints the time for both.
I get a marginally different result each time I run it (presumably background CPU tasks) but essentially, they are identical.
Scribble
7
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 2nd Apr 2020 10:05 Edited at: 2nd Apr 2020 10:10
@Scraggle good to hear that it has improved since DBPro time. Sorry, I haven't tested it in AppGameKit specifically.
Scribble
7
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 2nd Apr 2020 10:09 Edited at: 2nd Apr 2020 10:13
SORRY!!!

I have just checked again, after restarting my PC, and now all the GOSUBs appears under the Function list.

I don't know why they didn't at first. Unable to reproduce the error too.

Sorry to take you guy's time. I think the main issue is solved. Thanks again. Appreciate your assistances very much.
TamBam
12
Years of Service
User Offline
Joined: 29th Nov 2011
Location: India
Posted: 3rd Apr 2020 06:19
why use gosub this is not good idea use functions
TamBam
12
Years of Service
User Offline
Joined: 29th Nov 2011
Location: India
Posted: 3rd Apr 2020 06:25 Edited at: 3rd Apr 2020 06:29
You Want this I think

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-20 08:05:31
Your offset time is: 2024-04-20 08:05:31