Show Posts
|
|
Pages: [1]
|
|
1
|
Game Development / Newbie & Debugging Questions / Exporting to Runable Jar Gives Unsatisfied link eror
|
on: 2012-08-28 02:09:06
|
|
Im using lwjgl and Slick2d for a small application that I wish to export and send to a friend. (its a Mag Feeding timer for JP PSO2)
but when I export to Runable jar, it dosent work and when I go into the cmd and run it as java -jar MagTimer.jar it gives me a unsatisfied Link error, Which ive seen before... when I didnt know I needed to link the Natives in the build path. but I have and it runs fine in eclipse. How do i export to Jar WITH the natives and libraries?
|
|
|
|
|
3
|
Game Development / Game Play & Game Design / Re: Game engines
|
on: 2012-08-02 23:48:04
|
|
NECESSARILY? nothing besides being able to render objects. but if I had to say you hit it on the nose, beyond Sound and Rendering 3D models, Shadows and Particle Effects are the 2 Id say would add(though a little above Bare Minimum) but a wholeheartedly welcome addition.
|
|
|
|
|
5
|
Game Development / Newbie & Debugging Questions / Re: Texturing OpenGL Faces
|
on: 2012-08-02 06:40:20
|
Check out the LibGDX ObjLoader. It should be able to help you figure out just how to modify it. :3
As for Animation? That's where I'm having trouble myself. I'm torn between doing several .obj files, loading them into a program and then outputting a custom format or something. I mean, there are other options like the MD5 system, however those tend to be expensive (Based on bone movements, it recomputes a lot of stuff each frame or something) to use.
Definitely will check that out As for animation, I know what you mean, I cant seem to find any other way besides MD5 or coming up with your own system.
|
|
|
|
|
7
|
Game Development / Newbie & Debugging Questions / Re: Texturing OpenGL Faces
|
on: 2012-08-02 04:07:19
|
What program are you using? Blender?
Yes, I'm just using the default cube right now. My Problem is that whenever I try to add a texture in blender the texture only shows up in render and not in the model view. and when I export it to .obj I cant find the option to export with texture coordinates also Ive got this working so far but the textures are seemingly mapped weird on every other triangle:  I think I understand this part, on the top triangle the coordinates are normal 1 2 3 4 5 6 7 8 9 10
| 1____________2 |.|..........| |..|.........| |...|........| |....|.......| |.....|......| |......|.....| |.......|... | |........|...| 4____________3 |
but on the Second one its: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| 1_____________ |.|..........| |..|.........| |...|........| |....|.......| |.....|......| |......|.....| |.......|... | |........|...| 4____________2
_____________3 |
Its also Creating Faces on the Inside for some reason... though in the obj file it only says there's 12 Faces. none being the inside one  Aslo this is my Blender View, showing the texture Mapped properly but How do I export to obj with the texture coordinates? 
|
|
|
|
|
8
|
Game Development / Newbie & Debugging Questions / Re: Texturing OpenGL Faces
|
on: 2012-07-26 17:30:15
|
|
Well right now I just use a for loop and map the texture to EVERY face the same way. I have a hard time understanding Exporting to obj WITH textures. I know when you export it to obj thats been triangulated, the faces are in the format f v1/vt1/vn1 v2/vt2/vn2 v3/vt1/vn3 But Every time I export the obj, it never adds vt...
|
|
|
|
|
9
|
Game Development / Newbie & Debugging Questions / Re: Texturing OpenGL Faces
|
on: 2012-07-26 07:16:41
|
PERFECT! now It doesn't show through, and Yeah that's the best part about OGL. its almost IDENTICAL regardless of language or library 1 2
| glEnable(GL11.GL_DEPTH_TEST); GL11.glDepthFunc(GL11.GL_LESS); |
Now all I have to do is figure out how to un-stretch the textures.
|
|
|
|
|
11
|
Game Development / Newbie & Debugging Questions / Re: Texturing OpenGL Faces
|
on: 2012-07-26 06:18:34
|
How Did I know someone was going to say that I had to go back to Blender.  But thank you, Right now I'm only doing a simple cube. My Issue is more along the lines that I apply the texture to a Face and it dosn't show. Below is what I currently have, the only thing I can think of would be I need to add glTexCoord3f(); But I dont know what to put as the texture coordinates. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| glColor3f(0.0f, 0.7f, 1.0f); modelTex.texture.bind(); glBegin(GL_TRIANGLES); for (Face face : faces) { Vector3f n1 = normals.get((int) face.normal.x - 1); glNormal3f(n1.x, n1.y, n1.z); Vector3f v1 = vertices.get((int) face.vertex.x - 1); glVertex3f(v1.x, v1.y, v1.z); Vector3f n2 = normals.get((int) face.normal.y - 1); glNormal3f(n2.x, n2.y, n2.z);
Vector3f v2 = vertices.get((int) face.vertex.y - 1); glVertex3f(v2.x, v2.y, v2.z);
Vector3f n3 = normals.get((int) face.normal.z - 1); glNormal3f(n3.x, n3.y, n3.z);
Vector3f v3 = vertices.get((int) face.vertex.z - 1); glVertex3f(v3.x, v3.y, v3.z); } glEnd(); |
|
|
|
|
|
12
|
Game Development / Newbie & Debugging Questions / Texturing OpenGL Faces
|
on: 2012-07-26 05:39:32
|
|
I just recently started Doing 3D Game Development in Java with LWJGL Currently Ive Managed to create a Basic Model, and Load it and Render it on screen, but I cant Figure out how to Take a Texture and Apply it to the Model.
I know it has something to do with glBind() or glBindTexture(). and I can figure out how to load a PNG using inputStream, but I cant figure out what to do with the texture AFTER I have it loaded all the tutorials I see Just do 2D with Quads and I'm using 3D and Triangles
|
|
|
|
|
13
|
Java Game APIs & Engines / Java 2D / Re: Platformer Jumping Issues
|
on: 2010-11-22 08:54:59
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| private float x = 0f; private float y = 0f; private boolean isGrounded = false; private boolean isJumpOne; private boolean isJumpTwo; private boolean isHovering; private boolean isHitCeiling; private Vector2f position = new Vector2f(x,y); private Rectangle boundingBox = new Rectangle(x,y,64,128); private final float MAX_LEFT_FORCE = 9.8f; private final float MAX_RIGHT_FORCE = 9.8f; private final float MAX_SINGLE_JUMP_FORCE = 9.8f; private final float MAX_DOUBLE_JUMP_FORCE = 9.8f;
private final float GRAVITY = 9.8f; private float gravityMod; private float jumpForce = 0; private float leftForce = 0; private float rightForce = 0; private float verticalVelocity = 0f; private float horizontalVelocity = 0f;
public void update(float deltaMiliseconds){ float deltaSeconds = (deltaMiliseconds/1000); verticalVelocity += (GRAVITY * gravityMod) * deltaSeconds; verticalVelocity += jumpForce * deltaSeconds; position.y += verticalVelocity *deltaSeconds; horizontalVelocity += leftForce * deltaSeconds; horizontalVelocity += rightForce * deltaSeconds; position.x += horizontalVelocity *deltaSeconds; boundingBox.setX(position.x); boundingBox.setY(position.y); } public void jump(){ if(isGrounded){ jumpForce = -2; isGrounded = false; isJumpOne = true; }else if(isJumpOne){ jumpForce = -2; isJumpOne = false; isJumpTwo = true; }else if(isJumpTwo){ gravityMod = .1f; isJumpTwo = false; isHovering = true; }else if(isHovering){ gravityMod = 1f; isHovering = false; }else{ } } |
Any Opinions? Suggestions?
|
|
|
|
|
14
|
Java Game APIs & Engines / Java 2D / Re: Platformer Jumping Issues
|
on: 2010-11-22 08:02:05
|
Going a little further with Ryan's code:
Position The object's X/Y location at any given time, draw the object and calculate collision from here. Velocity How fast the object is moving, in X/Y. Acceleration Forces that change the velocity, like gravity or jumping.
Position is never directly updated. Velocity changes position. Velocity is never directly updated. Acceleration changes velocity.
This means that you change an object's position only be applying an acceleration. Jumping is a big upward acceleration. Gravity is a constant downward acceleration.
I get that, I actually have something working now. AND it includes Double Jumping and Floating... i'm working on Understanding how to play with it now and trying to make it more.... friendly... its state based but Shoot me. My issue is how to make the player not Fall Halfway through the floor. and how to make the jumps have longer hang time. I also Realized I COMPLETELY failed in my last code snipit... I have the Values Initializing in the function. resetting them every time
|
|
|
|
|
16
|
Java Game APIs & Engines / Java 2D / Re: Platformer Jumping Issues
|
on: 2010-11-22 01:40:43
|
You don't, you simply render the sprite at (int)location.x
If you want to jump to a certain height, you have to either calculate the initial acceleration, or do some trial and error to find the value.
Edit: Ok I tried to implement this. This is my code: 1 2 3 4 5 6 7 8
| public void update(float deltaMilliseconds){ float deltaSeconds = (deltaMilliseconds/100); verticalSpeed += GRAVITY * deltaSeconds; float location = verticalSpeed * deltaSeconds; r.setY(location); System.out.println(location); } |
My results are interesting, because the delta value waivers back and forth.. sometimes making the location change in the opposite direction rapidly Example: 1 2 3 4 5 6 7 8
| 0.66247994 0.11759999 0.72128 1.9315802 0.63504 28.92176 0.21364 3.4251 |
|
|
|
|
|
17
|
Java Game APIs & Engines / Java 2D / Re: Platformer Jumping Issues
|
on: 2010-11-22 01:24:34
|
When you reach the top of a jump, and you start moving down instead of up, then the behaviour is identical to falling.
I got it! hahahaha fall is cause by Gravity which constantly increases verticalSpeed unless player isGrounded, then jump only needs to change verticalSpeed's value in order to jump. then gravity will slowly change it back to falling, until isGrounded which sets verticalSpeed to 0. Thank you for putting up with my crazy, I think better when I try to explain what im thinking. I get this part now. 1 2
| speed += accel * deltaSeconds; location += speed * deltaSeconds; |
My thing is, how do I make That translate to pixels per frame?
|
|
|
|
|
18
|
Java Game APIs & Engines / Java 2D / Re: Platformer Jumping Issues
|
on: 2010-11-20 12:33:48
|
Im having trouble understanding your code... I feel like the Falling action and the Jumping are combined. I also have a state based collision system touching GREEN isGrounded = true touching blue isHitCeiling = true ######### ##### ##### ######so the player falls if isGrounded is false as soon as it turns true the player stop falling, and if isHitCeiling becomes true the player will immediately start falling. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
| float jumpSrartOne = 0; float jumpStartTwo = 0;
boolean isGrounded; boolean isJumpOne; boolean isJumpTwo; boolean isFloating; boolean isHitCeiling; boolean jumpOneOut; boolean jupTwoOut;
final float GRAVITY = 9.8; final float SINGLE_JUMP_POWER = 10; final float DOUBLE_JUMP_POWER = 5;
public void update(){ if(player.getY >= jumpStartOne+maxSingleJump){ jumpOneOut = true; }
if(player.getY >= jumpStartTwo+maxDoubleJump){ jumpTwoOut = true; }
if(isGrounded){ }else if(isJumpOne && !jumpOneOut){ singleJump(); }else if(isJumpTwo && !jumpTwoOut){ doubleJump(); }else if(isFloating){ }else{ } }
public void jump(){ if(isGrounded){ isJumpOne = true; }else if(isJumpOne){ isJumpTwo = true }else if(isJumpTwo){ isFloating = true; }else if(isFloating){ isFloating = false; } }
public void groundPlayer(){ isJumpOne = false; isJumptwo = false; isFloating = false; isGrounded = true; }
public void singleJump(){ }
public void doubleJump(){ }
public void float(){ }
public void fall(){ } |
also fun fact my game takes a heavy influence from Vectorman for the sega genesis and My art style looks closer to the Scott Pilgrim game for the 360 Arcade. if you want to know what my inspiration was, and want to look em up.
|
|
|
|
|
19
|
Java Game APIs & Engines / Java 2D / Platformer Jumping Issues
|
on: 2010-11-19 13:11:09
|
Im working on a Platforming shooter and for the Life of me right now I cant figure out how to make the player jump! granted Im working in acceleration as well so it complicates things... My code is somthing like : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| byte gravity = 1; byte jumpspeed = 10; byte verticalAcceleration;
public void jump(){ int y = player.getY;
player.setY(y-verticalAcceleration); if(verticalAcceleration <= 0){ isFalling = true; isJumping = false; }
verticalAcceleration = jumpSpeed - gravity;
} |
I know that dosent quite work but if I had if figured out I wouldnet be asking for help!
|
|
|
|
|
21
|
Java Game APIs & Engines / Java 3D / New to Java3D, Basic Tutorials?
|
on: 2010-10-06 01:47:27
|
|
Ive been Working in java 2D for a couple years, Have been to busy with work to finish anything, but now that Im back I wanted to Up the ante so to speak and work on a 3D game, but I don't know where to start. If someone can point me at a tutorial that shows me How to make a Plane a Shape and Change the camera Angle in Java3D I should be able to Work up from there.
Also im working in Ubuntu Studio Lucid, and recommendation as for an IDE? Back in the Day I used JBuilder, but I cant get that on Linux. Ivbe tried NetBeans, but ive been having a hard time finding things...
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|