Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (482)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (550)
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  Games Center / Showcase / Re: Panda City Jump on: 2014-05-29 12:12:53
Those graphics look gorgeous; I really like the art style. Very nice work for something built in a month Smiley
2  Game Development / Newbie & Debugging Questions / Online Card Game Architecture Design on: 2014-05-05 17:15:19
It has been a while now since I have made a client-server system, and the last time was when I was in university where I had a ready made web server to deploy to. So when my artist friend came to me with the idea to make an online card game I couldn't help but feel a little stupid on the subject.

What I'm looking for is some advice and recommendations as to what systems I should use to implement the following game system. I can look up tutorials later, but I want advice as to what direction I should take.

The client for the card game will be designed with LibGDX, which will maintain a TCP connection to the server (game is turn based so I figured TCP is fine). The server is then connected to a MySQL database which holds account details etc. What I'm fuzzy on is what to use to make the server, and what to deploy it on. I was hoping to use standard java ServerSockets for connections, and run the java servlet on an apache tomcat server (as that is what I have done in the past). Alternatively, I have been tempted by the RedDwarf ServerApp to administer a game server, but I am concerned as it seems to be a pretty out of date piece of software.

What would you guys recommend I use? Particularly for supporting the server.
3  Game Development / Newbie & Debugging Questions / [LibGDX] GWT Compile does nothing! on: 2014-04-28 11:15:29
[FIXED] After a while of agonizing I solved this by uninstalling all my GWT related plugins from Eclipse... I discovered that they were for some reason for an older version of eclipse to the one I have. I installed the latest GWT plugins, manually downloaded the latest GWT SDK and linked it to my projects build path and now the project is compiling. Somewhere along that process was the solution Smiley

I'm trying to deploy a web version of my game, which works fine on desktop and when exporting to a JAR, but for the life of me I cannot get it to pass through GWT.

As far as I can tell I've followed the normal process for creating the web app; Right click the gwt project folder in Eclipse -> Google -> GWT Compile. But when I click on it nothing happens. I get no popup, console feed and nothing changes in the WAR directory.

Can anyone suggest what I might be missing? Or an alternate way I can export my game as a web app?

4  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Forground and background camera pan on: 2014-04-23 12:15:20
Yes indeed it is parallax scrolling! Thank you very much to you both Smiley
5  Game Development / Newbie & Debugging Questions / [LibGDX] Forground and background camera pan on: 2014-04-23 11:51:34
What is the name of the effect where when your camera is panning in a game, the foreground is panning by at one speed and the background is panning by at a slower speed? I am looking to implement this in LibGDX so if someone could roughly outline how this is done I would be very grateful!

My brain has completely blanked here, I've seen this before but never programmed it!
6  Games Center / Contests / Re: Ludum Dare 29 on: 2014-04-23 11:36:52
I'll also be participating in this ludum dare. It is my first ever competition, but I have decided to go out and enter the compo as opposed to the jam to give myself a real challenge. Will see how I can perform with LibGDX under such tight conditions Smiley
7  Game Development / Game Mechanics / Re: Generating "True" 2D Perlin Noise on: 2013-12-30 23:01:18
I am afraid our implementations of Gustavson's original code is mismatched for me to be able to easily patch them together, for example, the one i copied already had octaves and that running before, and the get noise method seems to differ a bit as well. The result i get from your newest method is just even more zeroes and ones, and it only gives between numbers 0-1. No matter how low/high/many octaves, roughness or scale i got. I guess i'll try to build everything from scratch and not follow that guide of there, might even learn something.

My implementation is pretty much taken directly from the link I posted above earlier:

Stefan Gustavson, Simplex noise demystified: http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf

Scroll down to page 11, and you will find the 2D simplex noise method. You will need that and any other methods which are referenced by it (also listed in the same article). After that, the generateOctavedSimplexNoise method I posted earlier should link in with it just fine.
8  Game Development / Game Mechanics / Re: Generating "True" 2D Perlin Noise on: 2013-12-30 21:39:12
matheus, I could kiss your genious face, your code worked brilliantly!

I have altered your code to the following so it outputs a two dimensional array that can be used for image processing, I'll post it here in case someone else wants to refer to it.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
public float[][] generateOctavedSimplexNoise(int width, int height, int octaves, float roughness, float scale){
      float[][] totalNoise = new float[width][height];
       float layerFrequency = scale;
       float layerWeight = 1;
       float weightSum = 0;

       for (int octave = 0; octave < octaves; octave++) {
          //Calculate single layer/octave of simplex noise, then add it to total noise
         for(int x = 0; x < width; x++){
             for(int y = 0; y < height; y++){
                totalNoise[x][y] += (float) noise(x * layerFrequency,y * layerFrequency) * layerWeight;
             }
          }
         
          //Increase variables with each incrementing octave
          layerFrequency *= 2;
           weightSum += layerWeight;
           layerWeight *= roughness;
           
       }
       return totalNoise;
   }


I ran a few tests and everything works great. A nice map is generated with the following:

1  
2  
SimplexNoiseGen sng = new SimplexNoiseGen();
float[][] osn = sng.generateOctavedSimplexNoise(512, 512, 3, 0.4f, 0.005f);


And the output! Note, there is a large mass of water because the output is between -1 and 1 for this map, and my program is currently set to make anything less than 0.1 deep water.



Sabomoth, give it a shot with the method I just posted, and drop down the roughness parameter, that should give you the result you are looking for. If it still aint right, just play around with the last three parameters so you get a good feel of what they do Smiley
9  Game Development / Game Mechanics / Re: Generating "True" 2D Perlin Noise on: 2013-12-30 20:45:37
That looks awesome!
I played around with that last night but couldn't get a result nowhere near what you just got there. Been trying for an half hour to touch it up a bit to give presentable images.

Try increasing decreasing the frequency of your output. I get much larger features and smoothing maps with a smaller frequency.

@longshorts:

Looking at the code and image, it looks like you only utilize one layer of simplex noise. If you couple together a couple of layers with different frequencies and weights, you get a much nicer result.

Thanks, I did wonder about how to implement different octaves. I'll give it a shot then repost my results, thanks!
10  Game Development / Game Mechanics / Re: Generating "True" 2D Perlin Noise on: 2013-12-30 19:08:47
Thanks for the confirmation Roquen Smiley

Well since I put up my last post, I decided to take a stab at implementing Simplex Noise instead of Perlin based off the implementation by Stefan Gustavson, Simplex noise demystified: http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf

I used most of the 2D Simplex code he lists towards the end of the article, and then wrote the following function to stick it all in a 2D array that can be rendered in my game:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
public static float[][] generateSimplexNoise(int width, int height){
      float[][] simplexnoise = new float[width][height];
      float frequency = 5.0f / (float) width;
     
      for(int x = 0; x < width; x++){
         for(int y = 0; y < height; y++){
            simplexnoise[x][y] = (float) noise(x * frequency,y * frequency);
            simplexnoise[x][y] = (simplexnoise[x][y] + 1) / 2;   //generate values between 0 and 1
        }
      }
     
      return simplexnoise;
   }


This generates the following map!



Thank god. Just may end up using Simplex Noise after all! My only remaining question is how do you randomise this? My original idea was to simply give a random offset for all the x and y values of my array, but is it that simple? Or should I be doing something else instead?
11  Game Development / Game Mechanics / Generating "True" 2D Perlin Noise on: 2013-12-30 17:47:35
After reading material and trying out different examples for days I feel like I have hit a brick wall. Please note in advance I have read most posts and the wiki article on this topic, I'm just looking for some good advice.

I've been working on a 2D terrain generation system for a new game I'm working on, and after some reading decided to shoot for a Perlin noise powered implementation. After some reading, I found the following article:

How to Use Perlin Noise in Your Games:
http://devmag.org.za/2009/04/25/perlin-noise/

I thought, "Brilliant! Finally an implementation I can seem to understand!" I put hands to keyboard and began writing an implementation based off the article. After running the code and finally getting some visual output I felt relief at first, and then slowly annoyance. Below are samples of my output.



I'm annoyed because this "random" noise seems to generate features which appear as horizontal or vertical compostions of mountains or ponds. There are virtually no diagonal lines and very few circular formations. I went back to the original article to discover that the implementation was not Perlin noise, but instead a variation of value noise.

So I scrap my pervious implementation and start again. I begin by implementing the version of Perlin noise featured on Riven's blog:

PerlinNoise :: smooth/turbulent : http://riven8192.blogspot.fr/2009/08/perlinnoise.html

Even though it seems to be in 3D space, I assume I can set Z to zero and all will be merry. Well so I thought, but once I test the code and find that for all possible inputs I was getting 0 from each call to the smoothNoise function.

Again, I feel like I have hit a brick wall, and I need to ask advice before I keep wasting any more of my time. Firstly, is the sort of horizontal/vertical features in value noise normal? And if they are, does Perlin noise not feature this? Lastly, if someone could point me in the direction of a functional Perlin noise implementation I would greatly appreciate it, as I am begining to think I am trying to understand something way out of my league :/
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.

CopyableCougar4 (14 views)
2014-08-22 19:31:30

atombrot (28 views)
2014-08-19 09:29:53

Tekkerue (25 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (15 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (61 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38
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!