vincent Member Posts: 129 From: Amersfoort, the Netherlands Registered: 12-23-2002 |
I didn't mean to spam the board, but could I someone give me some idea of how many Java programmers there are here? and who do have an hour or two a week to spare? | |||
CobraA1 Member Posts: 926 From: MN Registered: 02-19-2001 |
No time to spare (working on my own project), but I do program Java. | |||
Gift Member Posts: 85 From: Palatine, IL, USA Registered: 02-11-2001 |
I am doing my game in Java I'm pretty much a newby though. I also don't have much time as I'm trying to make a drive to a first playable. Love in Christ |
|||
Gift Member Posts: 85 From: Palatine, IL, USA Registered: 02-11-2001 |
Of course I wouldn't mind some java help my self. Does anybody know how to do the mouse listener stuf?? Love in Christ |
|||
vincent Member Posts: 129 From: Amersfoort, the Netherlands Registered: 12-23-2002 |
Mouselistener is easy. Java.sun.com always has a lot of tutorials. http://java.sun.com/docs/books/tutorial/uiswing/events/mouselistener.html Good luck, |
|||
Destroyer Member Posts: 31 From: Bismarck, ND Registered: 10-06-2002 |
Iv been learning java in school and have been getting into some more advandced things lately, i don't know how advanced you want, but i probably don tknow it now but the class is AP so it is fast paced so i should be pretty profiecient by the end of the semester | |||
GUMP Member Posts: 1335 From: Melbourne, FL USA Registered: 11-09-2002 |
Heylo, just finished a 2 year project using Java. | |||
Imsold4christ Member Posts: 305 From: Gresham, OR, US Registered: 01-20-2001 |
I do java, but most of the time I'm too busy to be of much help. Now is one of those times. †Caleb† ------------------ |
|||
Christian Member Posts: 400 From: Australia Registered: 09-15-2002 |
Just now learning J2EE, to compliment my C#/ASP.NET skills. |
|||
Wacko4X Member Posts: 92 From: Bellvue, WA, USA Registered: 08-21-2002 |
I would like to help but I am just learning java at school.... Hey if you guys know of any really good tutorials or books that would be great cause I do want to become a programmer! Wacko ------------------ Matthew 11:18-19 NIV Every man has a battle to fight, an adventure to live and a beauty to rescue. ~John Eldrige |
|||
Gift Member Posts: 85 From: Palatine, IL, USA Registered: 02-11-2001 |
I got a pretty good book called "Black Art of Java Game Programming" and a book called "Game Arcitecture and Design" and also read alot of stuf on www.gamedev.net and www.gamasutra.com Love in Christ |
|||
logk34 Junior Member Posts: 1 From: Morris, MN, USA Registered: 02-16-2003 |
I'm learning Java in college at the moment. I have been searching the web for some open source opportunites that would allow me to help out the Christian community with some usable software. Does anyone know any good projects that might need some help? If not we should try to come up with some good ideas that would be helpful. God Bless, Kevin |
|||
Destroyer Member Posts: 31 From: Bismarck, ND Registered: 10-06-2002 |
well depending on how far into it you are, my teacher puts all his stuff online so you could try some of the programs no cource for them ovbiously but they are fun to see what you can do | |||
Gift Member Posts: 85 From: Palatine, IL, USA Registered: 02-11-2001 |
Hi Guys, I'm working on a Christian Video Game Applet, I don't have much experience with Java so I'm having a few minor diffuclties. 1. I am getting some sort of exception thingy poping up in my console, 2. I'm trying to draw a string onto my graphics buffer and it has some major issues and is spitting out all sorts of exceptions, would a catch exceptions thingy work here too? Well just talking about it I have a few ideas, I would like to hear yours, if you would like to help out or what ever I wouldn't mind talking about it. I'm really trying to get something playable by CGDC. |
|||
Destroyer Member Posts: 31 From: Bismarck, ND Registered: 10-06-2002 |
import java.io.*; public class *class name* { public static void main(String args[]) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader (System.in)); |
|||
Gift Member Posts: 85 From: Palatine, IL, USA Registered: 02-11-2001 |
I found out that it was a java.lang.NullPointerException I think it means that the object that I'm trying to talk to is null, I don't know why. I'll have to work more on this tomarrow. Thanks for the help. Love in Christ |
|||
CobraA1 Member Posts: 926 From: MN Registered: 02-19-2001 |
quote: Java should tell you which line is generating the exception. Sounds like you're trying to access something that doesn't exist. Telling us what kind of Exceptions you are getting might help. Source code, if you're willing. Possibilities: -You might be trying to create an object, but it isn't being created - check to make sure everything you create with "new" is actually being created. -You might be trying to access something before it's created. Make sure what you're trying to access was actually created somewhere in the program. (rant) Making main rethrow the exception - not good idea destroyer. This would be better:
I also find it weird that destroyer's suggesting hooking a BufferedReader directly to System.in - I've never had to do that. Then again, I've never written a gaming keyboard routine for Java. I imagine that one would look for a way to detect keys going up and down, so the game can handle simultaneous keystrokes. A KeyListener listening for keyPressed and keyReleased would probably be better for a game. (/rant) Gift, make sure whatever you are trying to access exists!
won't create an object!
will create an object. My guess is that somewhere you forgot a "new" statement. Unfortunately, I don't have enough information to make anything better than an educated guess :/. |
|||
Gift Member Posts: 85 From: Palatine, IL, USA Registered: 02-11-2001 |
Hi Guys, Thanks for the help. I wouldn't mind emailing you guys the source. If you wanted to take a look at it. its giving the exception at this statement: It looks like I have did all of those new statements but its definatly not acting like it. The constructer looks like this: If you guys have any more questions feal free to ask. Love in Christ |
|||
CobraA1 Member Posts: 926 From: MN Registered: 02-19-2001 |
Wait a sec . . . Shouldn't the line be ?? That's it! Your code is trying to create an array of RegionArray's, when it should be creating an array of Region's! Silly me, and I almost posted a reply about figuring out whether i was going out of bounds, and how to make sure the new statements were indeed allocating memory . Guess I didn't need to. BTW, I prefer to put lists like this in a file for easy editing - hardcoding this stuff will make the program less flexible, especially if you plan on adding more regions in the future. |
|||
CobraA1 Member Posts: 926 From: MN Registered: 02-19-2001 |
Don't feel bad about it, BTW - I've had times where I've gone almost crazy trying to find a showstopper bug, only to find I've missssspelled something . Having a team - or at least having somebody review your code - really helps. God be with you and your project . |
|||
Gift Member Posts: 85 From: Palatine, IL, USA Registered: 02-11-2001 |
Hi, Thanks, that might have been a problem but the behavior is still the same. And I also decrimented the 'i' variable one and that didn't didn't change things either. This might take awhile to solve. Love in Christ |
|||
CobraA1 Member Posts: 926 From: MN Registered: 02-19-2001 |
OK, try this:
and post the results from the Java console or terminal on this board. If I can't figure it out then, I guess you'll have to email the source code. My email address is jeremiah_moss@cobraa1.com . |
|||
Gift Member Posts: 85 From: Palatine, IL, USA Registered: 02-11-2001 |
Here's your mod: public void handleMapUI(int x,int y) { Here's the output: It looks like it was probably thrown 20 times. java.lang.NullPointerException Line 72 is the if statement. Love in Christ |
|||
CobraA1 Member Posts: 926 From: MN Registered: 02-19-2001 |
Well, it's time to figure out exactly which variable(s) are null. Take out my try{} block, and place this code before the for loop:
This should tell us if there's something that hasn't been created yet. We'll slay this bug eventually. On a side note, that should be
- but we shouldn't do that modification until after we've squashed the bug. |
|||
Gift Member Posts: 85 From: Palatine, IL, USA Registered: 02-11-2001 |
Were making progress, RegionArray is null I make the Region Sovereign in my main sorta like this:
public class RegionSovereign { the rest has been previously published. Hope this helps in finding the bug. Love in Christ |
|||
CobraA1 Member Posts: 926 From: MN Registered: 02-19-2001 |
Is handleMapUI inside the class RegionSovereign?? Check the scope of RegionArray, make sure handleMapUI can see it! If that's not the problem, E-mail me the code. It's hard to diagnose the problem from here. |
|||
BenjaminBenz Member Posts: 15 From: timbuctu, Alberta, Canada Registered: 12-22-2002 |
I do Java as my main programming. However my main programming isn't the top of the line stuff that you'd probably want. What wouldja have in mind exactly?:) ------------------ |
|||
Gift Member Posts: 85 From: Palatine, IL, USA Registered: 02-11-2001 |
Woo Hoo, I solved my bug, if you look above you can see that my constructor was declaired void. That is really wrong and probably explains why I was getting a null pointer exception. My game will be a pretty basic 2D game. I'm trying to build the UI far enough to get the game play and the features far enough to convince some people that its a worthwhile ministrey, people need to catch the vision, to get some people to help make everything better. Love in Christ |