Jump to content
  • Advertisement

Chadwell

Member
  • Content Count

    143
  • Joined

  • Last visited

Community Reputation

130 Neutral

About Chadwell

  • Rank
    Member
  1. Chadwell

    Simple Java Graphics Question

    You don't need to return the Graphics object from the Test method. Since you are passing a reference to the Graphics object into the test method, any call you make on the Graphics object from inside the test method will effect the original Graphics object as well. There is no need to reassign "g" after you pass it into the method.
  2. I would suggest against this. First, it will annoy people that you update the app that often. Second, the people that will be downloading it have no understanding of a development cycle, alpha builds, or anything else like that. All they will be thinking is "Why doesn't this work?". If you really want it to be tested as you develop it, I would give it to family and friends to play.
  3. Chadwell

    Java question

    Quote:Original post by rezz12 i saw what my problem was before, only the first column of the array had any thing in it because it read a String line from a file. so all the other array position were empty. I changed the code so that each character is added separately but now i only have one row of the array getting in to it. where is my code. File inputFile = new File(inputFileName); Scanner in = new Scanner(inputFile); in.useDelimiter(""); for(int i = 0; i < ROW; i++) { for(int j = 0; j < COLUMN; j++) { while(in.hasNextLine()) { maze[j] = in.nextLine().charAt(j); break; } } } in.close(); It looks like you are trying to have each array element "i" be a line from the file, with each character being in "j"? calling nextLine() on each iteration means that you are only extracting a single character from each line. Remove the while loop, like this: File inputFile = new File(inputFileName); Scanner in = new Scanner(inputFile); in.useDelimiter(""); for(int i = 0; i < ROW; i++) { if(in.hasNextLine()) { String line = in.nextLine(); for(int j = 0; j < COLUMN; j++) { maze[j] = line.charAt(j); break; } } } in.close(); I think that should give you the functionality you are expecting.
  4. Quote:Original post by Kiada Lots of great responses in this topic. Thanks loads for taking the time. Some really good questions posed too. It's a shame my local university doesn't do a programming course though, else i'd already be on it. It's family related things that stop me travelling to universities that do game programming courses though (engaged with a baby on the way).. I really liked the 'Do you enjoy the problems you encounter in programming?' question. No, I don't. But I absolutely love working hard at them, and the feeling of accomplishment once I've overcome them. Does that count? Also, thanks frob for your really detailed response - it puts things into perspective. I guess a lot of people who love games have many ideas for them, but I'd love to work on an idea and see it through to the end - see it come to fruition. But I'm under the impression that just isn't the way of the industry. It's a job afterall, and once employed you can't always know which game project you might end up on. Is it a feesible idea to work on something as a hobby and just hope it comes into fruition one day as I previously described? Independent I guess. If the thrill of accomplishment out weights the frustration when solving the problem, I'd say that is a plus. There are many times I want to toss my computer out the window when working out problems, but the feeling once it is solved makes it all worth it. Before you can enjoy game programming, you have to enjoy programming, because you will need to learn to program before you can learn to program games. You will spend a bit of time writing simple and fairly boring command line programs to begin with, and your programs will progress in complexity and difficulty as you become more familiar with your tools and ability. If you simply want to design games, developing them may not be for you. I get a thrill out of building and creating things, and an empty eclipse project is like a blank canvas for me. I started out with my eye on game programming, but a very strong desire to learn programming in general. I can tell you that as of now, I work full time as a software engineer, and in my free time I create games for mobile phones. So yes, you can create games as a hobby, and make some money from them too.
  5. Chadwell

    Questions about java games.

    Quote:Original post by The_Paradoxataur My second question is if i was working on an app for the android market. How would i be able to position stuff on the phone, in example, the official myspace app. If ya'll could link me, to something that could inform me how this works it would be nice. ideally a sample of code. Thanks again for your answers ahead of time. It depends on what type of app you are trying to make. If you are making a non-game app, you use different types of layouts in xml files to arrange your different views on the screen. You can also create your interface programmatically by passing in LayoutParams to specify size and location of different views. http://developer.android.com/guide/topics/ui/index.html
  6. Chadwell

    C++, tell me a good approach to testing

    The testing method you are using is very similar to a popular type of testing called "Unit Testing". Look up unit testing, and see if there are any unit testing frameworks for C++ that will make your testing easier.
  7. Chadwell

    Java as a second language?

    Quote:Original post by BCullis What tripped me up was the transition to "reference by default". Where C++ passes by value, Java will always pass by reference because all objects are treated like references. (and if I just horribly mis-described that, someone more knowledgeable feel free to smite me, this is just how it was explained to me). This was stated a bit wrong. Java passes every reference by value. So, passing a reference of an Object to a method, inside the method you will have a new reference variable that contains the same value as what was passed to it. If you assign a different object, or a new object to that local variable, the original reference passed to the method will not lose it's reference to the original object, and will not point to the new one created. public void foo(Object obj2) { //The local variable obj2 now contains a reference to a new Object obj2 = new Object(); } Object obj1 = new Object(); foo(obj1); //obj1 still points to the original object
  8. The emulator is pretty good, but it has it's own quirks that makes having a device almost a necessity. For instance, using opengl on the emulator, loading up textures that aren't power of 2 dimensions will work just fine, but will only be white boxes on a real device. I've also ran into an issue where something with the z axis caused the textures to appear on the emulator, but not appear on the device, but I can't remember the specifics right now. Also, the emulator doesn't really support an accelerometer. It's also very slow in general when compared to a real device, and games are pretty much unplayable if you are running the debugger. Otherwise, the emulator is a decent tool to begin working in, but you really need a device if you want to publish. Good luck
  9. Chadwell

    Alternative to Sleep() ?

    As Hodgman said, use the elapsed time to calculate changes in your game objects. Here is a great article about time steps(and physics) if you are interested... http://gafferongames.com/game-physics/fix-your-timestep/ Also, adding a small sleep call to your loop isn't necessarily bad. A sleep call small enough that it won't inhibit your run time performance will help reduce cpu usage and allow other tasks to get processor time on single processor systems.
  10. Frankly, I haven't attempted integrating C++ into my Android development, I've only done pure Java so far, but I would really recommend Eclipse. I used to primarily use Visual Studio and think Eclipse was clunky, unintuitive, and hard to get around too. The Android plugin for Eclipse is extremely nice for creating and packaging Android applications, and after feeling somewhat "forced" to use Eclipse I've grown to like it a lot. It may take you a little bit to get used to it, but it is really nice to use. The Android Eclipse plugin makes launching emulators, loading applications onto the phone and emulator, and packaging APK files for release extremely easy. That in itself seems reason enough to use Eclipse to me. Good luck.
  11. Chadwell

    Creating Apps for Ipod/Iphone

    If you already know Java, give Android development a whirl. The Android SDK is all Java based, there is a great Eclipse plug in that makes developing for Android a breeze, and you only have to pay a one time $25 fee to publish to Google's Android market. Good Luck!
  12. Chadwell

    2D games comercially viable as standalone?

    If you want a market that gives viability to 2D games, definitely look at a mobile platform. I have been developing simple 2D games for the Android system with great success. It's also really enjoyable too. Check it out! http://developer.android.com/index.html
  13. Chadwell

    Which Library?

    I usually go to my local library, they have a lot of books. Oh wait... Kidding aside, I'd recommend http://videotutorialsrock.com/ if you know C++. He uses GLUT and I think he explains it very well, if you are fluent enough in English.
  14. Chadwell

    I suck at math!

    I'm not particularly good at math, but I do fairly well programming. I struggled through my math courses but I do really well in all of my Computer Science courses.
  15. Chadwell

    C++ and OpenGL or C++ and SDL

    Quote:Original post by Wavesonics Might I suggest OpenGL + SFML? +1 for SFML.
  • 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!