Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (799)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (865)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 63 64 [65] 66 67 ... 215
  ignore  |  Print  
  What I did today  (Read 3548316 times)
0 Members and 5 Guests are viewing this topic.
Offline basil_

« JGO Bitwise Duke »


Medals: 418
Exp: 13 years



« Reply #1920 - Posted 2015-03-13 19:28:41 »

did some JNI c code, tried the new Clion IDE, experienced pain, used netbeans again.
Offline EgonOlsen
« Reply #1921 - Posted 2015-03-13 21:35:48 »

Today, i created two new texture sets for the dungeons...that makes three of them and one to go...



Edit: Added the last set today!

Offline Ashedragon

JGO Coder


Medals: 27
Projects: 1
Exp: 4 years


The best person you could possibly be is yourself.


« Reply #1922 - Posted 2015-03-13 21:44:28 »

Added a bit of sweet, sexy, entirely superfluous polish:
Click to Play


I also added a random bunch of words it'll spit out when you get killed off.

boo
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Slyth2727
« Reply #1923 - Posted 2015-03-14 03:17:39 »

Fanshy new main menu. Calling the game limelight because of the companion light's color (it's now lime green... you probably guessed that. Whatever. Stop rolling your eyes.).
Edit: notice the terrifying code in the background, it's monstrous.

http://recordit.co/LL4vAB3m8E
Offline Olo

JGO Coder


Medals: 15
Projects: 3
Exp: 5 years


Metaphysical solipsism AFFIRMS your existence


« Reply #1924 - Posted 2015-03-14 09:45:27 »

Finally got normal mapping working  Cool thanks to this article. After ~12 hours...
I was way overcomplicating things / trying to make my shader code look exactly like the tutorial shader code.
I then looked back, reverted all changes, and tried to actually understand the code.
Then it turned out i had to add like 5 lines to the fragment shader  Pointing
1  
2  
3  
4  
5  
if(usesNormalMap > 0.5){
      vec3 nColor = texture(normal_textureSampler, pass_textureCoords).rgb;
      nColor.g = 1.0 - nColor.g;
      unitNormal = normalize(nColor * 2.0 - 1.0);
}

Click to Play

-Can you fix it?
-No, I can't. But I can bypass it with one of these.
Offline lcass
« Reply #1925 - Posted 2015-03-14 10:43:06 »

Just finished basic electronic implementation , havent tested power consumers yet but that should be fun. Here is an example of a ship implementing it with solar panels , each produces 10 watts of power , each cable has 1 ohm of resistance which is ridiculously high but is just there to show how the power work , will be something like 0.003 eventually. The second gif which has horrendous quality shows me changing the voltage , for each device it will have a voltage limit , if the voltage goes too high then the device will either explode or set fire but that is miles away for now it just modifies the total wattage produced.

Gif
Click to Play
Offline cylab

JGO Kernel


Medals: 195



« Reply #1926 - Posted 2015-03-14 14:37:39 »

Smoke tested my Arduino project: LED Music Visualization Frame:

<a href="http://www.youtube.com/v/emn7pw13G_E?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/emn7pw13G_E?version=3&amp;hl=en_US&amp;start=</a>

Mathias - I Know What [you] Did Last Summer!
Offline theagentd
« Reply #1927 - Posted 2015-03-14 21:47:01 »

I improved the performance of the grass rendering a lot. This scene was running at 44 FPS. With the new optimizations, the exact same scene, down to the pixel, runs at exactly 60 FPS.



The grass is drawn as a shitload of simple quads. This causes heavy overdraw, to the tune of 34 million fragments or 16x+ overdraw per pixel at 1920x1080p, before depth and alpha testing. Since alpha testing is used, this disables early depth testing which means that even though something like 80-90% of those fragments never end up on the screen they still cost a lot of performance. Add the fact that the grass is rendered to the G-buffer which consists of 3-4 render targets and you end up with extremely bad performance. What I did was to separate the rendering of the grass into two passes. I first do a depth-only pass which uses a simple shader for alpha-testing the texture. This is reasonably fast even without early-Z since the shader is so simple. In the second pass, I DISABLE alpha testing and change the depth testing function to GL_EQUAL and render the grass as usual. The result is identical to depth testing, but the depth-testing performance is improved a lot even though everything is rendered twice.

Myomyomyo.
Offline pitbuller
« Reply #1928 - Posted 2015-03-15 00:12:43 »

I improved the performance of the grass rendering a lot. This scene was running at 44 FPS. With the new optimizations, the exact same scene, down to the pixel, runs at exactly 60 FPS.
...
The grass is drawn as a shitload of simple quads. This causes heavy overdraw, to the tune of 34 million fragments or 16x+ overdraw per pixel at 1920x1080p, before depth and alpha testing. Since alpha testing is used, this disables early depth testing which means that even though something like 80-90% of those fragments never end up on the screen they still cost a lot of performance. Add the fact that the grass is rendered to the G-buffer which consists of 3-4 render targets and you end up with extremely bad performance. What I did was to separate the rendering of the grass into two passes. I first do a depth-only pass which uses a simple shader for alpha-testing the texture. This is reasonably fast even without early-Z since the shader is so simple. In the second pass, I DISABLE alpha testing and change the depth testing function to GL_EQUAL and render the grass as usual. The result is identical to depth testing, but the depth-testing performance is improved a lot even though everything is rendered twice.

Did you tested to sort those quads from front to back. Alpha test does disable early depth test but does not disable hi-z. Probably does not matter because your grass blade seems to be lot thinner than hi-z resolution. Is that foliage deferred or forward?

Have to test this method for Hardland too. I too have tons of foliage and sometimes it can be real performance killer.
Offline LiquidNitrogen
« Reply #1929 - Posted 2015-03-15 00:26:25 »

Joined in the fun making random galaxies. I'm not trying hard to model a real galaxy, just making interesting places for mission locations.
Click to Play
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline lcass
« Reply #1930 - Posted 2015-03-15 00:46:15 »

Found this and I already love it.
http://www.subsim.com/radioroom/showthread.php?t=202304
Offline theagentd
« Reply #1931 - Posted 2015-03-15 00:58:12 »

Did you tested to sort those quads from front to back. Alpha test does disable early depth test but does not disable hi-z. Probably does not matter because your grass blade seems to be lot thinner than hi-z resolution. Is that foliage deferred or forward?

I haven't tested sorting them; they're rendered in the order they're culled from the quad tree, but this essentially means that they're sorted in one direction. I do not get a noticeable difference by rotating the camera, which should represent an essentially worst and best case scenario depending on the angle.

Everything's deferred. 4 render targets.

Myomyomyo.
Offline lcass
« Reply #1932 - Posted 2015-03-15 02:27:31 »

Just played some more of that sub simulator , started a global nuclear war and yer. it was possibly the most epic thing I have ever experienced in such a simple game.
Offline LiquidNitrogen
« Reply #1933 - Posted 2015-03-15 02:33:09 »

Are you actually rendering those or are you pulling some LOD magic?  Grin

Straight rendering sprites, there are only 300 of them. The only magic trick is that they get replaced with a plain white circle as the camera zooms out because they are too hard to see otherwise. Wait till I add a fake rotation effect and atmosphere to the planets Wink
Offline basil_

« JGO Bitwise Duke »


Medals: 418
Exp: 13 years



« Reply #1934 - Posted 2015-03-15 19:56:59 »

finished another round on spline-interpolations. made it a bit dimension and vector type/class agnostic Smiley

linear :


bspline


catmull-rom


natural-cubic
Offline pitbuller
« Reply #1935 - Posted 2015-03-15 20:25:04 »

finished another round on spline-interpolations. made it a bit dimension and vector type/class agnostic Smiley
natural-cubic

Natural cubic look nice. Any chance to share the code? How performance compares to catmull-rom?
Offline basil_

« JGO Bitwise Duke »


Medals: 418
Exp: 13 years



« Reply #1936 - Posted 2015-03-15 20:50:12 »

yea they look like more useful for path animations.

performance is better compared to bspline/catmull but that's cos' you have to cache lots of the coefficients (an extra vec4 each controlpoint) while with bsplines/catmull you can compute them in-flight, doing that with natural would be devastating.

code is pretty much inspired by http://www.cse.unsw.edu.au/~lambert/splines/ - it's more about getting it to blend nicely with the rest of the code/project/utils. not sure if it'd help to post a wall off arrays adding and multiplying the crap out of vectors. Wink
Offline pitbuller
« Reply #1937 - Posted 2015-03-15 22:18:48 »

yea they look like more useful for path animations.

performance is better compared to bspline/catmull but that's cos' you have to cache lots of the coefficients (an extra vec4 each controlpoint) while with bsplines/catmull you can compute them in-flight, doing that with natural would be devastating.

code is pretty much inspired by http://www.cse.unsw.edu.au/~lambert/splines/ - it's more about getting it to blend nicely with the rest of the code/project/utils. not sure if it'd help to post a wall off arrays adding and multiplying the crap out of vectors. Wink

Any precomputing would not suite for my purposes. I have tested catmull-rom with skeletal animation and it does work really nicely and is basically one line replacement.(if you don't count nasty "what frames this animation should use" code).
Offline LiquidNitrogen
« Reply #1938 - Posted 2015-03-16 10:23:27 »

Today I made a teleporter system Cheesy
<a href="http://www.youtube.com/v/dXgTaHLMX_c?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/dXgTaHLMX_c?version=3&amp;hl=en_US&amp;start=</a>
Offline basil_

« JGO Bitwise Duke »


Medals: 418
Exp: 13 years



« Reply #1939 - Posted 2015-03-16 11:17:59 »

that's some huge HUD font Wink
Offline Olo

JGO Coder


Medals: 15
Projects: 3
Exp: 5 years


Metaphysical solipsism AFFIRMS your existence


« Reply #1940 - Posted 2015-03-16 21:18:28 »

Remember when i posted that i figured out bump mapping? Yeah, i was wrong. The sphere was normal mapped correctly only when the light was at a certain position.
I looked up the problem on google and struggled for 3 days to get the thing working. Basically i needed to convert the light & eye position to texture-space, then do calculations on that.
To do that i needed to calculate the TBN (tangent, binormal, normal) 3x3matrix and multiply lightPos & eyePos by it.
I had a lot of problems on the way, like having some sort of "gradient" on the faces that were rendered --->

I was trying to pull off some sick math to remove it, but then the next day, i deleted the code, so i could start over.
I looked at the code for a bit, and then spontaneously surrounded the tangent vector with a normalize() function. It worked. HALLELUJAH !
If anyone has problems with normal mapping in the future, pm me, i think i can point you in the right direction Smiley
Here is the awesome article that made everything clear : http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter08.html

-Can you fix it?
-No, I can't. But I can bypass it with one of these.
Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #1941 - Posted 2015-03-16 21:20:10 »

I looked at the code for a bit, and then spontaneously surrounded the tangent vector with a normalize() function. It worked. HALLELUJAH !

Might want to normalize them before sending them to the shader, less GPU instructions the better. Wink

Offline BurntPizza

« JGO Bitwise Duke »


Medals: 486
Exp: 7 years



« Reply #1942 - Posted 2015-03-16 21:21:56 »

Might want to normalize them before sending them to the shader, less GPU instructions the better. Wink

Unless the instructions are done in parallel, which is why shaders and GPUs exist.
Offline pitbuller
« Reply #1943 - Posted 2015-03-16 21:51:01 »

I looked at the code for a bit, and then spontaneously surrounded the tangent vector with a normalize() function. It worked. HALLELUJAH !

Might want to normalize them before sending them to the shader, less GPU instructions the better. Wink
You need to renormalize it at fragment shader anyway.
Offline pitbuller
« Reply #1944 - Posted 2015-03-16 21:54:39 »

Remember when i posted that i figured out bump mapping? Yeah, i was wrong. The sphere was normal mapped correctly only when the light was at a certain position.
I looked up the problem on google and struggled for 3 days to get the thing working. Basically i needed to convert the light & eye position to texture-space, then do calculations on that.
To do that i needed to calculate the TBN (tangent, binormal, normal) 3x3matrix and multiply lightPos & eyePos by it.
I had a lot of problems on the way, like having some sort of "gradient" on the faces that were rendered --->
I was trying to pull off some sick math to remove it, but then the next day, i deleted the code, so i could start over.
I looked at the code for a bit, and then spontaneously surrounded the tangent vector with a normalize() function. It worked. HALLELUJAH !

Math seems to be lot intuitive if you transfrom normalmap normal to world/viewspace and do lighting there. This also make normal mapping code lot less intrusive and cost is not dependant of numbers of lights. It's also way to go with deferred rendering.
Offline Slyth2727
« Reply #1945 - Posted 2015-03-16 22:00:25 »

You had to normalize it because it was a directional vector. I think. Directional vectors' length must always be one. Right? Yeah..?
Offline wessles
« Reply #1946 - Posted 2015-03-16 22:03:04 »

Decided to mess with CLion. It's a bit underdeveloped, but I love it so far. I even decided to make a little "fluid" physics thing with Box2D and SFML.

<a href="http://www.youtube.com/v/_op8RZI9ozE?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/_op8RZI9ozE?version=3&amp;hl=en_US&amp;start=</a>

In other news, I realized that having an unreleased game with a public github repo is a bad idea and swapped to BitBucket for free privacy.
Offline Longarmx
« Reply #1947 - Posted 2015-03-17 04:18:57 »

So, I was messing around in some of my old projects when I decided to open up my 3D world again. I played around a bit, and I realized how much better it would look with larger, less repetitive land masses. So, I just increased the persistence and number of octaves. However, that made each tile a bit too jagged for my liking, so I decided to implement a smoothing algorithm. I think at the moment it does more harm than good, but at least it's trying. Wink Next step would be to get cross-chunk smoothing working (which should be trivial) and tuning; but it's late, I'm tired, and have to be up early tomorrow...so I'm going to call it a night! Some screenshots for proof of my ramblings...

Before:


After:


Edit: It's crazy that I haven't worked on this for over six months!

Offline Slyth2727
« Reply #1948 - Posted 2015-03-17 04:37:54 »

Took another crack at battlefield, got an internal hack working in C++. Basically I wrote a program to inject a DLL I wrote into the memory address space of the game, so with the proper SDK offsets I could literally access the stuff like I was programming from the real source. Very fun. I can even call virtuals! I got engine debug rendering working, but then decided to simply hook into directx instead because it suited my needs.
Offline Opiop
« Reply #1949 - Posted 2015-03-17 14:19:57 »

Renewed my temporary permit so I can take my driving test in 10 days and get my drivers license! I've also continued to learn more about the libraries and things I need to know for my internship, including JUnit and Tomcat. Not the most interesting, but also kind of fun to learn all the little support libraries that you can use.

I've also discovered I do NOT like front end web development. It's just not fun to me at all!
Pages: 1 ... 63 64 [65] 66 67 ... 215
  ignore  |  Print  
 
 

 
Riven (198 views)
2019-09-04 15:33:17

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

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

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

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

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

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

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

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

nelsongames (4305 views)
2018-04-24 18:15:36
Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

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
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!