I was thinking maybe combining the tools and objects classes into one tools.class and objects.class with delicately crafted constructors.
Type: Posts; User: Spidey1980
I was thinking maybe combining the tools and objects classes into one tools.class and objects.class with delicately crafted constructors.
Hi again.
Ok so I have been developing a zelda clone. It works beautifully. I just want to clean up and organize my project folder. I started with everything in the same folder. To begin...
I have a work in progress a game with the the same functionality you are looking for. What I am doing is just working with images. So I have fore example, a method
public BufferedImage...
never mind I rebuilt my loader and my parser works perfect now!
unicode, specified it in the writer but not the reader...
using IOOperations.java sub class from Java programming for the...
I have a test.txt file with the following in it:
MapTile,1,256,false
MapTile,9,291,false
no matter what way I try to read this file in java, the result is:
is the new line escape not working? "first line \n new line"
nevermind I got it, (WindowEvent wE) should be (WindowEvent e). Why the the book had it as "wE" and not "e" i'll never know.
On my journey through my java Book, I'm starting to learn about frames.
When you click the "X" to close the window, this program does not completely terminate for some reason, you have to use...
You forgot to extend the class you are using super for.
Your main is not a pacakge.
Try importing the package instead.
import directory/pck1.*;
And that is not how you define a main. Should be:
public static void main(String Args[]) extends...
Thats great! I love it. You took the vector math even further. WOW.
So basically use the logarithm to find the distance x,y is from 0,0 and reject anything that is further than 99 pixels away...
Fixed, lol, I was trying not to spoon feed too much. My book has errors in the examples, a headache, but it makes you figure it out on your own.
Put together the example I showed you. Put the...
Welcome to the club. Are you learning Java in school or on your own?
Seems to me that there are multiple solutions to this.
The pen and paper version:
1) 96 stools and 3 tables( (96*3)+(3*4) = 300)
2) 92 stools and 6 tables( (92*3)+(6*4) = 300)
3) 88 stools...
There's a lot more to it than just upping your code onto the mp3 player. Most companies do not allow changes to be made that easy to their products. Hacking something (like putting linux on a...
What I'm talking about there is that I do not want a star to start close to the edge to immediately move out of range. So that the Stars actually have a little more time on screen, I start them near...
LOL I don't think you can make a circle out of a 2x2 square of pixels. If you Talking about the fillRect in my code, that's the background. Easier than erasing each star, and visually there is no...
It did work, how ever my code has been polished and the random generators are now in the constructor. Infact new values are no longer created like that, myX, myY, ect only get values set to them...
If it works in the unmodified code being defined more than once.....I don't get it either.
Thank you everyone for all your help. Here is the final polished version:
StarScape.java
// starscape.java
// by Jon Crawford
import Star.*;
import java.awt.*;
import java.awt.event.*;...
I musta been tired last night. Thread(this) gave me a "variable this not found in StarScape.class" so I had removed it.
however this morning I tried it and it works perfectly. I guess I just...
You should be held back a year in school there...
But so that does not happen....
import java.util.Random;
...edited by moderator
look in EntityBullet.java and EntityBullet2.java and looks like entityPlayer owner should be public.
My StarScape is still not running on its own after adding threading. I still have to click or resize to see the next frame of animation.
new StarScape:
// starscape.java
// by Jon Crawford...
they do get in there though. the random numbers get to the constructor because I did not declare them private. I was having a problem using the random in the constructor because my star.class was...