SyntaxBomb - Indie Coders

Languages & Coding => AppGameKit ( AGK ) => Topic started by: Pfaber11 on June 23, 2021, 09:50:32

Title: .EXE Fake
Post by: Pfaber11 on June 23, 2021, 09:50:32
Well I have only just realized the AGK .EXE files are the interpreter and not a real exe file and it's been staring me in the face for 3 years . I do feel a bit cheated . I guess all you guys on here have known this from the start but there you go . Somebody said something on the TGC forum and it just hit home . I guess it's still the same AGK I've always known but there you go .
Title: Re: .EXE Fake
Post by: Pfaber11 on June 25, 2021, 00:52:04
In a way it does make sense and I think it's a better way of doing it than the java way of doing things as it doesn't have to be pre installed and is portable . I suppose it's pretty obvious really I just never really thought about it before . The program still works properly i.e when you double click the exe file in the folder it runs no problem . On TGC's side of things I guess disguising the interpreter as an EXE file was very clever . I think this is probably old news so won't mention it again . Have a nice evening .
Title: Re: .EXE Fake
Post by: steve_ancell on June 25, 2021, 02:53:22
I found that out when I made a level editor for a game and then tried putting it in the same folder of the game, the main EXE will always run the bytecode.byc file in the media folder.
Title: Re: .EXE Fake
Post by: Derron on June 25, 2021, 08:03:30
[...] the main EXE will always run the bytecode.byc file in the media folder.

They should have at least offered "whatever.exe" toload "whatever.byc" ... They could even have packed the .byc stuff in their .exe file - on Windows this should work, others might have trouble with signing their binaries then (mac OS).


bye
Ron
Title: Re: .EXE Fake
Post by: Hotshot on June 27, 2021, 13:00:59
AGK Exe Files size is so bloated.

Purebasic or Freebasic is the king of Smaller Exe :) then there is PowerBasic(I am not  sure if is dead or alive Lanaguge thought!)
Title: Re: .EXE Fake
Post by: Steve Elliott on June 27, 2021, 13:30:17
Yes AGK programs (byte code) are about 800 bytes or so dependant on the size of your game, but the actually Interpreter to run it is around 9Mb.

Games in Unity and Unreal are far larger though, so it's not a bad solution.
Title: Re: .EXE Fake
Post by: Qube on June 27, 2021, 16:58:36
File size doesn’t really bother me overall as I don’t think I’ve I’ve said “This software looks awesome but it’s a few megabytes more then it should be”

Tiny exes are great for command line tools but with games your media will most of the time be far greater than the code or code + engine / player.
Title: Re: .EXE Fake
Post by: GaborD on June 28, 2021, 18:04:34
The exe is not just an interpreter, it contains the entire engine, no surprise it has a few MB.
In the end, it doesn't really matter if the Basic we write is compiled or interpreted, it will have no effect on performance in a typical game. The bottleneck will be the rendering. The one exception would be running complex simulations, but those should prolly be done on the GPU anyway.
Title: Re: .EXE Fake
Post by: Steve Elliott on June 29, 2021, 20:11:57
Quite right GaborD, and the engine has many many functions - Blitz3D used a similar strategy by bolting the engine onto the exe - but obviously it was compiled to machine code instead of byte code.
Title: Re: .EXE Fake
Post by: Pfaber11 on July 03, 2021, 20:17:49
Even with the exe. being not quite what I thought I must say that AGK Studio is still my favorite language ever . I can pretty much do what I want with it and it's taken a while to get to this point . I never thought I would ever be making 3d games but there you are , really glad to be here . The only gripe I have right now is setvsync() in renderer"Basic" works great in "advanced" mode but really does not work in "Basic" renderer. It gives me about 45 fps  and in setsyncrate() I get over a hundred so I'm calling it a bug unless anybody can show me otherwise . Have a nice evening .
Title: Re: .EXE Fake
Post by: Qube on July 04, 2021, 23:13:12
The only gripe I have right now is setvsync() in renderer"Basic" works great in "advanced" mode but really does not work in "Basic" renderer. It gives me about 45 fps  and in setsyncrate() I get over a hundred so I'm calling it a bug unless anybody can show me otherwise . Have a nice evening .
I never use SetSyncRate() as it doesn't work as you'd expect. It's an internal sync rate rather than setting the monitor to a sync rate.

Instead I banish that command and pretend it doesn't exist ( or just put SetSyncRate( 0, 0 ) in your init code ) and use SetVSync( 1 ) ( 0 = off, 1 = on ). Then use a basic delta time for all movement code ( target fps of 60 ). That way your movement should be smooth and consistent no matter what the monitor hz are set to.
Title: Re: .EXE Fake
Post by: Pfaber11 on July 05, 2021, 08:45:27
Yes I agree in theory setvsync should be the best option however it does not work over here . It works great with vulkan but not opengl hopefully this will be fixed in the future.
SimplePortal 2.3.6 © 2008-2014, SimplePortal