Jump to content

Photo

Does ZC use threading?


  • Please log in to reply
15 replies to this topic

#1 Koh

Koh

    Tamer Koh

  • Members
  • Real Name:Dominic
  • Location:Monsbaiya, Virginia

Posted 06 January 2013 - 11:05 PM

I totally forgot to ask. It's probably a silly question, but I just wanted to know if it did or not, and if the devs have considered using it if not. I know threading has its problems, but most computers are coming with at least dual core now.

Edited by Koh, 06 January 2013 - 11:05 PM.


#2 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 06 January 2013 - 11:20 PM

No, it doesn't. Allegro has event threads but that's about it. It's not exactly cpu intensive though and runs on old hardware fine; I don't know what you'd gain from extra threads.

#3 Koh

Koh

    Tamer Koh

  • Members
  • Real Name:Dominic
  • Location:Monsbaiya, Virginia

Posted 08 January 2013 - 12:34 AM

Oh it's not a requirement or anything, or a suggestion, I was just curious. Thanks for answering icon_smile.gif. Though if ZC does get way ahead in the game and it gets to that point, at least Allegro has some option for you all.

#4 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 08 January 2013 - 08:51 AM

QUOTE(Gleeok @ Jan 6 2013, 10:20 PM) View Post

No, it doesn't. Allegro has event threads but that's about it. It's not exactly cpu intensive though and runs on old hardware fine; I don't know what you'd gain from extra threads.

Well, sadly, this isn't entirely true. A decent amount of modern laptops can't run ZC to its fullest potential - at least by default.

From various tests that I've done, and from what I've seen from other people, I think ZC on Windows needs a thread of roughly 1.4GHz. That sounds like it would be fine, but Intel has hyperthreading in all of its processors now, which basically divides the processing power in half to make more threads. I bought a new laptop that has a dual core 2.2GHz processor, and before I disabled hyperthreading, it was a bit laggy.

It's a bit sad, but old computers tend to run ZC better than new ones because they don't have hyperthreading. icon_razz.gif

#5 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 08 January 2013 - 08:10 PM

You dang kids and your next gen gizmo-bobs. Back in my day when you wanted concurrency you had to play pac-man in front of a mirror. icon_freak.gif

Err.. yeah. Anyway I lied; sound and parts of ZQuest use threads for various things I believe. ZC is probably so thread-unsafe that it might be hard to get any benefit; IDK. parallelizing sections is probably doable. I'm not an expert on it by any means. I don't think anybody has really thought about it since the focus was getting 2.5 done.

#6 bobby_light

bobby_light

    Experienced Forumer

  • Members

Posted 09 January 2013 - 01:00 PM

Short of a separate thread for audio and one for possibly input (both of which should be handled by Allegro internally), I couldn't imagine the need, or benefit, of multi-threading a 2D game engine like ZC. Rendering a bunch of tiles and sprites at NES-ish resolutions, even 60fps and with 32-bit color, should be easily doable single-threaded. Besides, KISS and all. icon_smile.gif

#7 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 09 January 2013 - 01:26 PM

what are you talking about?

#8 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 09 January 2013 - 02:35 PM

If I understand correctly, they are talking about whether or not ZC supports using multiple processor cores (you know how most computers are dual-core or more?) for accomplishing two or more tasks at once (like drawing sprites and calculating collisions at the same time, for example). This happens so quickly that unless you have a slow processor, you won't notice any of this because it all gets calculated fast enough to play the game at 60 frames per second, usually with plenty of processing time to tend to other programs in between frames.

KISS stands for "Keep It Simple, Stupid".

#9 Chris Miller

Chris Miller

    The Dark Man

  • Banned
  • Real Name:King George XVII
  • Location:The Dark Chair

Posted 10 January 2013 - 12:50 AM

The drawbacks would outweigh the benefits. Besides, ZC will run just fine on an old Pentium 3. I've done it.
Heck, 1.90 worked on my old 486. icon_biggrin.gif

#10 aaa2

aaa2

    Wizard

  • Banned

Posted 10 January 2013 - 01:33 AM

Just throw a few global script slots on another thread and i think anybody will be happy.

#11 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 10 January 2013 - 03:12 AM

QUOTE(aaa2 @ Jan 9 2013, 11:33 PM) View Post

Just throw a few global script slots on another thread and i think anybody will be happy.


Sure, no prob. We can even start a pool and bet on how many lines of code it can get through before it crashes! icon_razz.gif

#12 Ben

Ben

    a very grumpy

  • Members

Posted 10 January 2013 - 11:24 AM

Threading something like ZC that was originally designed to run on a DOS-based architecture seems like a waste of time. icon_razz.gif I don't know how much it has changed internally since then, honestly, but still.

And I also remember running 1.90 on a 486-DX2 at one point. It was like playing the game in slow motion. Pretty sad that modern machines have trouble with it though; 1.84 and 1.90 (and my favorite build, 1.92b163) used to run fine on a 333MHz K6-2 back in the early 2000s.

#13 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 10 January 2013 - 06:59 PM

I dunno. I still see it being very nice because... well... Allegro is a resource hog. It saps more resources than it really needs - oftentimes grabbing the entire core of a processor if it can. This even happens on newer versions of Allegro.

So, I could see it being potentially nice doing something like dedicating one thread just for Allegro processing and the other thread for actual ZC-specific calculations. However, creating such a separation now for 2.5 would be... difficult to say the least.

#14 Chris Miller

Chris Miller

    The Dark Man

  • Banned
  • Real Name:King George XVII
  • Location:The Dark Chair

Posted 10 January 2013 - 10:18 PM

QUOTE(Bagel @ Jan 10 2013, 10:24 AM) View Post

Threading something like ZC that was originally designed to run on a DOS-based architecture seems like a waste of time. icon_razz.gif I don't know how much it has changed internally since then, honestly, but still.

And I also remember running 1.90 on a 486-DX2 at one point. It was like playing the game in slow motion. Pretty sad that modern machines have trouble with it though; 1.84 and 1.90 (and my favorite build, 1.92b163) used to run fine on a 333MHz K6-2 back in the early 2000s.

Must've been a hardware issue. It ran fine for me on both a 66MHz DX/2 and a 100MHz DX/4.

#15 Ben

Ben

    a very grumpy

  • Members

Posted 11 January 2013 - 08:25 PM

Granted that old Gateway 2000 machine was pretty terrible; it was running Windows 95 for some reason (on a 512MB hard disk) with 24MB RAM and could just barely handle VGA graphics. I never did have a chance to try ZC on the thing without the overhead of Windows 95.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users