FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

Running the engine in a background thread

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
RealNC



Joined: 07 Mar 2012
Posts: 914

PostPosted: Wed Mar 18, 2015 3:44 am    Post subject: Running the engine in a background thread Reply with quote

I've made some long overdue and very extensive changes to Hugor. Previously, games were running in tandem with the rest of the interpreter. When the game was executing code, the interpreter froze until the game returned control back to it.

This resulted in some rather ugly behavior. The most notable one was that a game could cause the interpreter to freeze indefinitely. For example, running this hugo code:

Code:
while true { }


means the interpreter hangs since it waits forever for the loop to finish.

I've now rewritten some large parts of Hugor so that the game is running in the background, in its own thread. This allows the interpreter to keep running at all times, even if the game itself freezes, so that it's possible to quit normally without having to kill the process from the task manager. It also made it easier to get rid of the high CPU load during the "delay/read key" loop for "more" prompts (the issue mentioned in the other thread) since screen repaints are now easier to deal with.

The downside is that I might have introduced new bugs. I hope not. But it would be nice if you could use this new build if you intend to play any Hugo games and report any new weirdness that shows up:

http://83.212.107.13/~realnc/hugor/testing/Hugor-video-w32.zip
Back to top
View user's profile Send private message
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Wed Mar 18, 2015 12:42 pm    Post subject: Reply with quote

Awesome, I'll get to playing with this right away!
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended