Snake game in java using slick2d
Snake game created using java and slick2d. click the link to watch the video in
source code: https://github.com/doppelgunner/Snake-slick2d
youtube: https://youtu.be/OgCG7dQm3z4
download demo here: dropbox or github
At first I'm planning on creating the snake game from scratch without any frameworks. Yes it is truly hard. There are times that I searched google or stackoverflow just to find the answer on how to enlarge the snake. Guess what, I'm trying to do it on 2d too but in command line. Then I realized that fuck, if this is so hard even on command line then might as well do it on window. Then I searched and searched the best ways to make a 2d game with the least amount of time. This includes me having enough knowledge of the programming language that I'll be using to make the said game.
After few days or hours, I found out that using a framework is a much better option. They built a codebase to be used by others easily. There are cases that it takes 10 lines but in frameworks it just took 1 cause it is already done by the framework behind. So, with these I was able to focuse more on my ideas. Also, one thing that makes frameworks great is that most frameworks or libraries in the net are already efficient. So, why not just use an opensource library if they are free anyways. That's when Slick2D and I met.
So I studied the framework trying to be comfortable with it. And soon as I finished making sample games, after a week or so I made the snake game. The rules are simple same with the traditional. But, I think I was very proud of this work. I even share it to youtube. Also, I was hoping to get views but not enough lol.
Conclusion:
Slick2d is good it even uses opengl / lwjgl which uses the gpu. In short it uses all the resources the computer has without wasting the processor too much. Though snake game are kind of low on processor usage, I just mean that in the long run it has best results than just using cpu.
source code: https://github.com/doppelgunner/Snake-slick2d
youtube: https://youtu.be/OgCG7dQm3z4
download demo here: dropbox or github
At first I'm planning on creating the snake game from scratch without any frameworks. Yes it is truly hard. There are times that I searched google or stackoverflow just to find the answer on how to enlarge the snake. Guess what, I'm trying to do it on 2d too but in command line. Then I realized that fuck, if this is so hard even on command line then might as well do it on window. Then I searched and searched the best ways to make a 2d game with the least amount of time. This includes me having enough knowledge of the programming language that I'll be using to make the said game.
After few days or hours, I found out that using a framework is a much better option. They built a codebase to be used by others easily. There are cases that it takes 10 lines but in frameworks it just took 1 cause it is already done by the framework behind. So, with these I was able to focuse more on my ideas. Also, one thing that makes frameworks great is that most frameworks or libraries in the net are already efficient. So, why not just use an opensource library if they are free anyways. That's when Slick2D and I met.
So I studied the framework trying to be comfortable with it. And soon as I finished making sample games, after a week or so I made the snake game. The rules are simple same with the traditional. But, I think I was very proud of this work. I even share it to youtube. Also, I was hoping to get views but not enough lol.
Conclusion:
Slick2d is good it even uses opengl / lwjgl which uses the gpu. In short it uses all the resources the computer has without wasting the processor too much. Though snake game are kind of low on processor usage, I just mean that in the long run it has best results than just using cpu.
Comments
Post a Comment