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 / AGK V2 - multi-core usage?

Author
Message
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 4th Jan 2014 21:12
I note that V1 only used a single core (single thread) for pretty much everything.
Is V2 likely to give options at least for utilizing the CPU a bit more?

The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 12th Jan 2014 19:42
nz0

AGK et al already uses threads internally. I would be virtually impossible to get a smooth running video system without them. I would imagine the sprite engine uses x threads (managing, moving, collisions), the sounds engine uses threads etc etc. without utilising threads your app/game would come to a halt if you used lots of spites or lots of sounds.....as most games do!

Of course, if you use native (c++ or pascal) your own app can use threads if required.....

www.bitmanip.com
All the juicy you could ever dream of!
The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 12th Jan 2014 19:49
I would also imagine that multiple cores are detected and utilised also in the internal engine. Especially seeing that most phablets today are using x cored processors. However, i am assuming that careful use of cores is used. Writing software that lets you create code that allows you to 'eat up core use' may breach android / iOS requirements as x number of cores may be fully utilised by the OS.

Eating up cores that are required by the OS will kill the system. Seeing that both Android and iOS keeps apps open in the background i would imagine the OS utilises cores to their full potential....along with many many threads!

www.bitmanip.com
All the juicy you could ever dream of!
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 13th Jan 2014 13:19
Explicitly using threads can be very dangerous on a single-core system. Sure, you can create the thread, but the context switching will eat CPU time.

Ideally software needs to be evolutionary and adaptive. That can be the simple case of checking various options when first run. I'm actually pleased if the first time I run a game it says "Give me minute - just testing on your system."

-- Jim - When is there going to be a release?
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 17th Jan 2014 12:31
I compared the usage on my current game to some stress test scenarios and other code.

My game uses a single core to almost 100%, with a few bits of activity in other cores (~5%)
I look at other examples doing different things and there seems to be a better spread of "usage" over several cores - e.g. ~20% on 4 cores.

Login to post a reply

Server time is: 2024-05-02 15:52:50
Your offset time is: 2024-05-02 15:52:50