Thank you, it helped alot!
Type: Posts; User: albin1228
Thank you, it helped alot!
I have knowledge of java on a beginner level, and recently my friend started learning. He has gotten a bit and we are thinking about trying to make a program together, but the problem is I'm not sure...
Well I did print out some other things earlier but I didn't know you could print the entire rectangle! I did that and I saw that for some reason the rectangles weren't updating their x and y . For...
I am trying to make a game in java were I have 3 objects, a bike, a rock and a coin. The objective of the game is to jump from different lanes using the arrows keys to avoid rocks while collecting...
Yes I did think about doing that but then I changed my mind when I saw the size of it. The thing is that I need to finish the book before I get too tired of reading it. Because if I do then I wont...
Well if I dont get any suggestions i might as well read the book i found. Here is a link for the book/tutorial:
Javanotes 6.0 Table of Contents
Do you have any good tips that are kinda like what i described in my first post? Or will the 5.0 book work?
Well the problem is that in my local library there are no books on java. I live in a village so the library is not very big. Ofc I can buy a book but I would rather just have a pdf file that I can...
Im thinking about reading a book about java called Introduction to Programming Using Java by David J. Eck.(Idk if its called that but thats what it says.)
I know some basics about java and I want to...
Ok ty. And does anyone have a pdf of some good java book?
Okay nvm no need to post in this thread anymore.
Well I can start by saying that i have very basic knowledge about programming in java and just programming in general. I learned what I know right now by watching videos. I watched them in my native...
Im sorry for the delay but i think I know what the problem is so it's fine now.
Hi!
So im trying to make a simple drawing program and on the top of the screen im going to have a bar with dropdown menus with different colors and tools etc. My class that includes the methods used...
Fixed. Im sorry for the long post and thank you for answering
I was wrong
Not yet but its getting there i think.
Well i have changed everything with seperate variables to for example hero.x. Here is the code that makes the Player rectangle move:
public void setXDirection(int xDir){
this.xDir = xDir;
}...
This is some code i have for the rectangle:
Rectangle hero;
int heroX,heroY;
int xDir, yDir;
int width,height;
heroX = 100;
heroY = 100;
Oh okay i will try that in a while
--- Update ---
When i do that it only displays the same coordinates all the time. Its like the rectangles i drew and created as objects arent the same. Im not...
Do you mean like the x and y coordinates or?
Im not even sure what im supposed to put and where. I have never debugged with println before and i have no idea what variables i should print and where even after i red your first post.
I dont know what the problem is and i will probably just give up.
Well i put a println in the following way:
public void collision(){
System.out.println("COLLISION");
if(enemy.intersects(player.hero)){
System.out.println("FALSE");
isGoing = false;...
Well i havenīt fixed the problem. But it seems if(enemy.intersects(player.hero)) is never true...
--- Update ---
This is so annoying. I cant find the problem! Why doesnīt the intersecs work!?
...
Hello again guys!(I wrote another post yesterday)
I have encountered another problem. It is probably another one of these things were i forget to put some code in and it doesnīt work. Well the...