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

in utopian-io •  6 years ago 

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

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  ·  6 years ago 

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]

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).

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

#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

Looks like a fun game by the way 👍

Congratulations @quantumdeveloper! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You distributed more than 300 upvotes. Your next target is to reach 400 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

You can upvote this notification to help all Steem users. Learn how here!

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!

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

#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