Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3 ... 10
 1 
 on: 2018-04-21 00:20:32 
Started by EliwoodL - Last post by EliwoodL
Hello JGO, this one's pretty simple:

I have the basics of a 2d batch drawer.  Currently there are no projection, view, or model matrices involved, which I'm attempting to fix today.

I changed the shader from this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
#version 330

layout (location=0) in vec2 inPosition;
layout (location=1) in vec2 inTexCoord;

out vec2 vTexCoord;

void main() {
   gl_Position = vec4(inPosition, 0.0, 1.0);
   vTexCoord = inTexCoord;
}



To this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
#version 330

layout (location=0) in vec2 inPosition;
layout (location=1) in vec2 inTexCoord;

out vec2 vTexCoord;

uniform mat4 projectionMatrix;

void main() {
   gl_Position = projectionMatrix * vec4(inPosition, 0.0, 1.0);
   vTexCoord = inTexCoord;
}


And I then supplied the shader with a bog-standard JOML matrix4f:

1  
2  
3  
4  
Matrix4f proj = new Matrix4f();
proj.identity().setOrtho(0, window.getWidth(), 0, window.getHeight(), -1f, 1f);
shader.setUniform("projectionMatrix", proj);
glViewport(0, 0, window.getWidth(), window.getHeight());


Now, no matter what corners or sizes of quads I supply, I don't get anything rendered on the screen.

Am I missing something obvious here?

 2 
 on: 2018-04-20 20:22:14 
Started by nebulousram - Last post by mike_bike_kite
If you haven't found a spot then I can do with a hand. I'm afraid the main game is written and plays reasonably well but it needs the following:
  • translating to JavaFX (or similar) to utilise the fullscreen capabilities on all hardware ie laptops.
  • Integration with Steam (cloud save and leaderboards)
  • conversion to exe
  • deployment via Steam

I'm afraid my current games aren't listed on here but I write arcade style shoot them ups (I just like playing that style of game).

 3 
 on: 2018-04-20 19:51:19 
Started by BurntPizza - Last post by h.pernpeintner
Haha, that may be my cat's sneeze, she doesn't like it when i work and that's her way to tell me  Grin

 4 
 on: 2018-04-20 18:43:08 
Started by BurntPizza - Last post by Damocles
thats literality a screenshot  Grin

i can see every sneese  persecutioncomplex

 5 
 on: 2018-04-20 17:54:23 
Started by BurntPizza - Last post by h.pernpeintner
Replacing my voxel cone tracing gi with a spherical harmonics based one, first working version uses ambient cubes though Smiley currently only ambient based


Edit: made smaller, sorry

 6 
 on: 2018-04-20 17:36:27 
Started by nelsongames - Last post by Damocles
Hi, oh there are many aproaches to your problem, I cant make a concrete example here, but throw in some ideas:

look at the solution starcraft had (also a tilebased map, having to cope with lots of path-calculations on 1997 hardware)


http://www.stormcoast-fortress.net/Irregularies/Images/ICCup%20Circuit%20Breaker(u)+height.gif
(better check the link directly..., JGO displays it weirdly)
Click to Play


You see that they have separated the map into subregions wich are connected by a graph (the lines).
The units will first do a pathfind over this graph (the lines) to determine the regions to travel.
Once this is done, the units will use the local pathfinding (as you have it) to reach the next "centerpoint" of the next region the was calculated on the path.

So you basically do two pathfinds:
-1, along the graph connecting the regions
-2, locally for the region the actor is currently in, until entering a new region


so how to create those regions?:
-by code (using a floodfill algorythm that tries to MARK about the same amount of tiles for each region, the startingpoint are probably spawned accoring to a grid-pattern)
-by hand (tedious, but basically that means to make equally sized area-blobs, and assign each one another ID number; in your editor you could do that with another layer)

-then create that path-graph between those regions. Wich basically just means that any region touching another regions via at least one passable tile will have a connection between them (between its centerpoint, and the others centerpoint)


You can also use A* to search that graph, just google tutorials on A* that use non tile-based connection-graphs.

That would be the approach I try first if you want to use one huge continuous tile-map

----------------

Easier would be to have regions only connected by specific passages (North, South,East,West), and have those regions in the world aligned in a grid.
Then you can use your A* two times. Once between regions, and the second time within a regions.
(You have to be careful to assure that each passage can walk to the other 3 passages)

--------

Tip: if you want to make a multiuser game: let the client calculate the path., then send that path to the server.
The server just checks if it does not violate any of your constrictions.


 7 
 on: 2018-04-20 16:01:02 
Started by nelsongames - Last post by nelsongames
Best is to post a picture of your gameworld (passable/blocked area) to see what aproach works best here.
And also if your maps are randomly generated, or manually created (that can help in placing areas manually).

This is the temporary map that I'm using (just trying to get all the basics down before spending more time on the design of the area), it's 1600 x 1600 pixels. Basically the walls are closed/blocked nodes, as well as the rocks in the area. One of the problems I'm also having is that I want the game world to be 100x bigger, but I know if it's any bigger it's going to cause a lot of issues with entity paths as there would be a large number of nodes, it just wouldn't scale well.

So I want to handle the game somewhat like RuneScape does, where you only update entities if you're in the same region as them.

How would I approach this issue? One solution that I was thinking of is loading two separate maps. So basically the entire game map, which is all rendered at once (not sure how Libgdx handles very large regions, can anyone let me know?), and then a region map, which is the same as the game map, but broken down or spliced. So if a player is in a certain 'region', the pathfinding will only search for nodes in that area. But will still let you see the entire game world, so you don't have to continuously see the black edges / the end of the game world. Not sure if that solution would work well, is there a better approach to this? I can already think of problems such as what if an entity is following the player, and then the player walks out to a different region.


 8 
 on: 2018-04-20 16:00:19 
Started by BurntPizza - Last post by SHC
Moved SilenceEngine forum to Flarum, and it is so beautiful!

https://silenceengine.goharsha.com/forum/

However I decided for it to be a fresh start because the original SMF version attracted a ton of spam.

 9 
 on: 2018-04-20 15:34:17 
Started by nelsongames - Last post by Damocles
2.5 ms sounds ok if you dont have too many actors, but you might be able to optimize the path-search more. (at 60 fps a frame is 16 ms long)

Best is to post a picture of your gameworld (passable/blocked area) to see what aproach works best here.
And also if your maps are randomly generated, or manually created (that can help in placing areas manually).

When you performance test an algorithm, don't forget to let it run a few dozent times, that lets the VM do its optimization. (JIT compilation)
Often algorithms suddenly run faster after a while

 10 
 on: 2018-04-20 15:00:23 
Started by nelsongames - Last post by nelsongames
Sorry guys I was wrong it's 2.5 ms, not 2.5 seconds. So I guess that's not as bad? I still want to get it more down, since a lot of paths would be generated.

Also from my understanding, the bigger the map, the more time it would take to find paths due to all the nodes. Could anyone explain to me how regions / chunks should be handled? This way it only loads paths in that specific region, while still being able to process the entire game world (as from my understanding that would also affect rendering since its more tiles to render).

Pages: [1] 2 3 ... 10
 
ivj94 (582 views)
2018-03-24 14:47:39

ivj94 (47 views)
2018-03-24 14:46:31

ivj94 (374 views)
2018-03-24 14:43:53

Solater (61 views)
2018-03-17 05:04:08

nelsongames (108 views)
2018-03-05 17:56:34

Gornova (150 views)
2018-03-02 22:15:33

buddyBro (693 views)
2018-02-28 16:59:18

buddyBro (91 views)
2018-02-28 16:45:17

xxMrPHDxx (493 views)
2017-12-31 17:17:51

xxMrPHDxx (730 views)
2017-12-31 17:15:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
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!