Kevin Peterson

Ranch Hand
+ Follow
since Mar 05, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kevin Peterson

Hello I am interested in working in colaberative effort on a game, could you please give a little more info on your game idea, i.e go into more detail on what the graphics will be like, 2D, isometric, or 3D (I ve written a game and a couple simple demo ideas in 2D) and just more on the game idea please.

- Kevin
18 years ago
Hello, I am creating a space style shooter and am currently tring to implement a star background(sort of like that Windows star screensaver where you feel like your moving forward). I pretty much have this finished and am now thinking about how images are going to enter the world. When you create an image that your are going to add to your scene in gimp for example would you draw it at its max in game size(in gimp) and then add it to some kind of imagebuffer in java and then scale it down and slowly scale it up as it moves close to you.

Thanks, Kevin
[ November 05, 2005: Message edited by: Kevin Peterson ]
18 years ago
Hello, Is there some kind of way to not have to click an applet when you open it before you can use your keyboard?

Thanks, kp
18 years ago
Thank you , I understand what you are saying and I belive GC in java is a good help but until I see game performance like Doom 3 ect.. that are being pushed onto shelves that are coded in pure java I will then feel dumb for under estimating javas speed. And please note I understand that theres articles saying how Java is just as fast as C++ and I belive that, its just that I m not seeing any results in the gaming sense.

-Kevin
18 years ago
yea so does garbage collector actully slow java down since it determines when to destroy your object. because in C++ being able to/required to destroy objects can be done exactily when you want it to which is generally right when the object is derefrenced as opposed to when more processing speed is needed.
By destroying the object right after it is derefreneced as opposed to when more memory is needed would allow for current live objects to run quicker and more efficently?

-Kevin
18 years ago
Hello, I am trying to learn some C++ right now, I am a computer science student at a college that bases thier curriculum around Java. I was trying to make some sense of heaps in C++, are there heaps in java but we dont need to do much with them because the garbage collector acts as the deconstructor()?

Thanks, Kevin
18 years ago
on a quick side note, after quickly viewing the thread, couldnt implementing the iterator interface help because it provides you with an add() method so you can add your data to an object array and randomly access it by adding a find() method to your code and sort through it using hasNext() and next(). The only problem would be that the data would have to be sorted by different attributes when loaded into the array for easy retrival. This would just be abstracting your data at a higher level.

- if this approach is totally wrong please correct me -

-Kevin
18 years ago
Actully throwing an IllegalArgumentException() works fine, Thanks David.
-Kevin
18 years ago
yea I understand but i compiled with with this above my code:



and got a compile time error. I was just wondering if there was a simple if statement that I stated above that would work?

-Kevin
18 years ago
For some reason I can't get asserts to work in this program i am writing, I was just wondering if the code I give after the current code will work instead?


-This uses asserts as you can see...




As opposed to this , notice the if statement.....




-Thanks, Kevin
[ April 12, 2005: Message edited by: Kevin Peterson ]
18 years ago
I'd like to run a spell check on a simple .txt document created in notepad, I am creating an io program thats main class is FileTransfer thats constructor takes two string args, one is the file being copied the the other is the file being written to. I am using a string tokenizer to brake down each line, word by word. The program works great overall with a few functionalites i v added in so now i would like to a run spell check if thats possible. Does Java support that.

- I also have another class Disk which handles simple io exceptions that the program will come to during runtime.

-Kp
[ April 09, 2005: Message edited by: Kevin Peterson ]
18 years ago
Do Keep in mind that the code i posted does work but it isnt efficient at all, that was just off the top of my head so please critique it as needed.

-Kp
19 years ago
Heres some code that works dor your question:


String ip_address = "172.17.91";
int j = 0, h=0;
char period = '.';
char array [] = new char[ip_address.length()];

for(int x = 0; x < ip_address.length(); x++){

if(!(ip_address.charAt(x) == period)){

array[j] = ip_address.charAt(x);
j++;}
else{h++;}



}

for(int i =0; i < ip_address.length()-h; i++){

System.out.print(array[i]);
}

[ March 08, 2005: Message edited by: Kevin Peterson ]
[ March 08, 2005: Message edited by: Kevin Peterson ]
19 years ago
I used BarGraphData which can easily generate bar graphs on a recent project, This might help you out.

-Kp
19 years ago