|
Hey everyone, I just thought I should release the source for my project GrahamJr's 2Dl. It would be very useful to people who are new to Java 2D game programming and who ever else is interested. Please comment if you download I also want feedback of things that are done well or could have been done better. I will be posting more game projects in this forum but for now I'm releasing this and working on the next one. PLEASE NOTE the game is not fully functional but contains all the code that is supposed to be there, also missing player sprites but this is just for learning not leeching so it doesn't matter. Someone with half a brain can make this fully working again so enjoy. Again comment and feedback would be greatly appreciated!
Download: Download Graham.Jrs2D.rar @ UppIT
Thanks for downloading
Umm, I set the project up in eclispe and I'm getting errors from the sprite cache. Theres like a dozen methods missing.
The game isn't supposed to be functional it is just for learning experiences. If you wish to further explore Java2D development I suggest you leave me a PM with your skype name, thanks.
Good job ill take a look at it
also missing player sprites but this is just for learning not leeching so it doesn't matter. Someone with half a brain can make this fully working again so enjoy
Edit: The particle system could be optimized good job you might want to look into executors
Looks really cool though man. Gj.
Thanks guys keep the feedback coming
Edit: After re-reading my post, it sounded rude at first. Let me start off by saying: Good job, glad to see you're contributing to the programming community.
Now for code feedback..
Could use some major restructuring. Also, your use of enums is questionable; you create an enum for each direction, and use it to store the keyCode. There is no need for this; create an int (currentKey), and switch on it like you would an enum. Gets rid of the useless object creation. I see you created an "activeKeyCode" int, but why have the enum?
Don't use final unless you need to. Had me looking for anonymous classes.
You should store passwords as char[]. Strings are immutable, meaning theres no way to get rid of it until GC kicks in. This leaves your password looming around in memory till clean up. If you use a char[], you can wipe the information imediately after you're done with it.Code:passwordb.append(c); password = new String(passwordb);
Should be at the top of the method. It should be to first to trigger to ensure no unneccesary calls/assignments/ect.. For example:Code:if (Game.GAME_STATE != 0) return;
The assignment and cast is still occuring, even if you end up returning.Code:Graphics2D g2 = (Graphics2D) g;
Good job for the effort. Also for allowing others to possibly learn off your work (seems rare). But, the design, as well as some of the smaller things, still needs fixing up. I'm not gonna look through the entire thing right now (on my phone, pretty tedious), but if you're ever working on a program, feel free to ask for opinions if you feel mine were helpful
Thanks for the feedback, fortunately my most current framework looks nothing like this. This will be very helpful to people using this source to build from.
Thanks for such a beuty realease, we all gonna learn something from this
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |