Snake3D: Released Version 1.1 containing an upgrade of the GUI.


Repository

https://github.com/IntegratedQuantum/Snake3D

New Features

The menu GUI now contains several buttons which can be pressed with the mouse:
Screenshot from 2019-07-24 23-08-18.png
The buttons are triggered using the java MouseListener which I added here.
The buttons simply consist of one Rectangle containing a text that changes color if the mouse was pressed above it. The level and difficulty selection is also indicated by another color.
The Start button simply starts the game, but space can still be used for that.
Difficulty and level can now be selected using the mouse or you can cycle through them with G(for the difficulty) and L(for the level).
Now that level and difficulty are seperated it has also become possible to select a level in hard mode:
Screenshot from 2019-07-25 12-12-21.png
The death-screen pretty much remained the same, but you now have to leave it pressing any key to start a new game. I made it this way so the death-screen isn't overloaded with the same details as the main-screen having also the "Game Over" at the position where the start button would be.

Minor changes

GitHub Account

https://github.com/IntegratedQuantum


Comments 9


Thank you for your contribution.

  1. You could use the custom sorting in Java instead of writing your own sorting here
  2. You might use Arrays.fill instead in here if the array is continous.
  3. duplicate code could be refactored: here and here

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

28.07.2019 17:22
24

Thanks for your review.

  1. It is hard to sort an array if the array itself does not also contain the data that it should be sorted by.
  2. Yes I could do that, but that wouldn't improve readability (I could only replace the innermost loop which doesn't make a big difference in readability), but it would also mean an unnecessary drop in performance based on the data mentioned here in the second answer.
  3. You are right. I was thinking about making a new class "Button", but that has some complications so I decided to keep it as it is for now(until the next update).
28.07.2019 20:41
0

Thank you for your review, @justyy! Keep up the good work!

31.07.2019 08:10
0

utopian-io has been a gift. We would like to keep its curation-efforts alive here on 'marlians.com'. We want to curate and reward 'contributions to open-source projects' with MARLIANS on the the marlians.com tribe, a SCOT-enabled steem condenser. Contributions can include suggestions, graphics, bug-finds, code etc. You can simply add in #marlians to your #utopian-io posts and it will appear on https://www.marlians.com/created/utopian enabling you to earn some MARLIANS along with steem/sbd. You can also post directly to steem via 'marlians.com'. We have some overseers who curate and who can render you help too. You can find them enlisted on https://www.marlians.com/created/utopian

07.08.2019 11:20
0

Hey, @quantumdeveloper!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

28.07.2019 20:18
0

Looks like a fun game by the way 👍

29.07.2019 17:42
1

Thanks for being one of the first to buy the new MAPXV tokens. A freebie upvote as a thank you!

31.07.2019 13:41
0

utopian-io has been a gift. We would like to keep its curation-efforts alive here on 'marlians.com'. We want to curate and reward 'contributions to open-source projects' with MARLIANS on the the marlians.com tribe, a SCOT-enabled steem condenser. Contributions can include suggestions, graphics, bug-finds, code etc. You can simply add in #marlians to your #utopian-io posts and it will appear on https://www.marlians.com/created/utopian enabling you to earn some MARLIANS along with steem/sbd. You can also post directly to steem via 'marlians.com'. We have some overseers who curate and who can render you help too. You can find them enlisted on https://www.marlians.com/created/utopian

07.08.2019 11:20
0