Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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: Noise Problem on: 2013-04-30 07:57:58
wow this helps so much! I love this image, I saved it on my desktop  persecutioncomplex
2  Game Development / Newbie & Debugging Questions / Re: Noise Problem on: 2013-04-30 06:30:26
Does anyone else know how to use this algorithm? I seem to misunderstand the concept of noise I think...
3  Game Development / Newbie & Debugging Questions / Re: Noise Problem on: 2013-04-30 05:03:45
I just tried it, like that :
1  
2  
3  
4  
5  
6  
7  
8  
public static void main(String[] args) {
      Noise p = new Noise(45643);
      System.out.println("=====noise=====");
      for (int i = 0; i < 30; i++) {
         System.out.println(p.noise(i));
      }
      System.out.println("=====noise=====");
   }


It outputs 0.0 everywhere!!
4  Game Development / Newbie & Debugging Questions / Re: Noise Problem on: 2013-04-30 04:56:45
I'm gonna test it in a minute after my maths homework (lol kinda related except it's probabilities(boring)) but thanks alot!
5  Game Development / Newbie & Debugging Questions / Noise Problem on: 2013-04-30 03:45:11
Hi everyone, I'm in the process of creating a really simple game like terraria, just for fun and as a challenge for myself. I'm currently in the process of making the terrain generator, and I kind of struggle with all these noise functions... I've looked over on the web and I found the j3d library for a perlin noise function. Here's a simple test code I wrote :
1  
2  
3  
4  
PerlinNoiseGenerator p = new PerlinNoiseGenerator("My seed".hashCode());
      for (int i = 0; i < 30; i++) {
         System.out.println(p.noise1(i));
      }


The only thing that's comming out of this is 0.0 and -0.0... "wat.". Does anyone know why it's doing this(/another good library or source code)? I had a library in C# when I was using XNA that was doing essentially the same thing.. but it was working!

thanks for your time!
6  Game Development / Game Mechanics / Re: Tower Defense Save File on: 2013-04-28 16:48:11
Let's say you have an Object(class) called "Player" and this player has value(String name, int life).

You need to make an array of bytes to save to the file. The best way is to make an interface (let's say we call it "ISavable").

this interface forces you to implement the two methods shown previously. when you save your game, you itterate over all your game elements that are "ISavable" and you append the byte array of each object to the file. when you load the game, it's gonna go over all the file byte by byte and put those values in the right place using the fromBytes(byte[] b) method.

hope this helps
7  Game Development / Game Mechanics / Re: Tower Defense Save File on: 2013-04-28 16:22:11
A good way to save things to files is to create two functions on every items you want to save. One for creating a byte[] of the values (exporting its values), and another one for decoding an byte[] (importing its values).

Example :
1  
2  
3  
4  
5  
6  
7  
8  
public byte[] getBytes() {
    return this.name.getBytes();
}

public void fromBytes() {
    this.name = new String(bytes, "iso-8859-1"); // remplacer l'encodage au besoin

}


it's a very abstract example but you're probably going to need to add lists or arrays with a correct size for storing your data.
8  Game Development / Game Mechanics / Simple render limitation Slick2D (keep the high update count) on: 2013-04-28 16:15:30
Hi everyone, I'm working on a game right now, Had my collisions working after a day of work, and now I'm stuck with a problem that I though I could solve... I need to increase the update count (significantly higher than 60, let's say 120+), But I don't want my renders to increase. I've been trying this for about 2 hours and I can't find it! I'm using Slick2D with a base game of type (StateBasedGame). There's a function "setTargetFrameRate(60), that's for the renders AND the updates, also there's a vsync (same), and two functions I tried to use, like that :
1  
2  
app.setMaximumLogicUpdateInterval(100);
app.setMinimumLogicUpdateInterval(1);


this above works, but the renders are insanely high(3500) and the updates are around 500, which would be perfect if I could limit the renders...

Any knows in Slick2D how to achieve this?
9  Games Center / Cube World Projects / Re: Low fps problems with many objects in OpenGL on: 2013-03-18 15:32:41
Wow thanks ok I'm gonna try that out right now and I'll give you some feedback once I'm done!
10  Games Center / Cube World Projects / Re: Low fps problems with many objects in OpenGL on: 2013-03-18 12:23:36
Ok I'll check out these posts... Last question if someone can help, the only thing I'm not entirely sure about is the way my chunk is supposed to update... I'm gonna be doing 16x16x16 chunks, but I'm working with FloatBuffer and the predefined .put(float values) function... I have to tell my FloatBuffer what size it's gonna be before even knowing it! is there a workaround? Perhaps I should be using float[][] and then getting float[] from each block, and then put them manually in the FloatBuffer? That seems slow to me!

(For lighting, I use the OpenGL predefined glLight set to a color! I love it and it's simple.... no shadows though, I'm gonna have to work on that some time soon!)
11  Games Center / Cube World Projects / Re: Low fps problems with many objects in OpenGL on: 2013-03-18 05:44:08
Alright I'll take a look, is this a board on this forum?
12  Games Center / Cube World Projects / Re: Low fps problems with many objects in OpenGL on: 2013-03-18 05:40:30
I know minecraft uses something like 16x16x16 blocks chunks, but won't it be slow to re-render if a modification happens? maybe a thread? I'm lost ! but thanks for the idea, gonna try that for the next few days
13  Games Center / Cube World Projects / Low fps problems with many objects in OpenGL on: 2013-03-18 05:33:38
Hi everyone, I wrote a simple "game" using LWJGL that allows me to modify a chunk of 32x32x32 blocks ust like in minecraft. It has ray picking and lighting. Here's a screenshot of what I can do with it :



Alright, now here's my problem. My code is fairly good, I'm using vertex buffer objects, one for each block. The chunk is never really re-rendered, because each block is an individual object and can be rendered alone. The blocks are also only rendering faces that are visible, and they tell the 6 blocks (if existing) to hide a face for faster rendering.

Now, I'm only getting ~100fps with a 32x32x32 block that only contains 32x8x32 blocks really, the rest is air. Why am I getting so low fps? Anyone has proposition?

Here are the system specs :

i5 760 2.8ghz
8gb ram 1333
gtx 580 1.5gb
intel 80gb ssd

I can post parts of my code if anyone wants it to help me!

Thanks a lot!
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.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (26 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (13 views)
2014-07-29 10:59:34

E.R. Fleming (34 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (44 views)
2014-07-24 01:59:36

Riven (44 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

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

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

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
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!