Advertisement Jump to content
  • Advertisement

Bug Fixes 1

Daniel Ricci

765 views

In my last post, I talked about the `Undo` feature that was implemented. Undo allows you to revert the last valid move that you made and will put back the score that you had then, with a hit of two points. I demonstrated all the different ways that you can undo your moves, basically all the different possible moves that constitute a valid `Undo` move.

Furthermore, I introduced a bunch of bug fixes related to the game. I did not demonstrate how the bug fixes are now working, however, this blog post future blog posts that include bug fixes will now be accompanied by a small demonstration of the expected result.

I had scheduled some time for me to work on the `Autocomplete` feature. For this feature, the user will be able to right click anywhere on the board, and all the cards that are face up that can be moved to any of the foundations will be moved there. As I was preparing myself to start work on this feature, I glanced over at the number of bugs that were lingering, and I felt that it would be a nice gesture to get a few of the bugs out the door before I start work on a new feature.

Therefore, I took a step back and got to work on a bunch of bugs, which I will present to you below, and one feature that handles the spacing of the cards more accurately to that of the original game. 


1. Clicking on the stock and then performing an undo, does not subtract 2

This is now working, and as you can see, performing an undo after clicking on the stock, will now subtract 2 from your score

1329011411_1.Clickingonthestockandthenperforminganundodoesnotsubtract2.gif.20263f7b7920cd30fd6d57b3acc624bb.gif


2. Double-clicking on an Ace will position itself momentarily at 0,0 if you hold the mouse down on the second mouse down

There is an issue related to the container of the game being invalidated, causing a refresh and whatever card you have on that container having its bounds set to 0,0. This is now fixed and working as expected.

752237389_2.Double-clickingonanAcewillpositionitselfmomentarilyat00ifyouholdthemousedownonthesecondmousedown.gif.d0a1547edbd5908aa971b981b815d61d.gif


3. Switching from outline to non-outline does not update the cards in the talon view

There was an assumption made a while back that if something is not visible, it should not be able to receive events.

This is obviously not a good assumption to make. The code has been changed so that all registered objects of a particular event will receive event handler invokes, and it is up to the underlying object to handle if it should do something or not.

418829000_3.Switchingfromoutlinetonon-outlinedoesnotupdatethecardsinthetalonview.gif.7457bd28c8ddecdfc84140257e8ec1a2.gif


4. When dragging multiple cards in outline mode, the outline does not look consistent

There was a small miscalculation when the card's bounds were being computed. This is now working as expected.

43508699_4.Whendraggingmultiplecardsinoutlinemodetheoutlinedoesnotlookconsistent.gif.2576143ee138403c9fc35b3109b36309.gif


5. In outline mode, doubling clicking to automove a card shows a small green artifact on the status bar

This required the underlying game view to be refreshed, this is now working as expected.

750500356_5.Inoutlinemodedoublingtoautomoveacardshowsasmallgreenartifactonthestatusbar.gif.eb07f84310189639f7232f7bfd4ad078.gif


6. Talon Card Proportions (NEW FEATURE)

The spacing on the tableau views is now proportional to that from the original Solitaire game. Cards that have their backsides shown are approximately 3 pixels apart on the y-axis.
Whenever a card has it's face shown, further cards below will be approximately 12 pixels apart. This feature will now work as expected. I still have to handle the stock and the talon views
with respect to proportions, those have been logged as feature requests.

1324842219_6.TalonCardProportions.gif.9988dc0eea05bd04c12230058b2f1d6d.gif


7. Automove shows the card at the top left on the second mouse down

This issue is related to other issues with the container being invalidated, this is now working as expected.

273207212_7.Automoveshowsthecardatthetopleftonthesecondmousedown.gif.71a957a581e1e5fe683712c913dd1c4d.gif


8. Dragging more than one card causes the cards to be cut at the bottom when playing in a timed game

This issue is related to other issues with the container being invalidated, this is now working as expected.

638314310_8.Draggingmorethanonecardcausesthecardstobecutatthebottomwhenplayinginatimedgame.gif.e029ac81c067a273b559d533156c35ab.gif
 

9. Playing a timed game causes the card to jump to the origin every tick

This issue is related to other issues with the container being invalidated, this is now working as expected.

93646360_9.Playingatimedgamecausesthecardtojumptotheorigineverytick.gif.c6c01c4640a690d32d54de0fe0fdf557.gif

Now that I've closed a lot of bugs, It's time to implement another feature. I will continue my work on the Autocomplete item.

You can always follow my progress by following the game located at https://github.com/danielricci/solitaire and if you have any questions I will do my best to answer them. 

Take care, until my next blog post. 



4 Comments


Recommended Comments

don't really have anything constructive to say.. but wanted to tell you that I enjoyed reading this post.

Share this comment


Link to comment
2 hours ago, A4L said:

don't really have anything constructive to say.. but wanted to tell you that I enjoyed reading this post.

 

Thank you! :)

Share this comment


Link to comment

Agreed with @A4L, even though I have nothing especially constructive to add, I enjoyed the walkthrough of all the changes! :)

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!