Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: 2D Platformer on: 2010-07-08 01:07:34
ya know, i thought that too at first, but that renders the whole leftCollision, rightCollision ect variables useless. I think i figured that much out. Because no where in the program it says to reset the collision variables, it just resets them inside the if statements. I have figured it out though. Thanks.
2  Game Development / Newbie & Debugging Questions / Re: 2D Platformer on: 2010-07-07 23:28:53
i've looking through, and while a majority of it makes sense, there are some points i dont get because of undeclared variables that are referenced.

moveX = x + dx * pos;
moveY = y + dy * pos;

dx and dy were never initiallized, so im not sure what to do with that. i think you ment vx and vy, but i want to be sure.

if(collisionLeft && vx < 0)
{
     vx = 0;
     leftCollision = true;
     break;
}
else
     leftCollision = false;

collisionLeft was never initiallized. I think you wanted the variable leftCollision, but that wouldnt really make sense to have it be true to get into the if, and then set it true in the loop. The rest of the if statements are like that as well except the last one, which is the way i think this should be.
3  Game Development / Newbie & Debugging Questions / Re: Setting a variable to another on: 2010-07-07 11:19:12
Well I found my issue, and now I feel pretty stupid. I was checking the wrong variables for changes. The values I  check change, but not quite yet in my game. So I tried updating values that are incapable of being different in my game yet. I don't know how i managed to skip over that. I fixed it though, and its all working. Thanks for the help though. My issues never seem to be what I think they are -.-
4  Game Development / Newbie & Debugging Questions / Re: 2D Platformer on: 2010-07-07 11:10:33
That surprizingly makes sense. Alright, Ill work with that and see what I can get. thanks so much!
5  Game Development / Newbie & Debugging Questions / Re: Setting a variable to another on: 2010-07-07 11:07:48
well my issue wasnt the == vs .equals, i had that correct, i even tried the string = new String thing, and that didnt work, so heres my code

I call this to set that variables to make them the same

wep2 = wep; wepid2 = wepid;
body2 = body; bodyid2 = bodyid;
bodyc2= bodyc;

i call this to check the variables to see if they are the same, which they never are

if(!wep2.equals(wep)||!wepid2.equals(wepid)||!body2.equals(body)||!bodyid2.equals(bodyid)||!bodyc2.equals(bodyc))
     return true;
return false;

that is the only place they issue shows up. Maybe I missed something small, idk.
6  Game Development / Newbie & Debugging Questions / Setting a variable to another on: 2010-07-07 02:48:37
I read somewhere that when you set a variable to another like say x = y, all that is done is the path of y is copied to x, so whenever y changes from thatpoint on, they always stay the same. Idk how true that is, but i seem to be getting an issue involving something like that in the game I am making. To check to see if a variable has changed, i just set a variable to the old value of it, or rather what the screen is drawing, and check it with the current. in the init, and in the fix, i just set the current variables to the old storeage ones, so the path is getting copied, so whenever i change the current one, they change with them. sorry if thats confusing, anyone have any idea of how to fix that?

EDIT: So I've verified myself that java copies thel ocation of the variable to the other, linking the too, atleast with a string. I need a fix for this though. I tried adding "" to the end, but then it says that the 2 strings are different, when they are exactly the same. I havnt any idea how to fix this, so any help would be great.
7  Game Development / Newbie & Debugging Questions / 2D Platformer(answered) on: 2010-07-06 21:57:38
Im attempting to make a 2D platformer, and i really have no idea how to work out the physics and movement completely. I can get my player to move side to side with the arrow keys, and he stops fine, but when i start implementing physics in anyway into it, it doesnt work as well. Does any have a simple platformer code theyve seen/ have on hand? i've been looking for awhile, and i just keep finding overly complicated things.
8  Game Development / Newbie & Debugging Questions / Re: 2D Physics engine and tutorial for the engine? on: 2010-07-05 15:58:24
alright, ill look into them then. I thought itd be too different to go off of a C tutorial. Thanks for the help. I'll report back if i get stuck with something.
9  Game Development / Newbie & Debugging Questions / Re: 2D Physics engine and tutorial for the engine? on: 2010-07-05 15:47:01
sorry, but my main purpose of this was to get an engine WITH a tutorial. I've come across phys2d many times, and thats what i've been intending to use, but i cant find a basic tutorial no matter where i look. any links i find end up being broken -.-
10  Game Development / Newbie & Debugging Questions / 2D Physics engine and tutorial for the engine? on: 2010-07-05 15:21:32
Im using slick for a game engine right now, and I need a physics engine that works well with it, anyone have a link for an engine and a tutorial for it?
11  Game Development / Newbie & Debugging Questions / Set Font in Slick on: 2010-06-23 21:24:28
Seemingly its overly complicated to just set a font in slick. I cant just do Font font = new Font(); anymore. Is it just as easy, and Im missing something? Like some far off class in the sub folders of the slick api or something?
12  Game Development / Newbie & Debugging Questions / Mini Map? on: 2010-06-07 03:32:13
Im trying to make a mini map that is simply the graphics page I am drawing on scaled down to a certain part of the screen, obviously leaving the full image up. It is just going to show the parts of the graphics page that are drawn off screen. I can seem to figure it out though. I am using slick so you all know. If i wasn't using slick, I'd be able to do it as I've done it before, but the graphics and images in slick seem to be much different to increase speed, but its screwing me up -.-

Basically what I tried to do was create an image, and a graphics page, set the image and graphics to be identical, so whenever I draw on the graphics, it sends it to the image (graphics = image.getGraphics()) and then just draw the game to the graphics page, and draw the image to the screen, and draw the image again, but smaller on the gui. Any help is much appreciated.
13  Game Development / Newbie & Debugging Questions / Following a landscape (2D) on: 2010-06-04 16:53:24
I know I ask a lot of stupid questions that have probably been answered before, but I never seem to find my answer.

Im trying to program an object to follow along the landscape that I made, Right now, the landscape is only in a picture. All I want is to have the object follow along the landscape and change the direction to be parallel with the ground as it goes. It doesn't need to be overly complex as there wont be a situation where the object cannot go up or down, it is a basic landscape.

If you can at least provide a link to an old thread that is fine, as there probably is one. Search engines and I do not get along :\
14  Game Development / Newbie & Debugging Questions / Re: Limit frame rate in slick? on: 2010-06-02 16:40:56
That makes perfect sense. Alright, I'll have to use that then. No need to worry about the frame rate pushing to the max if everything stays with the correct speed then. Thanks a lot.
15  Game Development / Newbie & Debugging Questions / Re: Limit frame rate in slick? on: 2010-06-02 15:25:46
if you could, give a brief overview of how delta keeps things where they should with the logic update? I've seen examples of it, but can't seem to find a description of it on slick wiki. I think I'm going to need to use it, but I have no idea how to yet.
16  Game Development / Newbie & Debugging Questions / Limit frame rate in slick? on: 2010-06-02 01:31:32
I noticed that when I run slick, though it runs at a fantastic frame rate, it EATS my cpu usage. Is there a way to limit the frame rate to say 100 to cut back on cpu usage? Right now its running at like 2000 fps, and thats a bit excessive.
17  Game Development / Newbie & Debugging Questions / Re: AI, Kinda on: 2010-06-01 23:01:01
My god. Thank you! That was exactly what I needed. I don't know how I skipped over even thinking about it that way. That completely fixed my issue and everything is now working as it should. Now all I need is a smart way to keep the stupid object in a certain box, but it all works now, and that is what matters. Thanks everyone for the help. I appreciate it.
18  Game Development / Newbie & Debugging Questions / Re: AI, Kinda on: 2010-06-01 22:10:54
how I handle the direction of which I add and subject to x and y is all wrong. Thats my main issue right now.

I've seen people around using floating points for this, but I am not exactly sure on how they work with that. Can anyone help me out with that? I know that I will be doing something along the lines of x+=Math.cos(angle); and y+=Math.sin(angle); but I am not sure on how to handle that angle. Ideally Id like to store angle as an int that is just between 0 and 360, just so I can understand it in my mind, but if there is some other way that I must deal with that is fine. Not sure if I am asking this right or not, but hopefully someone will make sense of this nonsense. In my defense, I am confused as hell -.-
19  Game Development / Newbie & Debugging Questions / Re: AI, Kinda on: 2010-06-01 15:19:23
You were right, I was looking for wandering, though I'm not quite sure I completely get it.

I know I will need a direction for the main object, and then also a direction that the main object will try to align itself with I guess? How would I manage to convert all that to actually move the object itself? Thats where I get caught up mainly. I've never actually tried to move an object with just a direction variable myself. Sorry if it seems like a stupid question. I think I'm missing something completely. -digs into massive brain dump of mathematical equations- I'll update if I think of something, otherwise, any responses will be helpful!
20  Game Development / Newbie & Debugging Questions / AI, Kinda on: 2010-06-01 01:13:32
Im trying to just make a simple game to simulate typical life from day to do (wild life)

I got to the point where I am adding bugs, specifically lightning bugs, and I got extremely confused -.-

I have nothing to post, just need some theory here. I want to make a lightning bug for a 2D platform like setup, to make it fly around like a lightning bug would. I have the lightning bug lighting up as it should and all that, I just cant figure out how to change the direction and all that well. I really have no idea where to start with this, so any help would be great. Thanks in advance.
21  Game Development / Newbie & Debugging Questions / Re: Slick and Eclipse on: 2010-05-21 02:33:32
No need for any assistance lol, I updated to the newest lwjgl and now it works like a charm. Sorry for slow responses. Thanks for the attempt though lol
22  Game Development / Newbie & Debugging Questions / Re: Slick and Eclipse on: 2010-05-20 01:55:16
So, I've figured out that my problem is with the version of lwjgl i am using. My problem is that it wont work on windows 7 ultimate. I tried it out on a windows xp comp at school, and it worked instantly without hassle. Is there a lwjgl version compatible with both windows 7 and windows xp?
23  Game Development / Newbie & Debugging Questions / Slick and Eclipse on: 2010-05-19 02:31:23
I have a basic understanding of eclipse, but I cannot seem to get Slick to work with it. I get everything imported correctly, with lwjgl being referenced with the correct native library and all, but whenever I compile it, it just tells me 'Failed to initialise the LWJGL display'

Any tutorials that are up to date and indepth would be great. I can't seem to find any good ones.

Thanks for any replies in advance.
24  Game Development / Newbie & Debugging Questions / Re: Using A Graphics/Physics Engine on: 2010-05-07 00:49:40
Thanks so much Karmington, Ill look into eclipse as soon as I can. Funny thing is, I was trying to use slick to begin with, so I don't need to make any changes to my plans lol. Thanks all for the help.
25  Game Development / Newbie & Debugging Questions / Re: Using A Graphics/Physics Engine on: 2010-05-06 19:34:58
Thanks for the responses. After reading your responses I looked into eclipse, just to see if I can still do things my way just to make some things a little easier, but some of the things about it just confuse me. Im just to just opening a new document, and starting from scratch 100%. If anyone has an suggestions for what exact programs to use and any explinations or tutorials for basic use would be nice. I could sit downa nd figure it out on my own, but knowing me I'll get frustrated quick -.-
26  Game Development / Newbie & Debugging Questions / Re: Using A Graphics/Physics Engine on: 2010-05-06 15:06:12
Sorry but thats not really something I wish to do. I want to understand the code im writing and how everything works rather than have a tool do it for me. Thats why Im using a primitive compiler to begin with. I want to know exactly whats going on. If there is a way I can do it all within the code itself by hand, I want to know.
27  Game Development / Newbie & Debugging Questions / Using A Graphics/Physics Engine on: 2010-05-06 02:55:39
Its less of a question of how to use or obtain one, but more of how to import its classes for use.
I recently downloaded Slick Graphics engine, I have the .jar file of it. Whenever I follow a tutorial to use it and import the classes with the path it tells me, it doesn't work. I have the slick.jar file in the same folder as the program im using it with and all that. I guess I'm missing something. I don't use any fancy editor to code, I do it all by hand. I use textpad. Incase that is needed. Thanks for any responses.
28  Game Development / Newbie & Debugging Questions / No idea where to start for game programming on: 2009-11-05 01:58:54
I've been programming for about a year and a half now, and game programming is something I've wanted to do, but never got into because i wanted to learn more about java first. I was wondering if anyone might have some tutorials or tips they could tell me to get started. I know i want to make a side scrolling RPG, but when it comes to physics and all that, its a lot different than what i'm use too. I've been working mainly in JFrames, so this is all new to me. Any tutorials would be nice, they dont need to be too basic, I know a good amount about applets and such to manage.

Also, Ive been reading about lwjgl, and i wanted to install it, but theres no tutorials for how to install it with textpad (im aware of other compilers, thats just my personal preference), so if anyone knows how i could install it thatd also be great to know.

Thanks in advance for any replies
Tom
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (26 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (71 views)
2014-09-10 06:39:09

Tekkerue (37 views)
2014-09-09 02:24:56

mitcheeb (57 views)
2014-09-08 06:06:29

BurntPizza (41 views)
2014-09-07 01:13:42

Longarmx (27 views)
2014-09-07 01:12:14

Longarmx (34 views)
2014-09-07 01:11:22

Longarmx (34 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!