How fast is "fast enough"?
I agree that pixel pushing ~= good gaming. But how much pixel pushing could be done in Squeak?
I decided to play with graphics and wrote a simple benchmark - roll the screen:
| w h r copyTop scrollUp | Display restoreAfter: [ w _ Display width. h _ Display height. r _ Display boundingBox. copyTop _ BitBlt destForm: Display sourceForm: Display halftoneForm: nil combinationRule: 3 destOrigin: 0@(h-10) sourceOrigin: 0@0 extent: w@10 clipRect: r. scrollUp _ BitBlt destForm: Display sourceForm: Display halftoneForm: nil combinationRule: 3 destOrigin: 0@0 sourceOrigin: 0@10 extent: w@(h-10) clipRect: r. h // 10 - 1 timesRepeat: [ copyTop copyBits. scrollUp copyBits.]]
OK, its silly, but I like watching it. :)
This takes around 1.5 seconds in 16 bit color at 800x600 on my G3/233. Speed seems to vary considerably. It runs very well on my B&W G3, but really terribly on just a somewhat slower machine (PowerMac 8500).
For kicks, I wrote the same code in C on the Mac (using the presumably-accelerated Toolbox CopyBits() function). It runs perhaps 4 times faster, which is nice, but certainly not an order of magnitude.
Is there a way to do this faster? Is it fast enough?
-Eric
So, guys, what's the drill? Let's assume I'd like to build a plugin for MacOSX, preferably using cc. Can someone lay out a howto?
"Andrew C. Greenberg" werdna@mucow.com is widely believed to have written:
So, guys, what's the drill? Let's assume I'd like to build a plugin for MacOSX, preferably using cc. Can someone lay out a howto?
Well the first part is simple; use VMMaker to generate the appropriate sources (you will already have done the zeroth part, writing the plugin, but since you wrote much of the plugin stuff I don't think that is likely to be a problem) as per the swiki pages/VMMaker help etc.
The next bit is more tricky. I'd like to find out how to compile a VM on the Mac myself one day. I'm sure I used to be able to do it, but somehow it never seems to work for me anymore. I think my powerbook dislikes me.
tim
On Thursday, November 1, 2001, at 03:58 AM, Andrew C. Greenberg wrote:
So, guys, what's the drill? Let's assume I'd like to build a plugin for MacOSX, preferably using cc. Can someone lay out a howto?
First, make sure you're running 10.1, because that has the 'two level namespaces' that actually allow plugins to not step on each others' symbols. With that change, the rest should now be close to standard Unix stuff, but I have to admit I haven't checked yet or updated the VM for 10.1.
Marcel -- Marcel Weiher Metaobject Software Technologies marcel@metaobject.com www.metaobject.com Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
On Thursday, November 1, 2001, at 02:50 AM, Marcel Weiher wrote:
On Thursday, November 1, 2001, at 03:58 AM, Andrew C. Greenberg wrote:
So, guys, what's the drill? Let's assume I'd like to build a plugin for MacOSX, preferably using cc. Can someone lay out a howto?
First, make sure you're running 10.1, because that has the 'two level namespaces' that actually allow plugins to not step on each others' symbols. With that change, the rest should now be close to standard Unix stuff, but I have to admit I haven't checked yet or updated the VM for 10.1.
I am. My question is this, how would I compile and "install" the plugin as a shared library, once I have generated the C code?
On Thursday, November 1, 2001, at 02:50 AM, Marcel Weiher wrote:
On Thursday, November 1, 2001, at 03:58 AM, Andrew C. Greenberg wrote:
So, guys, what's the drill? Let's assume I'd like to build a plugin for MacOSX, preferably using cc. Can someone lay out a howto?
First, make sure you're running 10.1, because that has the 'two level namespaces' that actually allow plugins to not step on each others' symbols. With that change, the rest should now be close to standard Unix stuff, but I have to admit I haven't checked yet or updated the VM for 10.1.
I am. My question is this, how would I compile and "install" the plugin as a shared library, once I have generated the C code?
MMm alright I'll bury my head in the sand and get an apple os-x project builder out the door. I've most of the pieces, not working of course, here on my desktop so maybe I'll get lucky today.
squeak-dev@lists.squeakfoundation.org