OK I'll have to dig it out. you don't remember ever saying : "We can't do _________ because in AGS VM pointers for _________ are the same as pointers for ________ and the VM can't technically tell the difference"?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Crimson Wizard on Wed 22/09/2021 13:01:55
Of course hashmap or btree may be somewhat slower than accessing objects directly, but
Quote from: eri0o on Tue 21/09/2021 21:28:56Ouch.
object references could be direct but they use a hashmap/btree
QuoteInteresting read. Thanks!
AGS script is slower than many other scripting languages, because it's compiled to generally inefficient bytecode; it emulates x86 asm, but have many repeating operations that are redundant in a scripting language. I wrote a post about this many years ago: https://www.adventuregamestudio.co.uk/forums/index.php?topic=47320.0
Quote from: Crimson Wizard on Mon 20/09/2021 21:44:26That's the thing I forgot existed.
They are marked as "Build Action = Embedded Resources"
File* f; //global variable
void game_start() {
f = File.Open("file.txt", eFileRead);
}
void repeatedly_execute() {
if(!f.EOF) {
String s = f.ReadRawLineBack();
}
}
noloopcheck void Hang()
{
while(true) {
int i; //arbitrary no-op
}
}
void repeatedly_execute_always()
{
Hang();
}
File* f = File.Open("file.txt", eFileRead);
while (!f.EOF) {
String s = f.ReadRawLineBack();
//EVENT HAPPENS HERE
}
f.Close();
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.098 seconds with 16 queries.