News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Breakout using ARRAYS. version 0.10

Started by OceanJeff32, October 04, 2005, 05:34:53 AM

Previous topic - Next topic

OceanJeff32

This version has arrays controlling the X, Y and color values for the blocks.

Just converted tonight, the way that I want it.

Next step is: Block Initialization for columns and rows.
Then: Color Initialization for each block.

Finally, that collision detection has got to be fixed.  I have an algorithm that I hope will work, I don't want to have to resort to FPUs quite yet.

Later guys,

jeff c
:U

[attachment deleted by admin]
Any good programmer knows, every large and/or small job, is equally large, to the programmer!

Siekmanski

Hello Jeff

Maybe this is a simple idea:

Before writing the ball to screen, read the color of that screen position and if it's not
the color of one of the objects, no collision is done.

This way your objects can be any form you like and by color you can even check which
object you bounced into.

And you can copy your screen to memory and do your testing there.  (much faster than reading VideoMem)

OceanJeff32

That would work...since I draw the blocks first too, every frame.

I still am left with the problem of which way to bounce the ball?

I could then check for whichever side of the block the ball is closest to, that's probably the side it's bouncing against.

later,

jeff c
:dazzled:

P.S. I haven't done any further work on this yet...because I'm currently exploring 16-bit DOS assembly for VGA...
What I want to do is go through this Zen of Graphics Programming by Michael Abrash, and convert all the examples to 32-bit Win GDI with the SetDIBitsToDevice() framework Rony B Chandran uses.

So I've got the following projects in Assembly Language:
1) 16-bit DOS VGA graphics, up to 3D animation.
2) WinGDI using SetDIBitsToDevice() (which I'd like to mimick everything in *1*)
3) OpenGL. (easy compared to the other two)

Eventually, I'll catch up with myself.
:lol
Any good programmer knows, every large and/or small job, is equally large, to the programmer!