News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

WIP - (Connect 4)

Started by zedd151, April 05, 2025, 02:44:20 PM

Previous topic - Next topic

zedd151

:biggrin:

I need a few members to test the animation speed in this test program. I don't need any coding advice just let me know if you think it is too fast or too slow...  :smiley:  Personally I like it, as-is. Its not too slow or fast for me... but would like other opinions.

I don't want to add the ability for the user to select the speed, but would rather find a happy medium, and have the speed hard coded.

to test, left click on any column to fill up the column.

sinsi

Speed is OK but I don't like the pause before it drops.
Also, this with the message boxes - they were hidden until I moved the window
You cannot view this attachment.
Closing the program leaves the boxes there too  :biggrin:

zedd151

Quote from: sinsi on April 05, 2025, 03:10:07 PMSpeed is OK but I don't like the pause before it drops.
I think the slight pause before dropping is needed, imo. I'll post an example without it if you want, to see the difference.

QuoteAlso, this with the message boxes - they were hidden until I moved the window

Closing the program leaves the boxes there too  :biggrin:
The message boxes stating that the column is full was only for testing purposes. They will not be in the finished product. Nor in the next example without the pause before dropping... give me a few minutes.  :biggrin:

zedd151

#3
Here you go, sinsi. No Message Boxes  :greensml: (left clicking on a full column now does nothing) and now there is no pause before dropping the pieces into the selected columns. I liked it better with the 250 millisecond pause myself.

sinsi


zedd151

Quote from: sinsi on April 05, 2025, 03:49:23 PMMuch better :thumbsup:
Maybe I should add some options for the user...
I'll think about it.  :smiley:

I'll probably use an .ini file... if I do.

jj2007

Quote from: zedd151 on April 05, 2025, 03:21:38 PMI liked it better with the 250 millisecond pause myself

The pause is a bit long. Try 100ms

zedd151

Quote from: jj2007 on April 05, 2025, 07:20:36 PM
Quote from: zedd151 on April 05, 2025, 03:21:38 PMI liked it better with the 250 millisecond pause myself

The pause is a bit long. Try 100ms

I'll split the difference.  :biggrin:
Between my preference of 250 and sinsi's preference of 0, and make it 125 ms.  :tongue:
It seem that one size does not fit all.  :hmmm:

I see probably a couple sets of radio buttons on the horizon (in a settings dialog box) along with that aforementioned ini file to save the settings, for the final product.
Maybe  slowest, medium, and highest - for both the "drop delay" and "animation delay".

Since I will be using a settings dialog and ini file, I'd probably add ability for changing the piece colors as well as background and foreground colors of the game board.
I used actual bitmaps here for testing, but the finished game will use memory bitmaps. The resource dialog box, and settings dialog will remain in resources.

zedd151

Now that I finally have the game piece animation working 100% as desired, its time to shorten all the code that I used to achieve the desired effect. It took me quite a long time (I tried a gazillion different ways 'til Tuesday) to get this working correctly. I did have working code once, but kept it on the Desktop, and never made a backup of it - it was inadvertently deleted during housekeeping without saving it.  :sad:

Everything regarding the game graphics is coded linearly in WndProc, without using any loops or self contained procedures to minimize the code in WndProc.  :biggrin:
More details will be available soon(ish).
Thanks to all (only 2 members though  :tongue:  ), that participated in testing thus far.

I will use this topic for further testing of the code after any significant changes to it...

zedd151

Quote from: zedd151 on April 05, 2025, 11:22:48 PM
Quote from: jj2007 on April 05, 2025, 07:20:36 PM
Quote from: zedd151 on April 05, 2025, 03:21:38 PMI liked it better with the 250 millisecond pause myself
The pause is a bit long. Try 100ms
I'll split the difference.  :biggrin:
Between my preference of 250 and sinsi's preference of 0, and make it 125 ms.  :tongue:

Here is a version with a pause of 125 ms. before dropping the piece into the selected column.   :biggrin:

sinsi

I still prefer no pause  :tongue:
It is now flickering every drop.
My OCD is disappointed, the pieces aren't perfectly centred in the holes :sad:

zedd151

Quote from: sinsi on April 06, 2025, 01:27:43 AMIt is now flickering every drop.
really?
I don't see that at all here on my Desktop PC, no matter the pause duration, or animation increment, or animation delay.
I have tested many variations of each... when testing for optimal values of each of them.
I will also now test on my laptop... and report my findings...

QuoteMy OCD is disappointed, the pieces aren't perfectly centred in the holes :sad:
Gravity happens. The are resting on the 'bottom' of the 'hole'. That is the desired effect.  :biggrin:

sinsi

Quote from: zedd151 on April 06, 2025, 01:30:53 AMGravity happens. The are resting on the 'bottom' of the 'hole'. That is the desired effect.  :biggrin:
In every image of the game I've seen the piece is bigger than the hole, and fills it up entirely :biggrin:

Definitely flickers, even the background

zedd151

Quote from: sinsi on April 06, 2025, 01:46:48 AM
Quote from: zedd151 on April 06, 2025, 01:30:53 AMGravity happens. The are resting on the 'bottom' of the 'hole'. That is the desired effect.  :biggrin:
In every image of the game I've seen the piece is bigger than the hole, and fills it up entirely :biggrin:
Welcome to zedds world. Other programmers have their way, I did it my way.  :biggrin:

QuoteDefinitely flickers, even the background
Now I am on my laptop, still not seeing any flicker at all. I'll need a few more testers...

adeyblue

It flickers after I click in both versions but the animation is fine (win 7)