News:

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

Breakout AND Question about ARRAYS?!?!?

Started by OceanJeff32, October 09, 2005, 03:50:56 AM

Previous topic - Next topic

OceanJeff32

Well, this game is taking shape, i've only added the block initialization, so you can mess with the blockrows and blockcolumns and blocktotal variables, be sure that

blockrows * blockcolumns = blocktotal < 128

and it works great!

Turns out you can add all the blocks, etc on the screen, all the background calculation, whatever, and the thing that takes most the processor time is the SetDIBitsToDevice() (Present() in Direct X). I doubt it would be much faster with Hardware support (video card access).

Later all,

Jeff C
:U

P.S. Any ideas on color initialization would be appreciated. And don't worry if you're anxious about the collision detection...it's next.

The second attachment is the QUESTION:

Are you ready for this?  Ok, the WM_MOUSEMOVE case in the Window's Procedure is where I intercept the mouse x and y coords, and apply them to one of the blocks on the screen (one of the blocks that the ball is checked for collision with also).  This block should be #1, top, left, but I can't get it to use #1, I can only get it to use #2, the second from the left, top row.  Any reason why?

go ahead and try to set in WM_MOUSEMOVE, the [esi+4] reference to point to [esi], it won't work! Very frustrating.

It works fine otherwise, and the paddle is back, for those of you watching the demos, I missed it too!!!

Enjoy, and scoring and block elimination, and perfect collision detection are next, hopefully...

Jeff C
:lol :lol :lol

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

OceanJeff32

#1
I think the problem with the ARRAYS has something to do with LOOP

it decrements THEN checks for zero...I may be able to fix my code easily by using the loop structure I used in the Collision Detection section (I couldn't use loop there because it can only jump short...).

AH HA!

Later, I gotta go to work,

Jeff C
:U

UPDATE! Well, I worked on the collision detection routine at work, now I have something completely messed up...I'm so proud...

Check it out, but it's well commented, any speculations as to why it's not working? And how to fix it?

I'd get so much more programming done, if I didn't have to work... :lol


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