Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 205 206 [207]
  ignore  |  Print  
  What I did today  (Read 3016908 times)
0 Members and 3 Guests are viewing this topic.
Offline orange451

JGO Kernel


Medals: 456
Projects: 7
Exp: 7 years


Your face? Your ass? What's the difference?


« Reply #6180 - Posted 2018-11-15 02:10:10 »

I spent the last week working on the actual networking part of my engine. I decided on going with a "server controls all" approach. Any instance-able class type in my engine will be automatically replicated from server to client when created, updated, or destroyed. So if I create a folder on the server, and name it "Jeff", a folder with that same name will appear in the same place on all clients. This level of replication made it convenient to have the server control all main game features.

Then I extended it into Physics. When a physics object exists within a game object, and it is currently NOT sleeping, it will send updates to all of the clients, expressing where it is and where it's going. This forces all physics simulations of the clients to be synchronized with the server.

I then took it a step further. Regarding the physics... If a physics object exists as a descendant of a players character, the server will not tell THAT PLAYER that his physics is updating. Additionally, any update that THAT PLAYER sends to the server regarding that physics object will be accepted into the server. i.e. your own client can have control of your own players physics, and the server will accept it. This allows me to have players locally controlled and still update to the server, and have OTHER clients see those changes. You can't, however, from your own client update some other players physics, as it will get rejected by the server. Finally, if you manually set the position of a client-controlled physics object on the server, that will still force replicate to the client. This allows me to still create some sort of "anticheat" on the server, where I can prevent players from walking through walls locally (using server-sided raycasting & teleporting).

Then I decided to make a ping-pong game to show it:
Click to Play


Your paddle (red) is simulated on your client. Your position is sent to the server and the server accepts it. The ball is completely server sided, and will only collide with objects on the server; Same with the server's paddle (green).

First Recon. A java made online first person shooter!
Offline KaiHH

JGO Kernel


Medals: 650



« Reply #6181 - Posted 2018-11-20 21:54:40 »

After over two weeks of having to do other stuff, I finally came to work on that voxel ray tracing again. Changed k-d tree memory layout and tree depth, which improved total frametime by ~60% (now giving over 1000 FPS for that scene - yeah, that comma is the decimal separator Smiley). I cannot stress enough how important it is in GLSL to do "wide" vector loads as much as possible. So, whenever we have a SSBO with a struct containing 4 ints, then by all means combine those into a single ivec4! And it can even be benefitial to increase the memory footprint of the struct if that means to have fewer load transactions by probably combining 1 int, 2 shorts and 3 bytes into a single ivec3 (effectively ivec4 after alignment padding).
'Before' and 'after' images (of same scene):

As before, the red color channel represents the nodes the ray traverses along its path via direct neighbor pointers and the green channel corresponds to the number of times the ray has to descend from a parent to child node.

After having read Symmetry-aware Sparse Voxel DAGs (SSVDAGs), that gave me ideas to cut down storage for the voxels list by storing the configurations of N^3 voxels inside of a k-d tree node as a single bitfield and trace the voxels that bitfield represents without actually loading the voxel positions from the SSBO. Let's just hope that memory bandwidth is still my bottleneck.
Offline NuclearPixels
« Reply #6182 - Posted 2018-11-21 21:06:52 »

Been finishing the assets for the first level, now that all are done rendering part is incoming.

Since I am a lazy person, I have created an application which will do this for me. Basically, Blender supports command line execution in background and the good part is that allows to render stuff from command line. Since beginning I have made a right choice of sticking to one-model-one-animation file organization approach. I did not have any specific reason for that, just decided to do it like that, but now it played a crucial role, since the only thing I need to do to make it work with Blender command line execution is adding a camera to each file and adjusting the view through the nodes system (isometric cabinet view which I adopted). Beware, if you are going to integrate Blender command line execution to your pipeline, you need to use the following approach to execute the process:
1  
2  
3  
4  
5  
6  
Process process = Runtime.getRuntime().exec(stringJoiner.toString());
BufferedReader processOutput = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line;
while((line = processOutput .readLine()) != null){
    LOG.trace("BLENDER OUTPUT: {} ", line);
}

The approach with
1  
process.waitFor()
will not work, I am not sure why, I my case the execution was starting always when I was stopping the Java application...

Since I am a lazy person^2, I have created another application, based on YAML configuration, the application will read rendered images and crop them, additionally checking whether the image goes out of bounds of the cropped area and if the render is too close to bounds (in the game I use a shader to calculate the outline of the object, so if it is too close to the image bounds, the outline will look like it is cut). Furthermore, when in debug mode, besides bounds warning it produced additional images, which display where the bounds were violated (yellow - non violated inner bounds, red - non violated outer bounds, cyan - violated bounds) and the center of the image so I could have an idea how much I should adjust the image in YAML configuration for the next cropping iteration.


Took me a couple of hours, not big deal, but I think it can save a lot of time...

Learning and having fun developing games. Twitter: https://twitter.com/NuclearPixels
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cygnus
« Reply #6183 - Posted 2018-11-23 01:29:35 »

Had some turkey. Happy Thanksgiving, to all y'all Americans!
Offline orange451

JGO Kernel


Medals: 456
Projects: 7
Exp: 7 years


Your face? Your ass? What's the difference?


« Reply #6184 - Posted 2018-11-28 19:41:05 »

Finally got around to rewriting my PBR to not be hacked in. Before I abused the emissive buffer to write my PBR data. Now I'm doing it in post:


First Recon. A java made online first person shooter!
Offline NuclearPixels
« Reply #6185 - Posted 2018-11-28 23:10:13 »

Started integration of my Blender models into game, still looks empty, but I did not get yet to secondary/decorative objects (I still have not re-calculated offsets, so some things look out of place).



Good I invested time into scripting my rendering process, I had to redo the renders of humans 3 times, and going to have to redo for the 4th time.. I did a mistake of rendering with low resolution, which does not work as well as rendering to higher resolution and resize.

Going to rework UI and controls (6th time now) after I am done with integration of graphics, I have an idea how to make it one button only (for interaction with game objects), but need to test it.

Learning and having fun developing games. Twitter: https://twitter.com/NuclearPixels
Offline KaiHH

JGO Kernel


Medals: 650



« Reply #6186 - Posted 2018-11-30 22:06:49 »

Implemented another optimization in the kd-tree-based voxel ray tracing: Merging adjacent voxels. Up till now all visible individual 1x1x1 voxels were being retained and the kd-tree was built from those. That wasn't bad and had many advantages. However, it required that lots of voxels had to be processed, even those that could have been merged with nearby voxels into larger cuboids.
While reading about Minecraft's Greedy Meshing approach:
- https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/
- https://0fps.net/2012/07/07/meshing-minecraft-part-2/
and also other posts, such as:
- https://medium.com/@fogleman/voxel-rendering-techniques-fa8d869457ca
the algorithms used there were primarily designed to help mesh a voxel scene into "faces" to be rasterized efficiently. However, with ray tracing, I actually do not want to have faces but actual voxels/cuboids. So the 3-axes sweeping technique presented in those articles don't apply to my situation, since they are unable to merge whole voxels - they can only merge faces of voxels since they only look at each of the 3 major axes at a time.
My idea was then simply to take the referenced 2D "largest rectangle" algorithm from https://stackoverflow.com/questions/2478447/find-largest-rectangle-containing-only-zeros-in-an-n%C3%97n-binary-matrix/30418912#30418912 and apply that for each Y layer of the voxel scene. This would of course not be optimal for now, since only voxels on the same Y layer could be merged, but it's better than nothing. And in fact it gave ~20% performance increase when applied to the voxel scene shown below. Left image is without voxel-merging; right is with merging voxels on the same Y level:

The color metrics are still the same, but one can see that the right image has much darker colors indicating fewer ray descends and neighbor pointer follows. Left scene has 191.141 voxels; right scene has 31.291 "cuboids" (merged voxels).
This optimization was particularly helpful for the 'ground plane' which got shrunk down from 256*256 voxels to 1 cuboid.
Though, for actual kd-tree building when splitting the voxels/cuboids by the split plane determined via Surface Area Heuristics, big merged voxels will get splitted into two again when the split plane cuts through the big voxel.
Offline CommanderKeith
« Reply #6187 - Posted 2018-11-30 22:31:14 »

Really impressive work. Interesting to read and watch the images and videos.
Does this optimisation to merge the voxels into bigger cubes make the terrain non-destructible?

Would be interesting to see how small you can make the voxels and still render them with high speed. I wonder how tiny the voxels have to be to make almost smooth-edged curved faces?

Offline KaiHH

JGO Kernel


Medals: 650



« Reply #6188 - Posted 2018-11-30 22:42:49 »

Thanks!
Does this optimisation to merge the voxels into bigger cubes make the terrain non-destructible?
That is definitely the big advantage of having regular 1³ voxels. With those I could at least "mark" them as 'dead' when the player destroys them and later on idle-time do a rebuild of the kd-tree to incorporate the changes done so far by the player like destroying voxels and also adding new ones which to that point had been rebuilt in a separate "additions" tree.

That's not as easy anymore with those merged voxels, but it's still doable: When a 1³ voxel gets destroyed that was part of a bigger merged voxel, then I need to break up the merged voxel and re-optimize those 1³ voxels again without the destroyed one. That is still doable efficiently, since all of that only has to happen inside of the same kd-tree leaf node, and it does not have to happen for the whole scene. Additionally, I also only need to break up a voxel on the same Y layer.

Identifying which of the represented 1³ voxel got hit by a ray when testing against a big merged voxel for irradiance lookup will also be bit harder now, since irradiance has still to be stored for all individual 1³ voxels. But that is also solvable with some modulo arithmetic.
Offline CommanderKeith
« Reply #6189 - Posted 2018-11-30 22:59:12 »

Thanks that's great, I didn't realise it was easy to use two separate trees concurrently. Nice one

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline 65K
« Reply #6190 - Posted 2018-12-01 06:44:16 »

We published the free demo of Lethal Running on Steam: https://store.steampowered.com/app/951170/Lethal_Running_Prologue/
Made with Libgdx.







Lethal Running - a RPG about a deadly game show held in a futuristic dystopian society.
Offline KaiHH

JGO Kernel


Medals: 650



« Reply #6191 - Posted 2018-12-01 14:03:41 »

Today I wanted to look into rendering grass blades. Minecraft simply uses two crossed, textured quads/rectangles on top of another voxel. So, that's what I did as well, just that I do not use geometry to represent the quads but a custom voxel/ray intersection function which just checks for two plane/ray intersections bounded by the extent of the voxel (or any smaller portion of it to have smaller grass). Now, the quads just need to be textured, but obtaining the texture coordinates from the point of intersection is easy. Here's a video of an island/mountain scene where each voxel only consists of the two crossed quads:
<a href="http://www.youtube.com/v/mDXcdv1pK_g?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/mDXcdv1pK_g?version=3&amp;hl=en_US&amp;start=</a>
EDIT: Image with texture coordinates visualization and with actual grass texture:

And a video:
<a href="http://www.youtube.com/v/XYZ0GOuqf6I?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/XYZ0GOuqf6I?version=3&amp;hl=en_US&amp;start=</a>
Offline SkyAphid
« Reply #6192 - Posted 2018-12-02 11:06:20 »

Copying all of our game's UI text to an external spreadsheet so the game can be localized is one of the most painful things I've ever had to do. Lol

it just werks
Offline cylab

JGO Kernel


Medals: 188



« Reply #6193 - Posted 2018-12-03 20:36:04 »

I would have created a csv-export tool for that... which probably would have taken 5 times longer  Cool

Mathias - I Know What [you] Did Last Summer!
Offline SkyAphid
« Reply #6194 - Posted 2018-12-04 00:57:22 »

I would have created a csv-export tool for that... which probably would have taken 5 times longer  Cool
I'm using a spreadsheet and exporting it as TSV (I like the tab spacing more for OCD reasons), the problem here is that we had a lot of GUI text built into the code itself because I never expected to have to actually localize Robot Farm. So I'm having to tediously go through every class and link them to keys in a spreadsheet. Really messy business.

it just werks
Offline NuclearPixels
« Reply #6195 - Posted 2018-12-05 23:51:38 »

Still a bit more on Blender side (I am sorry for posting too much Blender stuff, but I believe it might be useful for people who intent to learn it and makes part of the game I am developing in Java Tongue).

After integrating the models I have done into the game (some of them) I was quite unhappy with the result, something was missing. After looking into the games which has similar graphics with mine I noticed that there is one important component missing - outlines. Take a look at the following image. The number one is the image which does not have outlines and makes me extremely unhappy Cheesy. Since I have no expertise in the field I decided to experiment with different options.



The image number two has something called Blender Freestyle and in my opinion it looks much better in comparison to the first image (however I could not make it work with Hair particle system which I was using for modelling the roof, so had to replace it with wooden one). Number three uses a shader (so it is application dynamically generated effect) which in my opinion also improved the quality of the assets, it gives a notion of depth, I need to profile it however, especially on mobile devices, not sure about its performance (an alternative could be applying this effect on image itself, using edge detector algorithms for example with some bluring of the edge line). Finally, on the forth picture I combines both, which in my opinion resulted in the most interesting effect.

P.S(I know the sword is screwed, need to re-render human models, was using wrong distortion configurations :S)

Learning and having fun developing games. Twitter: https://twitter.com/NuclearPixels
Offline orange451

JGO Kernel


Medals: 456
Projects: 7
Exp: 7 years


Your face? Your ass? What's the difference?


« Reply #6196 - Posted 2018-12-06 03:43:37 »

#4 actually looks pretty cool. Maybe a picture with a bunch of assets on the screen at once?

First Recon. A java made online first person shooter!
Offline NuclearPixels
« Reply #6197 - Posted 2018-12-06 06:40:04 »

#4 actually looks pretty cool. Maybe a picture with a bunch of assets on the screen at once?

Thank for feedback, need to do the renders first Smiley

Learning and having fun developing games. Twitter: https://twitter.com/NuclearPixels
Offline CommanderKeith
« Reply #6198 - Posted 2018-12-06 09:39:38 »

It's looking really nice, great idea making 3d assets for a 2d side view game.
I also like the one with outlines. But I wonder if shadows might make it look better? I'm a terrible artist, but I've heard them say that shadows add perspective and 'ground' the characters and items in the landscape.

Offline NuclearPixels
« Reply #6199 - Posted 2018-12-06 11:08:08 »

It's looking really nice, great idea making 3d assets for a 2d side view game.
I also like the one with outlines. But I wonder if shadows might make it look better? I'm a terrible artist, but I've heard them say that shadows add perspective and 'ground' the characters and items in the landscape.

Heh, I am not an artist either, at all, I hate drawing actually, but desperate times require desperate measures Cheesy. I believe shadows would be the best solution. I see two possibilities there first of all simplistic shadows (a circle under units, trees, objects, "something" under buildings). Pros = easy to implement, cons - might look weird with some game entities. The second one, more sophisticated shadows, but straight away I see a huge problem there. Generally projecting a shadow on the floor should not be difficult, but what if the unit is going next to the building? How I can partially project part on the floor, partially on the building (I operate in pure 2D world). I believe it is solvable, but I need still to investigate it better (maybe after I releasing a small demo with a couple of levels I will focus on this one). BUT, if you have any tip for shadows I will really appreciate, since it will definitely cut the research time Tongue, allowing to focus on actual solution!

Learning and having fun developing games. Twitter: https://twitter.com/NuclearPixels
Online VaTTeRGeR
« Reply #6200 - Posted 2018-12-06 11:20:38 »

I don't think the players will notice if the shadows do not change near walls as long as they are:
  • mostly vertical
  • Not too strong/dark
  • blurred

The blurry outlines in your freestyle render looks good on the bottom part of models where it makes actual sense but awful on top of the units.
Offline SkyAphid
« Reply #6201 - Posted 2018-12-06 11:32:35 »

I made a Table of Contents generator for Google Sheets if anyone is interested. Google seriously makes the worst APIs on the planet, I've genuinely never used a single API that came out of that company that was well documented or pleasant to use. Making this script gave me PTSD flashbacks to Android's APIs. By the time I was ready to deploy, I was so sick of it that I just decided to dump it on github and be done with it.

Anyway yeah. This script opens a sidebar that will let you generate a table of contents sheet, and then after that it gives you a basic dropdown menu that works like the Outline in normal Google Docs. I made it because our localization sheet is getting large and I needed a way to easily jump around the sections and Google Sheets doesn't have anything like that by default for some reason. I guess they don't have to do it themselves when annoyed people like me will just do it for them. Lol

https://github.com/SkyAphid/GoogleSheetsTableOfContents


it just werks
Offline NuclearPixels
« Reply #6202 - Posted 2018-12-06 14:42:05 »

I don't think the players will notice if the shadows do not change near walls as long as they are:
  • mostly vertical
  • Not too strong/dark
  • blurred

The blurry outlines in your freestyle render looks good on the bottom part of models where it makes actual sense but awful on top of the units.

By mostly vertical you mean the shadow being projected only under the entity? How would you do it? Pre-render for each model? Use some pre-defined set of pre-rendered generic shadows? Use dynamic shader-based shadows?

Learning and having fun developing games. Twitter: https://twitter.com/NuclearPixels
Online VaTTeRGeR
« Reply #6203 - Posted 2018-12-06 20:17:39 »

Quote
mostly vertical = projected only under the entity
yep, but a slight angle doesn't hurt at all.

I baked my shadows into the sprites but I'm using a different perspective and longer distances where you will only notice if you look closely.
I'm pretty sure you can get away with this approach too, you just have to make the shadow subtle enough so that it looks good/believable in any situation.

You would be more flexible if you render the shadows dynamically, maybe have an asset property like shadow-size, offset and center to be able to draw one (or more) dark blob sprite(s) where the shadows should be, you don't even need shaders for this if you would rather not delve into that domain.

I suggest you at least try some variations of the baked in shadow, you might find a good balance after a few iterations.
Offline philfrei
« Reply #6204 - Posted 2018-12-12 21:20:32 »

I posted/released what I think is a nifty little polyphonic keyboard on itch.io.
Reference Note Keyboard
Uses an embedded, customized Java9 runtime made with JLink, so the download is under 20MB.

Am heading to the library to look for a book to help me get into the promotion mindset, to learn a bit about writing sales copy. All my energy has gone into coding, learning to play/compose music. Very little has gone into promotion, and I know the ad copy needs improvement.

It's free. Check it out and let me know what you think!


music and music apps: http://adonax.com
Offline orange451

JGO Kernel


Medals: 456
Projects: 7
Exp: 7 years


Your face? Your ass? What's the difference?


« Reply #6205 - Posted 2018-12-13 01:53:40 »

Spent the last day figuring out how to make a dragger... Was a lot more challenging than I thought. None the less it works quite well!

Click to Play


I also started prettying up the github for it:
https://github.com/orange451/AnarchyEngine

First Recon. A java made online first person shooter!
Pages: 1 ... 205 206 [207]
  ignore  |  Print  
 
 

 
hadezbladez (332 views)
2018-11-16 13:46:03

hadezbladez (174 views)
2018-11-16 13:41:33

hadezbladez (330 views)
2018-11-16 13:35:35

hadezbladez (80 views)
2018-11-16 13:32:03

EgonOlsen (2172 views)
2018-06-10 19:43:48

EgonOlsen (2200 views)
2018-06-10 19:43:44

EgonOlsen (1375 views)
2018-06-10 19:43:20

DesertCoockie (2007 views)
2018-05-13 18:23:11

nelsongames (1644 views)
2018-04-24 18:15:36

nelsongames (2294 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!