🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Changes I made...

posted in duke_meister
Published February 19, 2019
Advertisement

So essentially the changes I made are:

  1. Create a WinForms app instead of Console (obviously)
  2. Move my game loop code from a for loop to a timer Tick
  3. Move UpdatePlayfield() into the form Paint()
  4. Change WriteAt (which wrote on the console) to DrawCell (to draw on the form)

That's pretty much it! Apart from some minor stuff which I'll go into next post.

Some of the code can still be removed, e.g. there's no need to 'erase' the last snake tail piece as in the console version, and we could use different keyboard technique, but it works :)

BTW I'm not saying this is a great design, it's quick and dirty to be honest, which was the original intention (to get it done fast, but not throwing good design right out the window..)

Previous Entry All done
Next Entry Bit of a cleanup
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

Bit of a cleanup

1442 views

Changes I made...

1320 views

All done

1941 views

That's it

2126 views

Mostly done

1613 views

First instalment

2219 views
Advertisement