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 Classic Chat / How does Tier 1 work internally?

Author
Message
Xaron
10
Years of Service
User Offline
Joined: 3rd May 2014
Location: Germany
Posted: 31st May 2017 15:44
Hey there,

I haven't found anything about that in the forums but I've heard that Tier 1 works like that:
The interpreter compiles the basic source into byte code, these byte codes are then sent to a giant c++ switch/case statement with every API commands byte code in a "case". The parameters are pushed on and off a stack before calling the relevant AGK2 API command.

Does it work that way?

Another thing is: Are there different binary sizes for Android/iOS when using Tier 1/2?
PSY
Developer
8
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 31st May 2017 21:54
I guess the bytecode runs in some 'Virtual Machine', but the devs can give you a 100% answer
PSY LABS Games
Coders don't die, they just gosub without return
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 1st Jun 2017 09:11 Edited at: 1st Jun 2017 09:11
Why not look at the tier 2 source code?
Signature removed by mod because it's larger than 600x120... please resize and try again.
Xaron
10
Years of Service
User Offline
Joined: 3rd May 2014
Location: Germany
Posted: 1st Jun 2017 13:54
Indeed, thanks! So it is like I wrote.
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 1st Jun 2017 14:57
Quote: "Why not look at the tier 2 source code?"

Maybe that's because it is hidden?
Xaron
10
Years of Service
User Offline
Joined: 3rd May 2014
Location: Germany
Posted: 1st Jun 2017 15:10
Actually it's not. There is a bunch of case statements, for Tier 1 so it is like I wrote. Which is not necessarily bad.
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 2nd Jun 2017 10:15
If you are asking about Tier 1 and 2, I am also interessted in if it could be possible, to Switch in a project between Tier1 and Tier2, maybe if not in the same document, but on document basis. #includes maybe in Tier2 and Main() in Tier1. Maybe Tier1 -> to Tier2, but not Tier2 -> to Tier1.
Or would that more be a Pre-Compiler? Like Microsoft does it with JavaScript and TypeScript?

Login to post a reply

Server time is: 2024-09-30 03:16:03
Your offset time is: 2024-09-30 03:16:03