Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

113 Neutral

About Jeffige

  • Rank
  1. Jeffige

    code for a 2d java game?

    Wow! Thanks David. That is more & concise info that I have read in one spot. Actually, after searching a couple of weeks for a good starting java book, I eneded up with java, A beginners guide 5th edition. I have read, although I do not need to know complete java, I do need to know the core. After that, I can start on Android while still learning java. As for frameworks & libraries, No Idea! I have not gotten to that intersection, yet. I do know that I only want to create simple 2D games like Tetris, Space invaders, Tumbl on Android, and some simple kid games like where they snap the puzzle pieces into place and an ABC learning game. On one of the posts here at gamedev.net I read someone mentioned this (sorry I have forgotten who exactly) A complete understanding of the basics would be desirable. Specifically the following topics: •Declarations and Access Control •ObjectOrientation •Assignments •Operators •Flow Control, Exceptions, and Assertions •Strings, I/O, Formatting, and Parsing •Generics and Collections •InnerClasses •Threads I know even a simple 2D game is a lot of work for a beginner. So, I'm taking it one line of code at a time. Thanks for the replies.
  2. Jeffige

    code for a 2d java game?

    Thanks guys. David M, as of now, I just started to learn java (any programming for that matter) a few weeks ago. Self teaching/ learning with java, A beginners guide 5th ed. So, framework or engine? Couldn't tell ya. I was just thinking if I looked over the code from an actual 2D java game, it may help me to understand as I learn along. As for Android, that is my ultimate goal. Again, thanks for the help.
  3. I have started to learn java so I could create 2D games for Android. Out of curiosity, does anyone know where I could find a simple open source 2D game so I could look over the code? It may help ( even if I don't fully understand it, yet) to actually see code and how it was written out. A side scrolling game would be perfect since that is what I am aiming for. But, beggars can't be choosy. Thanks for any recommendations.
  4. Jeffige

    count++ & infinite loop

    Yeah I just got that as you posted. Thanks Ruler
  5. Jeffige

    count++ & infinite loop

    Um... nevermind. I guess this is why you should check the code first! [color="#006699"]for [color="#000000"](count = [color="#009900"]0[color="#000000"]; count < [color="#009900"]5[color="#000000"]; count = count + [color="#009900"]1[color="#000000"]); <<<<<semicolon - that's why it didn't work. sorry guys. So would that be more relevant, er... a better writing of that code? I just don't want to get into the habit of writing code people may frown upon.
  6. Jeffige

    count++ & infinite loop

    When I write: [source lang="java"]for (count = 0; count < 5; count++);[/source] it gives me: [size="2"]This is count: 5 [size="2"]From what the author says it's suppose to display the exact loop as the first example: [source lang="java"] for (count = 0; count < 5; count = count +1);[/source] thanks again.
  7. Working through java, a beginners guide 5th ed one of the examples: [source lang="java"]public class forDemo { // Demonstrates the for loop public static void main(String[] args) { // TODO Auto-generated method stub int count; for (count = 0; count < 5; count = count + 1); System.out.println( "This is count: " + count); System.out.println( "Done!"); } }[/source] The author goes on to say that the example is not good programming and that you will not see programmers use that example, you would probably se this instead: count++. But when I run it with the latter: [source lang="java"] public class forDemo { // Demonstrates the for loop public static void main(String[] args) { // TODO Auto-generated method stub int count; for (count = 0; count < 5; count = count++); System.out.println( "This is count: " + count); System.out.println( "Done!"); } } [/source] it runs "this is count: 0 infinitely thanks for any help.
  8. Jeffige

    Eclipse only shows java EE not java SE

    Man, thank you! I couldn't figure it out. I can't believe it was something so simple. Thanks for the help. If you don't mind: When I start a new java>project - src>new class, how can I keep the add [source lang="java"]public static void main(String[] args)[/source] so I don't have to check it every time? Thanks for the help.
  9. When I open Eclipse in the upper right hand corner it only shows java EE, not java SE & it only gives me the option to start a java EE project not a java SE one. I had to re-download and install eclipse. Be for i had a problem and had to uninstall it would allow me to start a new java SE project. Can any help me get coding again? Thank you for any help.
  10. I am following along with HeadFirst java. Got the path(s) correct, checked to make sure java was installed correctly with javac. I created a folder in: C:\Users\JEFFD\headfirst. Changed dir to C:\Users\JEFFD\headfirst. When I try and run javac MyVeryFirstApp.java, the dos window pauses for a half a second and returns with C:\Users\JEFFD\headfirst. public class MyVeryFirstApp { public static void main (String [] args) { System.out.println( "I Rule!"); System.out.println("The World!"); } } thanks for any help.
  11. Jeffige

    Think java exercise answers

    Any one care to help me understanding this? I found what is supposed to be the answer but I can't wrap my head around it. Like where did the 3600 come from on this line seconds_since_midnight = hour * 3600 + minute * 60 + second; Thanks for any help [source lang="java"]public class time { public static void main(String[] args) { int hour, minute, second, seconds_since_midnight, seconds_remaining, percentage_passed; hour = 20; minute = 14; second = 29; seconds_since_midnight = hour * 3600 + minute * 60 + second; System.out.print("Seconds since midnight: "); System.out.println(seconds_since_midnight); seconds_remaining = (24 - hour) * 3600 + (60 - minute) * 60 + (60 - second); System.out.print("Seconds remaining in the day: "); System.out.println(seconds_remaining); percentage_passed = seconds_since_midnight * 100 / (3600 * 24); System.out.print("Percentage of the day that has passed: "); System.out.println(percentage_passed); } }[/source]
  12. Does anyone know if there are any answers floating around to the exercises in Think Java: Think like a computer scientist by Allen Downey? I'm stuck on exercise 2.11 - the 24 hour clock. Thanks for any replies
  13. I am trying to find out how to start Eclipse Juno with a blank workspace when I start a new java proj. i.e when you start a new project it shows [source lang="java"]public class HelloWorl { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("Hello XDA!"); } } [/source] I would like to start with a blank workspace and write everything from scratch myself instead of Eclipse starting with [source lang="java"]public class GameDevExample { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub } }[/source] since most tutorials have you write the code starting from the opening lines. Also, is it possible to start with a blank project or no project at all when Eclipse Juno starts? Right now, it starts with the last project. I've tried looking through eclipse preferences and spent about 30 minutes on google trying to find the answer, but no luck. Can anyone help? Thanks for any help given.
  14. Jeffige

    swing or not to swing

    Thanks for the replies. Since I'm just starting out, I don't want to be overwhelmed with learning too many different things at once. I'll just be the tortoise. Not really looking to win the race, just to have fun running it. (yeah, I don't know where that came from) Anyway, I'll just walk through the tutorials that I have, yes 1 of them does include a short tutorial on swing. But, it seems to go hand in hand with the rest. Thanks, again.
  15. I was copying a couple of tutorials at zetcode.com http://zetcode.com/t...java2dtutorial/ http://zetcode.com/t...agamestutorial/ to turn them into PDF's so I could read them while I travel and the site mentioned java swing. I have recently undergone the task to learn java programming as my first language. (please don't ask why java. The back and forth from other posts left me loopy). I will hopefully be making simple apps and/ or 2D games for both PC & Android. So, do I need or should I learn java swing? Thanks for any help and enlightenment.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!