Java 2D game developing

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

30 Replies - 1935 Views - Last Post: 25 August 2013 - 01:19 PM Rate Topic: -----

#16 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10595
  • View blog
  • Posts: 39,247
  • Joined: 27-December 08

Re: Java 2D game developing

Posted 01 August 2013 - 10:50 AM

The code is really horrible as well. Just the use of static, lack of generics, and doubling up of braces on one line shows that either the person who wrote this code didn't know what they were doing or your modifications are very poorly done at best. Take the time to actually learn Java rather than just copy/pasta your way to a game.
Was This Post Helpful? 0
  • +
  • -

#17 slehmann101  Icon User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 146
  • Joined: 30-November 11

Re: Java 2D game developing

Posted 05 August 2013 - 07:25 PM

I hate to say it but this is way beyond your level, if your instructor won't touch on it maybe there is a reason
Was This Post Helpful? 0
  • +
  • -

#18 AVReidy  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 65
  • View blog
  • Posts: 431
  • Joined: 17-February 11

Re: Java 2D game developing

Posted 05 August 2013 - 07:58 PM

Quote

The code is really horrible as well. Just the use of static, lack of generics, and doubling up of braces on one line shows that either the person who wrote this code didn't know what they were doing or your modifications are very poorly done at best. Take the time to actually learn Java rather than just copy/pasta your way to a game.

I think we need a clause in the terms of service that requires users to hold degrees in Java before posting questions about the topic. That way, your pristine Java-God eyes won't burn when you see "really horrible" code written by mortals who (God forbid!) have yet to memorize the best practices and idioms and think of Java as the simple tool it is. With such a barrier to entry, you wouldn't have to spend your time berating people for eager learning anymore!

Since that clause does not yet exist, I am going to supply the OP with a link to my own "really horrible," generic-less, non-encapsulated, superfluously-classy, inefficient code that gets the job done and comes together as a working multiplayer game.

Believe it or not, there are multiple ways to learn how to code, and not everyone learns for the same reason. Feel free to provide something marginally-constructive yourself :) Perhaps a link to your game programming portfolio and some "good" source code?

This post has been edited by AVReidy: 05 August 2013 - 08:48 PM

Was This Post Helpful? 1
  • +
  • -

#19 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10595
  • View blog
  • Posts: 39,247
  • Joined: 27-December 08

Re: Java 2D game developing

Posted 05 August 2013 - 10:00 PM

Quote

I think we need a clause in the terms of service that requires users to hold degrees in Java before posting questions about the topic. That way, your pristine Java-God eyes won't burn when you see "really horrible" code written by mortals who (God forbid!) have yet to memorize the best practices and idioms and think of Java as the simple tool it is. With such a barrier to entry, you wouldn't have to spend your time berating people for eager learning anymore!

I'm not berating anyone. There are good OO practices in any language, and there are good language-specific practices. If one is to bite off a sizable project in any language, it's best to go in with a good understanding of best practices with the language, or at least be open to learning them throughout the project. It can only benefit one down the road. ;)
Was This Post Helpful? 0
  • +
  • -

#20 ConciselyVerbose  Icon User is offline

  • D.I.C Regular

Reputation: 90
  • View blog
  • Posts: 315
  • Joined: 05-July 13

Re: Java 2D game developing

Posted 05 August 2013 - 10:11 PM

I read the point about the code being bad was that it is copied and pasted and doesn't give a great representation for how to use the language. It's one thing when you write code for yourself and don't think it's perfect. It doesn't have to be,

When you are learning, though, you will pick up bad practices by learning off of bad code. Your code doesn't have to be awesome but the code you are looking at should be OK.
Was This Post Helpful? 0
  • +
  • -

#21 Hououin_Kyouma  Icon User is offline

  • New D.I.C Head

Reputation: -7
  • View blog
  • Posts: 21
  • Joined: 29-July 13

Re: Java 2D game developing

Posted 23 August 2013 - 04:36 PM

View Postmodi123_1, on 01 August 2013 - 09:16 AM, said:

@butch - a quick check and shows the code from dec 2010.. http://pastebin.com/QVNa1aDb/ Hmm.. hmmmmmm.. probably not the OPs?!


Excuse me, but I clearly stated that I only got the code from a tutorial and I also stated that I have no idea/experience at game developing. It's just that we are suddenly tasked to develop a game and so I thought I can get help from people here. I am not forcing you to help me or something so if you have nothing good to say then you have the right to shut that mouth of yours. :)
Was This Post Helpful? -3
  • +
  • -

#22 Hououin_Kyouma  Icon User is offline

  • New D.I.C Head

Reputation: -7
  • View blog
  • Posts: 21
  • Joined: 29-July 13

Re: Java 2D game developing

Posted 23 August 2013 - 04:45 PM

View PostAVReidy, on 05 August 2013 - 07:58 PM, said:

Quote

The code is really horrible as well. Just the use of static, lack of generics, and doubling up of braces on one line shows that either the person who wrote this code didn't know what they were doing or your modifications are very poorly done at best. Take the time to actually learn Java rather than just copy/pasta your way to a game.

I think we need a clause in the terms of service that requires users to hold degrees in Java before posting questions about the topic. That way, your pristine Java-God eyes won't burn when you see "really horrible" code written by mortals who (God forbid!) have yet to memorize the best practices and idioms and think of Java as the simple tool it is. With such a barrier to entry, you wouldn't have to spend your time berating people for eager learning anymore!

Since that clause does not yet exist, I am going to supply the OP with a link to my own "really horrible," generic-less, non-encapsulated, superfluously-classy, inefficient code that gets the job done and comes together as a working multiplayer game.

Believe it or not, there are multiple ways to learn how to code, and not everyone learns for the same reason. Feel free to provide something marginally-constructive yourself :)/> Perhaps a link to your game programming portfolio and some "good" source code?


I am very thankful that a kind of God like you still exist in this world, I will check on the link you provided soon :) Currently I am still trying to learn things from tutorials and right now I managed to come up with the two player feature (took me so much time though) and other simple things like movements and such but having trouble with jumping movement xD, will soon work with the collision detection and the health bar stuffs. Thank you for the link you provided me with I will treasure it.
Was This Post Helpful? 0
  • +
  • -

#23 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 0
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Java 2D game developing

Posted 24 August 2013 - 08:24 AM

View PostHououin_Kyouma, on 23 August 2013 - 08:36 PM, said:

...if you have nothing good to say then you have the right to shut that mouth of yours. :)/>

Don't talk to people like that.
Was This Post Helpful? 0
  • +
  • -

#24 Hououin_Kyouma  Icon User is offline

  • New D.I.C Head

Reputation: -7
  • View blog
  • Posts: 21
  • Joined: 29-July 13

Re: Java 2D game developing

Posted 24 August 2013 - 12:38 PM

View PostButchDean, on 24 August 2013 - 08:24 AM, said:

View PostHououin_Kyouma, on 23 August 2013 - 08:36 PM, said:

...if you have nothing good to say then you have the right to shut that mouth of yours. :)/>/>

Don't talk to people like that.


But I just returned the favor sir, I posted a question here to get help from others not to get insulted by them PROgrammers. :)
Was This Post Helpful? -2
  • +
  • -

#25 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9275
  • View blog
  • Posts: 34,779
  • Joined: 12-June 08

Re: Java 2D game developing

Posted 24 August 2013 - 12:45 PM

It was not meant to be insulting, but helping those looking into the topic to explain how you can have that much code and not know basic OO principles.
Was This Post Helpful? 0
  • +
  • -

#26 axel1994  Icon User is offline

  • D.I.C Head

Reputation: 83
  • View blog
  • Posts: 167
  • Joined: 27-May 13

Re: Java 2D game developing

Posted 24 August 2013 - 02:30 PM

View Postmodi123_1, on 24 August 2013 - 12:45 PM, said:

It was not meant to be insulting, but helping those looking into the topic to explain how you can have that much code and not know basic OO principles.


And to add to this:

It's best that you really know how to program well before yo try to tackle on Game Dev.
If this is required for class, then they will have thought you the principles of OOP.

Now for actual help:
I would buy a book on Java and learn the principles again.

Nextup: plagiarism (which is copying code from someone else without their permission) and cheating (basically getting part of your code somewhere else) is a serious offense.
At my university atleast, they throw you out even when you do it for something small (not exam).

But anyway, I would really get a book and learn.
Was This Post Helpful? 2
  • +
  • -

#27 Hououin_Kyouma  Icon User is offline

  • New D.I.C Head

Reputation: -7
  • View blog
  • Posts: 21
  • Joined: 29-July 13

Re: Java 2D game developing

Posted 25 August 2013 - 05:50 AM

View Postaxel1994, on 24 August 2013 - 02:30 PM, said:

View Postmodi123_1, on 24 August 2013 - 12:45 PM, said:

It was not meant to be insulting, but helping those looking into the topic to explain how you can have that much code and not know basic OO principles.


And to add to this:

It's best that you really know how to program well before yo try to tackle on Game Dev.
If this is required for class, then they will have thought you the principles of OOP.

Now for actual help:
I would buy a book on Java and learn the principles again.

Nextup: plagiarism (which is copying code from someone else without their permission) and cheating (basically getting part of your code somewhere else) is a serious offense.
At my university atleast, they throw you out even when you do it for something small (not exam).

But anyway, I would really get a book and learn.


I appreciate your thoughts but I got this code from a tutorial and the owner willingly posted the code and shared it with everyone so I don't think it's under plagiarism. This is actually for a school project (and it's a group project, but since my members are unreliable, I took the coding part) but you don't need to worry anymore for I am studying Java game developing right now. Hmmm, the book is a good idea, do you have any suggestions as to what book I should get?
Was This Post Helpful? 0
  • +
  • -

#28 axel1994  Icon User is offline

  • D.I.C Head

Reputation: 83
  • View blog
  • Posts: 167
  • Joined: 27-May 13

Re: Java 2D game developing

Posted 25 August 2013 - 06:13 AM

Beginning Java SE 6 Game Programming --> I don't find this one that useful, included in my list to be complete
Black Art of Java Game Programming --> heard it was a good book, not read yet.
Cutting Edge Java Game Programming --> also heard, it was good, not read yet.
Killer game programming in Java

Others, not java specific.
Object Oriented Game Development
Game coding complete
Game engine architecture
Game programming gems 1-6
Game programming all-in-one

As for books just on Java:
Effective Java
Java In a Nutshell (not really nutshell, book is 1k pages)

If you want to just finish this project, I suggest something along the lines of 1 java game programming book (and game coding complete or OO Game Development) and 1 regular java book.
The others I included are if you might be interested in looking further in game programming.

Also, even if the code is open source. Unless your teachers/professors told you you could take open source code, it will be treated as cheating.
The point is to learn how to code/think. They probably want you to write your own code.

I might sound like I'm whining, but I'm just warning you.

This post has been edited by axel1994: 25 August 2013 - 06:16 AM

Was This Post Helpful? 1
  • +
  • -

#29 jimblumberg  Icon User is offline

  • member icon


Reputation: 4098
  • View blog
  • Posts: 12,681
  • Joined: 25-December 09

Re: Java 2D game developing

Posted 25 August 2013 - 09:09 AM

Quote

I appreciate your thoughts but I got this code from a tutorial and the owner willingly posted the code and shared it with everyone so I don't think it's under plagiarism.

But it would probably be considered cheating. Remember you're in school to learn, that usually means doing your own work. Also if you don't provide adequate notations that you used someone else's work you could still be plagiarizing the work. You must clearly state the what, where, and how much was that other persons work.

Quote

This is actually for a school project (and it's a group project, but since my members are unreliable,

And your point is? Having this as a group project was meant to teach you to work together. Perhaps you are a part of the problem? How well did you try to work with your group before you disappeared to do the project your way? If you have problems with your group talk to your instructor, you really will need to learn to work with others if you plan on doing almost any type of programming.

Jim
Was This Post Helpful? 1
  • +
  • -

#30 Hououin_Kyouma  Icon User is offline

  • New D.I.C Head

Reputation: -7
  • View blog
  • Posts: 21
  • Joined: 29-July 13

Re: Java 2D game developing

Posted 25 August 2013 - 01:13 PM

View Postjimblumberg, on 25 August 2013 - 09:09 AM, said:

Quote

I appreciate your thoughts but I got this code from a tutorial and the owner willingly posted the code and shared it with everyone so I don't think it's under plagiarism.

But it would probably be considered cheating. Remember you're in school to learn, that usually means doing your own work. Also if you don't provide adequate notations that you used someone else's work you could still be plagiarizing the work. You must clearly state the what, where, and how much was that other persons work.

Quote

This is actually for a school project (and it's a group project, but since my members are unreliable,

And your point is? Having this as a group project was meant to teach you to work together. Perhaps you are a part of the problem? How well did you try to work with your group before you disappeared to do the project your way? If you have problems with your group talk to your instructor, you really will need to learn to work with others if you plan on doing almost any type of programming.

Jim



Cheating you say? First of all they didn't teach this one to us in school so all we can do is rely on the internet. How am I supposed to learn something from them if they didn't even teach anything about this in the first place? And I'm doing my own homework that's why I'm here sitting in front of the computer still searching for answers.

Plagiarism is the "wrongful appropriation" and "purloining and publication" of another author's "language, thoughts, ideas, or expressions," and the representation of them as one's own original work.
source: Wikipedia

I am not claiming the codes as my codes, I stated that I got this from a tutorial.

About the group work thing, my point is they are not making any move so I had to stand up and start working on the codes myself. I kept on telling them to go help me but still they are not making any effort. Talk to the instructor? You expect him to care? He even gave us this insane project and let us go nuts with it. Learn to work with others? That should be addressed to my groupmates.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3