10

I'm writing a Flash game, pretty intensive on CPU.

Besides optimizing it a lot, I would like to be able to play it as players on slow PC's will, because I have a good CPU and I would like to make it also playable on bad CPU's

First I thought that virtualization would help, but I've tried vmware player with an ubunto image and I can't find anywhere how to do this.

Buying an old PC is not an option, as I prefer not having machines around only for this.

What I need is something like a software underclocker, or a virtual machine where I can specify low specs for CPU and RAM.

Anyone know how to do this?

Community
  • 1
  • 1
  • I created a free simple tool for Windows that allows anyone to enter the process ID and the desired CPU speed percentage, and it proceeds to simulate a slow CPU for that process. The utility itself barely consumes CPU time, which is a benefit. :) It's called "Slow CPU Emulator", check it out here: https://github.com/mathusummut/SlowCpuEmulator Precompiled binaries can be found here: https://sourceforge.net/projects/slowcpu – MathuSum Mut Nov 27 '18 at 20:53

8 Answers8

23

Microsoft Virtual PC is VM software that allows you to determine the speed of the CPU, RAM settings, and Video Card settings for each virtual Machine you create. From the website:

Configurability - After installing Virtual PC, you can configure it to suit your requirements. Virtual PC has a number of settings that control how the product interacts with the physical computer, allocates resources, and so on.

I've used it to emulate a 400mhz PC with 128 Megs of RAM before.

Edit:

A Virtual Machine on Virtual PC will be slower than your host PC. I remember in VPC 2004, it would even say what the mHz speed it was virtualising was. That is no longer in Virtual PC 2007, but some digging shows that the Microsoft guys have addressed this very issue.

From their website's blog (given that it may disappear one day):

Well - maybe an emulation solution is better for your needs. Or, maybe you need to invest in some older hardware. Or - you could pursue the use of 'slow down' software inside of the virtual machine. Some programs that I have used with varying levels of success include:

One final comment on this topic - some people have noticed that some older DOS programs that are known to crash on fast hardware actually run perfectly inside of Virtual PC / Virtual Server. The reason for this is that a long time ago in Virtual PC development, we put in some code to detect the problematic routines in some common DOS libraries (checkout this for an example reference) and to patch these binaries 'on the fly' so that they would run correctly inside of the virtual machine.

I hope that helps.

dbr
  • 165,801
  • 69
  • 278
  • 343
George Stocker
  • 57,289
  • 29
  • 176
  • 237
7

Buy another OLD PC.

Old PCs are so cheap, the cost of an old box should be a heck of lot cheaper than the time it will take you to figure out how to do this.

John MacIntyre
  • 12,910
  • 13
  • 67
  • 106
  • 1
    That's not a good answer, especially when the solution is below. Microsoft Virtual PC already does this, and is signficantly cheaper (read: free) than buying an old PC. It also takes significantly less time to set up a VM than to buy and set up an old PC. – George Stocker Nov 12 '08 at 15:07
  • 1
    This answer is not helpful at all. The OP specifically says he's looking for a software solution. – Robert S. Nov 12 '08 at 15:18
  • This answer is okay if they only need one test environment. A VM solution is better because they can use it to test many different configurations. – Bill the Lizard Nov 12 '08 at 15:40
  • 2
    George; a virtual PC is better in most circumstances .. I even voted it up. However, it wasn't posted till a half hour after I wrote this. Rob; I believe he said 'something like a software'... I believe buying an old PC has a definite place in this list, and may not be obvious to everyone. – John MacIntyre Nov 12 '08 at 16:03
  • He said, "something like a software underclocker...." An old PC is nothing like a software underclocker. – Robert S. Nov 12 '08 at 16:15
  • 1
    +1. The CPU clock speed isn't the only thing that creates a speedy computer. Faster and more memory, faster and larger buses, faster disk access with larger caches... all of these things play a part in evaluating performance of software run on the hardware. It's why QA departments don't rely on virtual options only... – Cypher May 11 '16 at 18:35
4

there are CPU throttling utilities that slow the cpu down, not entirely sure how much they'd help. Heres a link to one I just found with a quick google.

Sekhat
  • 4,435
  • 6
  • 43
  • 50
4

You can try using CPU Killer

http://www.cpukiller.com/

Imran
  • 87,203
  • 23
  • 98
  • 131
3

Modern "virtual PC" software relies on virtualization support features in the host CPU, and that the virtual machine has the same instruction set as the host. So programs are executed directly, with "traps" stopping execution when the host needs to do something behind the scenes to maintain the virtualization. This would not help you.

If you're on Linux, you could try running the program in Valgrind, that provides a 10X slowdown in most cases. :) It's not by design though, so it's not a long-term solution.

unwind
  • 391,730
  • 64
  • 469
  • 606
2

I used a program called CPU Killer to play commandos behind enemy lines on my modern pc. The speed of that game is proportional to the speed of your computer. It's designed for 200mhz so running it on 3GHz without cpu-killer was impossible. :D

2

Throttle your program to a fixed framerate using a timer. That way you give CPU time you don't need back to the operating system. The human eye can't do much better than 25 fps anyways. Setting a fixed framerate of 50/60 fps should be more than enough for a Flash game.

mdm
  • 5,528
  • 5
  • 29
  • 28
0

DOSBOX emulates an old PC. It is intended to play old PC games. Some of these games must not run too fast and often does not work at all on modern hardware.

Prof. Falken
  • 24,226
  • 19
  • 100
  • 173