Show Posts
|
|
Pages: [1] 2 3 ... 5
|
|
1
|
Games Center / Cube World Projects / Re: Sparky's little Cube World Project
|
on: 2013-04-30 14:56:55
|
Hey! Just wanted to say that I am stopping my activity on this project. I have learned so many new things through it, but I am also getting a bit tired of it. After all it is just a clone of minecraft.  I am now working on another project which I plan to finish. Honestly, I will do this!  But it will be only 2D. I will not make a topic for the new project for now. This will be done, when there is enough material and a demo to test it. All that I can say now: currently I am working on my own particle generator for the game. This is what it looks like: (don't mind the skyrim screenshot in the back. Just trying not to let it look too empty, simulating some ingame stuff...) http://www.youtube.com/v/3E-qU5dYwiU?version=3&hl=en_US&start=Thank you for your support on this project and see you soon on the next one. 
|
|
|
|
|
2
|
Games Center / WIP games, tools & toy projects / Re: [WIP] My little project
|
on: 2013-04-26 20:50:08
|
Hey, nice! It's living!  So this is a good step forward. I haven't been able to get .OBJ loaded. But I haven't really been working on it. This is something I will do sometime in the not so very near future. Keep the thread up to date if you do something new. 
|
|
|
|
|
3
|
Games Center / Cube World Projects / Re: Sparky's little Cube World Project
|
on: 2013-04-21 20:27:14
|
BTW - what do you do when a collision occurs, do you check for collision before allowing movement? I am not sure, if my approach is really that good, but I do it like that: Since my movement is based on velocity and friction, when I move the player, a constant value times delta (in ms) is added to the velocity vector. So, when I am checking for collision, I am testing it with my velocity vector. After collision check I cap the vector by multiplying it with the time value of the collision check ( a value in [0,1] ). - If the value for multiplying is 1, then the whole vector will be applied. - If it is lower, the vector will be used with the lower values and then resetted to 0. I am still working on my strafing algorithm, so I am not talking about that now.
|
|
|
|
|
4
|
Games Center / Cube World Projects / Re: Sparky's little Cube World Project
|
on: 2013-04-21 16:55:15
|
I've added random items / blocks to mine but would like to make my trees actually look like trees, there must be some simple algorithms out there for this?! For my own project, I think I would just think of a strategy to do this myself. After all, this can't be so hard, can it? Will see. missed the to tell you if its fixed bit, and yes it is fixed.  Thank you, I am very happy to hear that. 
|
|
|
|
|
6
|
Games Center / Cube World Projects / Re: Sparky's little Cube World Project
|
on: 2013-04-20 16:53:10
|
benCraftAlpha3_17_E.jar is what i downloaded (in case you put up a wrong file)  Oh my .... THIS looks terrible!  It is a fine screenshot, a masterpiece, but the gaps! Gotta do something about it! But honestly, I don't know what could be causing this. As I am not able to reproduce this I will hardly ever know if I have fixed it by doing anything. Hmmm, maybe I should think about what could be causing this first. Or maybe someone already knows it... If you would like to help me further, you could tell me what hardware you have, especially graphics card of course. Maybe I will eventually get an idea, what is the reason for these gaps. Anyway, thank you for your screenshot, this is worth a... uhm... chunk of gold!! With chocolate on the inside.  No, really, thanks for that. In Australia we have usage caps, and I capped mine, but it should be reset on the 23rd. Good to know, so I will be warned before wandering off to Australia. (don't get me wrong, I am not planning to go to Australia... maybe Austria. *g*)
|
|
|
|
|
7
|
Games Center / Cube World Projects / Re: Sparky's little Cube World Project
|
on: 2013-04-20 15:28:40
|
There seems to be a 1 pixel gap between each triangle, your able to see the lines of where they connect, you should add that to your to fix list.
This is odd, I had this problem before, but I thought I fixed it because I can't see those lines anymore. Can you give me a screenshot of it? Thank you for your information. 
|
|
|
|
|
8
|
Games Center / Cube World Projects / Re: Sparky's little Cube World Project
|
on: 2013-04-20 14:57:53
|
Another update! I haven't achieved as much as I would have liked to in the last week, but after all it is still going forward. Most of the time was spent on analyzing the usage of memory and refactorings based on that. Did some corrections on the rendering algorithm and the usage of the VBOs. I added two textures (dirt and grass) and created a few chunks to play and experiment. Nothing special though. I also added a little hud to select the used cube type with the mouse wheel. Everything is still very dirty and hacked together. I will do some polishing, when there is nothing more urgent in the way. You can see the features in the video: http://www.youtube.com/v/qMFoPf5V5s8?version=3&hl=en_US&start=There is also a downloadable versionThis version is compiled with jdk 1.7.0_07. You may be experiencing a collision bug when jumping at edges of cubes. This will be fixed in a later version. Please tell me, if you have problems or get other errors. Next up: adding fog and frustum culling and fixing the damn collision testing bug. 
|
|
|
|
|
9
|
Games Center / Cube World Projects / Re: Voxel - a start
|
on: 2013-04-19 22:38:16
|
|
Are you using VBOs or DisplayLists or ImmediateMode? If you are using VBOs, maybe there is a problem with memory. I had some problems at first, then I changed a bit of my code to use VBOs properly and it was better since then.
|
|
|
|
|
12
|
Game Development / Newbie & Debugging Questions / Re: Rotate player in relation to mouse position
|
on: 2013-04-14 18:20:17
|
|
Because of not having any proper information about what "doesn't stop rotating" really means, we can't really tell what you want to hear apart from where the problems in the code may lie.
There is no screenshot, no captured video, no sketch, no precise information about it. Anything of this could help. All that I see in your code for now is, that you seem to be messing with angles in degrees and radians. But maybe I got this wrong. In the end, you should know best and tell us, if this could actually be the problem or not. So, when you look at the comments I made on your code, is this correct?
|
|
|
|
|
13
|
Game Development / Newbie & Debugging Questions / Re: Rotate player in relation to mouse position
|
on: 2013-04-14 12:55:41
|
I will try to comment your code to see where the problems may be. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| public void rotate(double x, double y, double cx, double cy, double n) { double dx = x - cx; double dy = y - cy; double r = Math.sqrt(dx*dx + dy*dy); double a = Math.atan2(dy, dx); a -= n / 180 * Math.PI; this.x = cx + r * Math.cos(a); this.y = cy + r * Math.sin(a); } public void render(Graphics g) { g.setColor(Color.red); g.drawLine((float)x, (float)y, (float)x2, (float)y2);
} public void update(GameContainer container) { Input input = container.getInput(); rotation = Math.atan2( input.getMouseY() - 600/2, input.getMouseX() - 800/2 ); rotate(x, y, x2, y2, rotation); } |
|
|
|
|
|
14
|
Discussions / General Discussions / Re: anyone tried an oculus rift?
|
on: 2013-04-14 11:50:58
|
YEAH, my all time favourite topic!!! I would love to have one of those VR Headsets! I can't wait for them to be available as consumer product. Every now and then I watch a video on youtube showing people who try it out. And I always ask myself when I will be able to experience this myself... >_< I will pay whatever I can for this!  So to answer your question correctly: no, I haven't tried one. 
|
|
|
|
|
15
|
Game Development / Newbie & Debugging Questions / Re: Rotate player in relation to mouse position
|
on: 2013-04-14 11:44:59
|
|
Is this in 3D or 2D? I guess it is 2D. Then I think you have a top down view and the player can rotate by the imaginary z axis coming out of the screen.
In this case it must be fairly simple. Just compute the distance between the player position and the mouse position and store it for example as a Vector2. You can then normalize it and calculate the dot product on the norm vector representing rotation of 0 degrees. You then just have to see if you are above or under the y position of the player to get the angle right.
If my assumptions are right, tell me if you need more explanation. Or maybe there is an even easier way.
|
|
|
|
|
16
|
Games Center / WIP games, tools & toy projects / Re: My First Java Game (Heavy WIP)
|
on: 2013-04-14 11:00:42
|
I do think so as well. Generating levels out of images is nice. What I like even more are nice editors.  But I think that you can do lots of things with images, especially when you mix it with other techniques, like the mentioned text file. Maybe I will do something with this myself sometime. 
|
|
|
|
|
17
|
Games Center / Cube World Projects / Re: Sparky's little Cube World Project
|
on: 2013-04-11 20:35:30
|
Thanks to both of you. But I think it is nothing special. I heard that Blinn-Phong is part of the fixed-function toolbox in OpenGL. So I feel like I haven't really achieved much for now. But if it looks ok in the game, than I will be glad.  That looks really cool. Do you plan to use lots of real time lighting, or is it for just a few special effects? I would like to add a few special effects. So this is not for extensive use. But it is great for learning how to do this and that and lighting in 3D was something I wanted to do for a long time now.  EDIT: Ah, almost forgot: your project is super-mega-great, Vermeer.  I am actually trying to get my project half as beautiful as yours.
|
|
|
|
|
20
|
Games Center / Cube World Projects / Re: LWJGL BlockWorld
|
on: 2013-04-03 19:55:19
|
|
As this goes to everyone building those engines I feel like answering: It sounds like an accusation. Even if it just was for copying the idea as fast as possible and getting it running, I don't see any problem in that as long as it is for fun.
As you can see in my thread, I am taking my time to optimize things. And I think others do aswell. For me it is a good thing to learn it by just copying the concept of minecraft, because these are my first steps in 3D programming and I am happy with my project. I love Minecraft and I would like to see if I can be able to get something similar working. Then, after that, I will go on making my own stuff with the things I have learned. This is my plan.
|
|
|
|
|
21
|
Games Center / Cube World Projects / Re: LWJGL BlockWorld
|
on: 2013-04-03 18:09:27
|
Really nice work! I am looking forward to implementing lighting im my project too. This can create amtospheric highlights.  But for now, I am still struggling with my collision detection, trying to make it better and more efficient. Keep up the good work, this will be an awesome competitor! 
|
|
|
|
|
23
|
Games Center / Cube World Projects / Re: Sparky's little Cube World Project
|
on: 2013-04-02 00:24:04
|
I have put my posts together: Old post:I am using AABBs and dynamic seperating axis test. And the tests are pretty slow because I am doing them on all cubes currently... this is what I am going to change when fixing performance issues. Did this on raycasting for picking already. When I am done with that, there will be some work with the chunks to do, because one single chunk is getting boring. New Post:I take it you define a bounding box for the player/camera, and use this to detect if 'bound' with one of the blocks? Yes, of course. If you are really getting the book I told you about, then you will find excellent explanations on this in the Appendix A. 
|
|
|
|
|
25
|
Games Center / Cube World Projects / Re: Sparky's little Cube World Project
|
on: 2013-04-01 23:48:45
|
You aint dumb @Sparky83!
Maybe not completely, but I have potential!  Thanks for defending me against myself anyway.  Anyway, tried to run your jar and I got this on my terminal:
Exception in thread "main" java.lang.UnsupportedClassVersionError: engine/EngineMain : Unsupported major.minor version 51.0
Running on a Macbook Pro.
Try downloading it again, it shouldn't do this now. I used an older compliance level. Do you have an old version of Java on your machine?
|
|
|
|
|
26
|
Games Center / Cube World Projects / Re: Sparky's little Cube World Project
|
on: 2013-04-01 23:14:16
|
So here is my promised version with collision detection. I had some problems with it because I am unexperienced and a bit dumb, but now I have it neeeeeaaaarly working!  You can test it here: Alpha2I still have severe problems with performance. Because of this there are still 8*8*8 cubes per chunk. This is what I am going to fix next. I can't wait.  I will post a video of it, when it is ready!
|
|
|
|
|
28
|
Games Center / Cube World Projects / Re: Only one block in chunk being drawn when using textures
|
on: 2013-03-31 22:09:00
|
Hi,
You mean the glEnd in my createChunkList code? All works with it where it is? No, like Riven said: 1 2 3 4 5 6 7 8 9 10 11
| private void renderBlock(Block.BlockType type) { GL11.glTexCoord2f(0.0f, 0.0f); off_glVertex3f(-0.5f, -0.5f, 0.5f); GL11.glTexCoord2f(1.0f, 0.0f); off_glVertex3f( 0.5f, -0.5f, 0.5f); [...] off_glVertex3f(-0.5f, 0.5f, -0.5f); GL11.glEnd(); glColor3f(1,1,1); } |
Yep, raycasting looks cool, how do you get the direction the player is facing, this some simple trig? I have made my own Ray class and it takes an origin of Vector3 and a uniform delta of Vector3. Then the uniform vector gets scaled by scalarProduct. 1 2 3 4 5
| uniRay.setPosition(-pos.getX(),-pos.getY(),-pos.getZ()); uniRay.setDelta((float)Math.sin(Math.toRadians(-rotY))*(float)-Math.cos(Math.toRadians(-rotX)), (float)Math.sin(Math.toRadians(-rotX)), (float)-Math.cos(Math.toRadians(-rotY))*(float)Math.cos(Math.toRadians(-rotX))); uniRay.scalarProduct(RAY_LENGTH); |
The rotX variables are the rotation in degrees on every axis by the player.
|
|
|
|
|
29
|
Games Center / Cube World Projects / Re: Only one block in chunk being drawn when using textures
|
on: 2013-03-31 21:52:54
|
Many thanks for the help, and your raycasting looks cool on picking the blocks. How did you do your collision checks with the blocks? AABB's?
Thanks
I have no collision testing in my released alpha. I am currently fixing some issues with it. Then I will update my thread.  But it will be AABB/AABB collision testing. Glad you like the raycasting. I am fascinated by it too. I guess you found the source for it in my thread. It may be helpful. BTW: In your posted source you are still calling glEnd() after every rendered cube. Doesn't it work without this at this position?
|
|
|
|
|
30
|
Games Center / Cube World Projects / Re: Only one block in chunk being drawn when using textures
|
on: 2013-03-31 21:24:35
|
I have to add, that I am confusing a few things here, because I was usually working in 2D environments: At the moment I am not using any batch class for textures. I am manually binding them with my TextureManager. Here is what I do in my Chunk class: 1 2 3 4 5 6 7 8 9
| TextureManager tM = TextureManager.getTextureManager(); if(tM.getTexture("tex") == null){ tM.addTexture("tex", "img/testTextur.png"); tM.addTexture("tex2", "img/testTextur2.png"); tM.addTexture("controls", "img/controls_eng.png"); } tex = tM.getImage("tex2"); tM.bind(tex); |
This sets up two box textures (Textur is not misspelled, this is in german, btw) and the controls info screen for the start of my alpha demo. Then you wanted to know about how I get my textures working. I got a pretty small class I called Texture. As you see, it contains some needed information about the texture: 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
| import org.lwjgl.opengl.GL11;
public class Texture{ private int texID; private int width; private int height; public Texture(int id, int w, int h){ texID = id; width = w; height = h; } public int getImageWidth(){ return width; } public int getImageHeight(){ return height; } public int getTextureID(){ return texID; } public void release(){ GL11.glDeleteTextures(texID); } } |
This is just inspired by slickUtil. But I am not using slick anymore. And as I previously said, the Texture gets wrapped in my Image class. This happens here: 1 2 3 4 5 6 7 8
| public void addTexture(String name, String path){ if(dataBase.containsKey(name)) System.err.println("Image with key " + name + " already in database!"); else{ Texture tex = loadTexture(path); dataBase.put(name, new Image(tex)); } } |
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|