Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (526)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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] 2 3 ... 5
1  Games Center / Cube World Projects / Re: Sparky's little Cube World Project on: 2013-04-30 12: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. Smiley

I am now working on another project which I plan to finish. Honestly, I will do this!  Cool
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...)
<a href="http://www.youtube.com/v/3E-qU5dYwiU?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/3E-qU5dYwiU?version=3&amp;hl=en_US&amp;start=</a>

Thank you for your support on this project and see you soon on the next one. Smiley
2  Games Center / WIP games, tools & toy projects / Re: My little project on: 2013-04-26 18:50:08
Hey, nice! It's living! Cheesy

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. Smiley
3  Games Center / Cube World Projects / Re: Sparky's little Cube World Project on: 2013-04-21 18: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 14: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. Smiley
Thank you, I am very happy to hear that. Cheesy
5  Games Center / Cube World Projects / Re: Sparky's little Cube World Project on: 2013-04-20 15:39:37
Ok, I found something about those gaps here:
http://www.gamedev.net/topic/573479-transparent-gaps-between-triangles-on-windows-7/

Now it seems to happen on certain nVidia Hardware. And as opengl.org says:
Quote
glEnable(GL_POLYGON_SMOOTH): This is not a recommended method for anti-aliasing. Use Multisampling instead.
I used gl_polygon_smooth and there you have it...

Ok, I updated it and fixed another bug that was mostly invisible and is therefore swept under the rug.
The old download is updated!

Please, Phased, if you read this, tell me if the strange gaps have vanished...  Cheesy
6  Games Center / Cube World Projects / Re: Sparky's little Cube World Project on: 2013-04-20 14:53:10
benCraftAlpha3_17_E.jar is what i downloaded (in case you put up a wrong file)


Oh my .... THIS looks terrible!  Shocked 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. Smiley No, really, thanks for that.

Quote
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. Smiley
(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 13: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. Smiley
8  Games Center / Cube World Projects / Re: Sparky's little Cube World Project on: 2013-04-20 12: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:
<a href="http://www.youtube.com/v/qMFoPf5V5s8?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/qMFoPf5V5s8?version=3&amp;hl=en_US&amp;start=</a>

There is also a downloadable version
This 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. Smiley
9  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-04-19 20: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.
10  Games Center / Cube World Projects / Re: Voxel - a start on: 2013-04-19 15:41:38
I see, you are making progress there. Smiley The trees look ok, just some of them may be a bit too small.

Do you plan adding ray casting for voxel picking soon?
11  Game Development / Newbie & Debugging Questions / Re: Rotate player in relation to mouse position on: 2013-04-15 17:29:51
Thank you for the video, this helps. It doesn't really look like the problem is just that it won't stop rotating.

So there still is this line, that seems wrong:
1  
      a -= n / 180 * Math.PI;

What are you doing there and why? Is the value n supposed to be in degrees? Is it actually in degrees?
12  Game Development / Newbie & Debugging Questions / Re: Rotate player in relation to mouse position on: 2013-04-14 16: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 10: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; // calculate current angle of drawn line (the bow?)
      double dy = y - cy;
      double r = Math.sqrt(dx*dx + dy*dy);
      double a = Math.atan2(dy, dx); // angle is known now in rad

      a -= n / 180 * Math.PI; // rotation in rad is converted to rad... uhm, yeah. And then subtracted from the computed angle of the line... am I getting this wrong?
      this.x = cx + r * Math.cos(a);
      this.y = cy + r * Math.sin(a);
   }
   
   public void render(Graphics g) {
      //image.draw((float)x, (float)y);
      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 ); // mouse coordinates relative to center of the screen used for getting the angle between normal position without rotation and rotation to current mouse position
     
      rotate(x, y, x2, y2, rotation); // method for rotation. Uses line start and end point and rotation angle as inputs...
   }
14  Discussions / General Discussions / Re: anyone tried an oculus rift? on: 2013-04-14 09: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! Smiley

So to answer your question correctly: no, I haven't tried one. Sad
15  Game Development / Newbie & Debugging Questions / Re: Rotate player in relation to mouse position on: 2013-04-14 09: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 09:00:42
I do think so as well. Generating levels out of images is nice. What I like even more are nice editors. Smiley 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.  Roll Eyes
17  Games Center / Cube World Projects / Re: Sparky's little Cube World Project on: 2013-04-11 18:35:30
Thanks to both of you. Smiley

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. Cheesy

Quote
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.  Cool

EDIT: Ah, almost forgot: your project is super-mega-great, Vermeer. Wink I am actually trying to get my project half as beautiful as yours.
18  Games Center / Cube World Projects / Re: Sparky's little Cube World Project on: 2013-04-11 13:51:26
It has been more than a week with no update now. This is, because I am not really working on it. Instead, I am learning about lighting to be able to implement it in this project. I want to do this on my own with shaders. For now, I have read a lot about the theory and I have implemented blinn-phong in a test-project. I also have a short video of it:
<a href="http://www.youtube.com/v/WjIeSP7uHpg?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/WjIeSP7uHpg?version=3&amp;hl=en_US&amp;start=</a>
Nothing too great about it. But this is just a start.

Now I will continue learning. Smiley
19  Games Center / Cube World Projects / Re: 3D Turnbased Rougelike (LWJGL) on: 2013-04-08 16:26:14
Looks veeery interesting! I like the idea of random generated dungeons. Looking forward to seeing your progress on this.

Nice lighting! Smiley
20  Games Center / Cube World Projects / Re: LWJGL BlockWorld on: 2013-04-03 17: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 16:09:27
Really nice work! I am looking forward to implementing lighting im my project too. This can create amtospheric highlights. Smiley
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! Wink
22  Games Center / WIP games, tools & toy projects / Re: Pseudo Voxel Expriements on: 2013-04-02 12:28:46
I just came here to say, that it looks great and inspiring. Smiley Good work!
23  Games Center / Cube World Projects / Re: Sparky's little Cube World Project on: 2013-04-01 22: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:
Quote
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. Wink
24  Games Center / Cube World Projects / Re: Sparky's little Cube World Project on: 2013-04-01 22:05:24
Did you build with Java 1.7?
Yes, I do.

Here is my video which is just showing a minute of so called "gameplay"...
<a href="http://www.youtube.com/v/ixc7d__BzDM?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/ixc7d__BzDM?version=3&amp;hl=en_US&amp;start=</a>
25  Games Center / Cube World Projects / Re: Sparky's little Cube World Project on: 2013-04-01 21:48:45
You aint dumb @Sparky83!
Maybe not completely, but I have potential! Wink Thanks for defending me against myself anyway. Smiley

Quote
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 21: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! Smiley

You can test it here: Alpha2

I 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. Smiley

I will post a video of it, when it is ready!
27  Games Center / Cube World Projects / Re: Only one block in chunk being drawn when using textures on: 2013-03-31 20:15:50
If you really study math with this one, you will be up to the task of 3D game programming.
http://gamemath.com/about-the-book/

I am not advertising, I just love this book as it helped me so much btw. Smiley
But you can of course also do it without it.
28  Games Center / Cube World Projects / Re: Only one block in chunk being drawn when using textures on: 2013-03-31 20: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);   // Bottom Left Of The Texture and Quad
      GL11.glTexCoord2f(1.0f, 0.0f);
      off_glVertex3f( 0.5f, -0.5f, 0.5f);   // Bottom Right Of The Texture and Quad
     [...]
      off_glVertex3f(-0.5f, 0.5f, -0.5f);   // Top Left Of The Texture and Quad      
        GL11.glEnd(); // this one here ########################
        glColor3f(1,1,1);
   }


Quote
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); // change length of the uniform vector

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 19:52:54
Quote
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. Smiley 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 19: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  
// texture stuff
      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"); // tex is an attribute of type Image
      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)); // #### HERE ######## new Image(tex)
      }
   }
Pages: [1] 2 3 ... 5
 

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

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (73 views)
2014-11-26 15:22:04

toopeicgaming1999 (63 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (29 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (27 views)
2014-11-24 19:59:16

trollwarrior1 (40 views)
2014-11-22 12:13:56

xFryIx (78 views)
2014-11-13 12:34:49

digdugdiggy (57 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!