Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (500)
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
1  Game Development / Newbie & Debugging Questions / Re: LibGdx Entity error on: 2014-04-08 22:12:28
Make sure the texture is actually there?
2  Game Development / Artificial Intelligence / Re: Pathfinding efficiency on: 2014-03-21 06:07:44
Haven't read everything, but if you think it is looking trough too many nodes and taking too long, try looking into Jump Point Search.

http://harablog.wordpress.com/2011/09/07/jump-point-search/
3  Game Development / Artificial Intelligence / Re: A* trouble on: 2014-03-16 00:12:02
Like i said, the map is created out of an array, which decides what tiles go where.
The problem arises when the tile array, lets say its 512x512 tiles large, which makes the map 512x512x8 pixels large.
One problem is that the algorithm has problems when going between the two, the second is the bad movement, the entity going to the "0,0 position" on each tile.
4  Game Development / Artificial Intelligence / A* trouble on: 2014-03-15 16:30:45
I am having some troubles getting my A* algorithm working correctly, or rather, implementing the path on my entities correctly.

I have successfully implemented this code into my game, it gets a path that avoids mountains and lakes.
http://www.cokeandcode.com/main/tutorials/path-finding/


The problem starts when i want my entity to follow the path. My map is made out of 8x8 tiles, and the algorithm calculates the path according to the map array, which makes the path 512x512 pixels large, instead of 512x512 tiles large.
This creates a problem;
I am not able to create a path to anything outside a 512x512 pixel area on the map, since otherwise it would be out of bounds, i have tried to fix this problem, but dunno if its a correct way.
The unit does follow the path correctly, if i paint the path up, and then enlarge it over the map it is correct.

I have tried to fix the problem by making the algorithm to work with tiles by dividing the target x/y by 8, thus getting the position in tiles. Doing this f*cked it up though, so probably i have missed something somewhere.  But my question is, is this the right way of doing it? The point is that i also want the units to walk pixel by pixel, but the a*star guides i have seen all goes by tiles, i dont think making a gigantihumongous array with every pixel on the map is a sane way of doing that.

The game i am trying to make is RTS, but the only tile based stuff on it is the map, think age of empires.
5  Game Development / Articles & tutorials / Re: Wondering how to use JarSplice? This is the thread for you! on: 2014-03-04 13:21:57
If there is more functionality in JarSplice maybe you could add some text about that? Would be nice to know what i am 'missing out' on if i only use eclipse.
6  Game Development / Articles & tutorials / Re: Wondering how to use JarSplice? This is the thread for you! on: 2014-03-04 01:50:44
Why not just put the libraries in the jar with eclipse? Works just fine.
7  Discussions / Business and Project Discussions / Re: RTS Programmers WANTED! on: 2014-02-20 01:11:25
Good looking graphics.

I myself is underway of making a RTS., havent gotten far with it yet though.
Like the other guy said, more info would be nice. I think it would be hard to work on something if you don't 'feel' with the game.
8  Game Development / Newbie & Debugging Questions / Re: [SOLVED] Tile mapping on: 2014-02-20 01:08:42
Or you can just set a scanner to use comma as delimiter?
And you don't really need the line == null stuff either?
9  Games Center / WIP games, tools & toy projects / Re: eXo - snappy space strategy on: 2014-02-18 15:57:23
Looks a lot like Euflora?
10  Game Development / Newbie & Debugging Questions / Re: LibGDX quest log display? on: 2014-01-28 20:15:48
TWL is what you need.
http://l33tlabs.org/


I havent tried it myself, but it seems totaly awesome. Though i heard it was a harder then the other GUIlibrary, Box2D i think it was called?
Check both of those.
11  Games Center / Cube World Projects / Re: How to add noise on: 2014-01-09 21:29:01
How do you create your map? The map array is what contains the data that will be rendered as your map. For example an array of floats with the values -1 to 1 as described below. You then tell the game to go trough every single post in the array and render all numbers between lets say -1 to -0.40 as a dirt block, -0.40 to -0 as grass, etc etc.
12  Games Center / Cube World Projects / Re: How to add noise on: 2014-01-09 18:02:05
http://www.java-gaming.org/topics/generating-perlin-noise/31605/view.html
http://www.java-gaming.org/topics/libgdx-2d-top-down-procedurally-generated-terrain/30281/view.html
http://www.java-gaming.org/topics/libgdx-2d-top-down-procedurally-generated-terrain/30281/view.html
http://www.java-gaming.org/topics/generating-2d-perlin-noise/31637/view.html


Several threads on it. Simply use the result as a heightmap.
13  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-07 19:05:25
The IDE isn't supposed to be able to run with a crash in the code. And if the IDE goes around this crash, knowing its there, it should tell about it. It makes total and complete sense, thinking anything else is f*cked up.
14  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-07 12:32:28
If you follow a map(Eclipse), and it creates a bridge where it thinks it should be a bridge, but it is'nt actualy built. So in reality(running the jar) when you come to that place, there is no bridge. That is a fault on the map, not the reader.
15  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-06 08:40:35
Its a bug in the software if it doesn't tell me that there is an error.
It's eclipse on windows, running a jar on windows. They should give the same errors. If not, Eclipse has given a false compiler that gives people false input.
16  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-05 23:56:57
If the compiler does not show that there is something wrong, even compiles and runs everything just fine, even though if there is an error that will prevent it from running, has an huge error in it.
17  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-05 23:50:29
I always type the names the same way, but for some reason this time it was different.

And how is it not eclipses fault if it doesn't pay attention to such an obvious error?
18  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-05 22:31:28
Ok.... i am a little pissed now.

Turns out Eclipse is not case sensitive when it comes to file names, whilst the java run outside Eclipse is....
19  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-05 21:53:06
I am working my way slowly trough the game uncommenting stuff as i extract the game from a working state to a crashing state. I think its somewhere in the entity / player class. But since i dont get an error i have no idea.


Yea, just export and run. The assets are there in the .jar file, so i am baffled.
20  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-05 21:29:29
I have tried on my laptop, no luck.
Works in eclipse, but not exported jar. :/
21  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-05 21:16:14
I don't know how it crashes, it doesn't give me any error.

Show:
1  
2  
3  
4  
5  
6  
7  
      map = new TmxMapLoader().load("maps/untitled.tmx");
      mapRender = new OrthogonalTiledMapRenderer(map);
      camera = new OrthographicCamera(width, height);
      player = new Player(new Vector2(width / 2, height /2), 60, (TiledMapTileLayer) map.getLayers().get(0), 4, bullets, camera);
      bullets = new ArrayList<Bullet>();
      enemies = new ArrayList<Monster>();
      Gdx.input.setInputProcessor(player);

There is nothing new in there, i don't remember the last time i edited anything in show().


Hide has nothing, i even commented out the call to the empty dispose. Resize is just changing the viewport and such, but isnt called since the window isnt resizable anymore.(i tried making it resizable again, but it crashes anyway.)
22  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-05 21:00:35
There is nothing in the GameScreen dispose, the only one that got is the MainMenu screen, which also uses an atlas. But nothing else does(neither do they use and atlas), havent gotten into learning that or the assetmanager yet. Anyways, i have skipped all the screens in front of gamescreen and go directly to the gamescreen when the game launches, and the game crashes. So i dont think that has anything to do with it.
23  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-05 20:40:57
https://www.dropbox.com/s/zgxk0ol9ohbdv18/folder.png


What main code are you after? just main class?

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
package com.sabo.zombies;

import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;

public class Main {
   public static void main(String[] args) {
     
   
      LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
      cfg.title = "Zombies";
      cfg.useGL20 = true;
      cfg.width = 480;
      cfg.height = 320;
       cfg.resizable = false;
     
      new LwjglApplication(new Zombies(), cfg);
   
}
}
24  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-05 20:21:42
Here is a screenshot proving that the libgdx stuff and others are in there, the folder is filled with classlibraries and so on.
https://www.dropbox.com/s/cfnfstuf7fv2w12/rarcomfolder.png

And here is a screenshot of the settings.
https://www.dropbox.com/s/ctf333pf6by7hlm/settings.png

 I have tried both extracting and packaging the libraries, nothing works. If it would have been a libraries problem, the first screens wouldnt work either, since they use tween stuff and the libraries associated with that. The only things i have added since friday are more images, which i have checked, they are there in the jar. Some code, and a new death/highscore screen. The code are simple loops to print the images up.

*edit* I tried to comment out everything but the camera and map generation from the gamescreen and it still doesnt run.
25  Game Development / Newbie & Debugging Questions / Re: [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-05 18:45:40
I have run it trough the console on windows, but i get no error showing up. I have tried added the try and catch on several different positions in the code, invoking the switch to GameScreen, and on the constructor in GameScreen. I also tried adding a few System.out.printlns here and there and none of them showed up.
26  Game Development / Newbie & Debugging Questions / [LibGdx] - Exported to Jar, and Gamescreen wont show, but other Screens will? on: 2014-01-05 14:52:35
All right, so i have exported a game i have created to an runnable jar file as i have many times before. Earlier i haven't had a problem like this, the last time i exported it was on friday, and now when the last version is finished and i export it, the window just closes when i have gone trough a few screens, flash, credits and menu, no error is given if i run it trough commandline. The game works fine if i run it trough eclipse. I have checked the buildpath and the asset folder is there and all. I have opened the jar with winrar and checked to see that all images are there, and they are. I have tried both to extract and package the libraries. I am at a total loss....

I looked around and only could find one thread on this, and that was an error with a static filepath.

I really need this fixed since it's supposed to be turned in on tuesday. :/
27  Game Development / Game Mechanics / Re: Generating "True" 2D Perlin Noise on: 2013-12-31 14:32:14
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.

I copied everything from the pdf this time instead of the so called quotes the other guy offered and it seems to work as you said. Though i have found that the reason i receive so many 0's is that the negative numbers returns as 0's when i receive the array back from the method., so that's something I'll have to work with next year.


As for making it random, go check the guy i was following at the beginning, the code that he quotes includes a seed and a random number in that version of Gustavsons code.
http://stackoverflow.com/questions/18279456/any-simplex-noise-tutorials-or-resources
28  Game Development / Game Mechanics / Re: Generating "True" 2D Perlin Noise on: 2013-12-30 23:45:01
Did you have a look at the Diamond/midpoint-displacement stuff? Of what i have seen from perplex noise it is a lot more smooth, while the other one feels more 'natural'.

What do you mean by 'perplex' noise? Google couldn't help me :/
Are you maybe talking about simplex noise?
Simplex noise isn't much different from Perlin Noise (or, better: Gradient Noise), it is just slightly modified to use simplex shapes as cells instead of squares, which minimizes the number of interpolation points and finally makes the algorithm faster.

Ken Perlin developed both algorithms and his aim with Simplex Noise was to make a faster version of Gradient Noise.


I wouldn't suggest the Diamond-Square algorithm. It's not a function that you could call on an arbitrary position, you need to have a grid for that, which is why it's more limited in usecase (only limited maps, something like the infinity of minecraft would be impossible/hard).

Yeah, i ment Simplex, i was a little perplexed(har har har...)

One game i am thinking of having a go at this winter is a age of empires/anno style game, which has a set boundary, so its not infinite but quite large. While another is a more 'unlimited' role playing game. Havent decided which to go with yet, but whichevers mapgeneration comes out the best has an edge over the other. I am aware of the history, i have spent a few days reading up on the few different noises and such, just havent tried them myself till now.
29  Game Development / Game Mechanics / Re: Generating "True" 2D Perlin Noise on: 2013-12-30 23:29:51
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.

Did you have a look at the Diamond/midpoint-displacement stuff? Of what i have seen from perplex noise it is a lot more smooth, while the other one feels more 'natural'.

https://bitbucket.org/dermetfan/libgdx-utils/src/b220ba67bf5c2e7f9c3cfd77cfea5d9add542a8d/libgdx-utils/src/net/dermetfan/utils/math/Noise.java?at=default
That algorithm isn't as fast as perplex, a 512x512 grid can take 3-4 seconds to fill. Might be some faster implementations out there though.

30  Game Development / Game Mechanics / Re: Generating "True" 2D Perlin Noise on: 2013-12-30 21:57:44
Try increasing decreasing the frequency of your output. I get much larger features and smoothing maps with a smaller frequency.

I have tried lots of things, but when i used the method you posted instead of the one from the page i was able to create a better looking map, but, the problem is that is it generating way too much 0's and 1's. See this result; https://www.dropbox.com/s/z8bpolrdihegcqq/savedColor.png

Upping or lowering the frequency doesn't change the total amount of them.
I am just copy and pasteing the code since i am not a brainiac for algorithms and math.


Pages: [1] 2
 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (50 views)
2014-04-15 18:08:23

BurntPizza (46 views)
2014-04-15 03:46:01

UprightPath (62 views)
2014-04-14 17:39:50

UprightPath (44 views)
2014-04-14 17:35:47

Porlus (60 views)
2014-04-14 15:48:38

tom_mai78101 (84 views)
2014-04-10 04:04:31

BurntPizza (142 views)
2014-04-08 23:06:04

tom_mai78101 (242 views)
2014-04-05 13:34:39

trollwarrior1 (201 views)
2014-04-04 12:06:45

CJLetsGame (208 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!