BBC BASIC for Windows
« CPU usage of BBCSDL Android (ARM) »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:18pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: CPU usage of BBCSDL Android (ARM)  (Read 252 times)
David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx CPU usage of BBCSDL Android (ARM)
« Thread started on: Feb 10th, 2017, 9:06pm »

I downloaded about half-a-dozen free games from Google's Play Store onto my Moto G4. Some of the games (e.g. 'Space Invaders') totally hammered the CPU (100% usage) doing nothing more than displaying a static menu. I could actually feel the back of my phone getting hot in the space of a few seconds -- simply for displaying a menu. Typically, a game would use 40 to 60% CPU 'bandwidth'. So it's interesting, perhaps, that with one of my test programs, written in BBC BASIC (very slow compared to Java which is what most Android games are written in) using a 360x640 rendering surface and drawing 100 48x48 semi-transparent sprites, uses only 40% CPU (the CPU doesn't get hot), all nice and smooth. Many (most?) Android games use the GPU to render images -- my sprites are written to a 'bitmap buffer' entirely in software prior to rendering via *MDISPLAY (my custom sprite plotters consist of some pretty shoddy ARM code, no attempt to use NEON SIMD instructions for greater efficiency).

It just leaves me wondering why so many Android games consume so much CPU power (sometimes 100%) even though they appear to be doing next to nothing?


David.
--
« Last Edit: Feb 10th, 2017, 9:17pm by David Williams » User IP Logged

DDRM
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 321
xx Re: CPU usage of BBCSDL Android (ARM)
« Reply #1 on: Feb 13th, 2017, 12:28pm »

Perhaps they simply have a very tight loop waiting for input - the equivalent of not including a WAIT 1 in BB4W?

To paraphrase Tom Lehrer (who was talking about folk-songs), that's what happens when you let The People write code...

smiley

D
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls