Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the format Name#Password
Comment
[i]Italic Text[/i]
[b]Bold Text[/b]
[spoiler]Spoiler Text[/spoiler]
>Highlight/Quote Text
[pre]Preformatted & Monospace Text[/pre]
[super]Superset Text[/super]
[sub]Subset Text[/sub]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich


Java Game - Snake

Reply
- Mon, 27 Jun 2016 19:35:28 EST SWJfiJ9j No.35773
File: 1467070528041.png -(5469B / 5.34KB, 796x525) Thumbnail displayed, click image for full size. Java Game - Snake
https://drive.google.com/open?id=0B3s2WwA7ZBaCY3cwWVhLQ2s2REU
Made a little game of "Snake" in Java. What do you guys think?
I used Slick2d & LWJGL.
Jar-Splice to export as a .exe
Resource Hacker to give it an appropriate icon.
I still need to add sound effects and more complex ''maps''. (Possibly sprite based graphics as well).
Enjoy!
>>
Jarvis Brashfore - Tue, 28 Jun 2016 00:16:20 EST WLOo3E7i No.35776 Reply
>>35773
Looks good.
goes a little fast though, if it starts me facing up I pretty much die instantly.
Also, why would you turn it into an exe? that kind of defeats the purpose of using java.

You should also try to limit the amount of logic in your render methods. For EasyLevel.java, I would have probably split that up into 3 different classes, (like IntroScreen, GameScreen, GameOverScreen or something) and had the update function decide when to change between them.
>>
Stephan Floffingbridge - Tue, 28 Jun 2016 03:23:50 EST SWJfiJ9j No.35777 Reply
1467098630055.jpg -(7734B / 7.55KB, 480x360) Thumbnail displayed, click image for full size.
>>35775
angusj.com/resourcehacker/
I used this because from what I understand you can't customize the desktop icon of a .jar file.

>>35776
I chose exe for the above reason, and also because it feels more like a ''legitimate'' program then some random .jar file. I only mentioned it's use in case someone wanted to crack it back open and see the code.
(If you know of a way to customize the icon of a .jar file I'd love to know!)

A lot of people have mentioned the speed, so I'll probably be refactoring the code to include a main menu / difficulty options.
There's also currently a bug with the starting direction. By default you are supposed to go up, but thanks to my lazy design Input grabs the last input entered before you die, hence why it's not consistent.
I will probably add a delay timer on re-spawn to negate this and ensure the player is heading in the right direction.

As for the logic, yeah, I have to clean that up quite a bit. I threw in score / lives at the last minute and it's far from elegant.

Thanks for your feedback! I'll post updates as I improve the code / add features!

Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.