Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (517)
Games in Android Showcase (123)
games submitted by our members
Games in WIP (578)
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 [4] 5 6 ... 30
  ignore  |  Print  
  What I did today  (Read 72426 times)
0 Members and 3 Guests are viewing this topic.
Offline Spacebeans
« Reply #90 - Posted 2014-06-27 17:10:33 »

Alright, I'm starting to understand... But what I don't really get is this saving data onto the graphics card stuff. I know you save the depth buffer, normals, specular intensity, and diffuse color into a G-buffer. I just don't understand things like what data is actually going into that buffer. (Like images? Is it pixel data? Just bits?)

Also, where the GPU tests for the light pixels to be in the tile's frustum, is that done through a custom shader? How do you tell a GPU to compute that? If there's a tutorial, (preferably book / lecture) please let me know.
Offline theagentd
« Reply #91 - Posted 2014-06-27 19:38:55 »

The data is stored in textures. I simply set up MRT rendering (multiple render targets) using a framebuffer object to render to 4 color textures plus a depth texture as depth buffer. The texture layout looks like this:

1  
2  
3  
4  
5  
Texture 0 (GL_RGBA16F):   DiffuseR, DiffuseG, DiffuseB, <unused>
Texture 1 (GL_RGBA16F):   PackedNormal0, PackedNormal1, SpecIntensity, Roughness
Texture 2 (GL_RG16F):     MotionVectorX, MotionVectorY
Texture 3 (GL_RGBA16F):   GlowX, GlowY, GlowZ, <unused, used during postprocessing>
Depth buffer (GL_DEPTH_COMPONENT24): Depth


I then just read this data using texture fetches in the lighting shader. Note that the normal is packed using sphere mapping so that it only takes two values instead of three.



Constructing a tile frustum is pretty similar to doing frustum culling on the CPU. You extract the 6 planes and check the signed distance to these planes. This should be implemented on a compute shader to be efficient.

Myomyomyo.
Offline BurntPizza
« Reply #92 - Posted 2014-06-27 19:45:34 »

I think I'm addicted... I feel a strange attraction...

Click to Play

Click to Play

Click to Play


Rendered in real-time, of course.  Pointing
Source (it's still nasty): https://gist.github.com/BurntPizza/34844127864d36e79619

Now to find a heuristic for creating the circular orbs of energy types...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Longor1996
« Reply #93 - Posted 2014-06-27 22:29:56 »

I was working on the 5th iteration (Or rather: The 5th "great code rewrite/refactor") of my Voxel-Engine today.
This is the 1 Month birthday of the iteration, and I am working almost every second or third day on it, which is a new record of 'not giving up on it after a month'!

The current result:
- 14.426 lines of code.
- Uses Gson, LWJGL, EventBUS, and KryoNET.
- Has a basic GUI-System.
- Automated Asset Manager.
- 'Infinite' Bitmap FontRenderer.
- Both Fixed-Function and Programmable-Function 'pipelines' for OpenGL.
- FINALLY got the hang of all the right patterns.
- And some more stuff ...

Screenshot of the bare-bones (yet)non-functional Main-Menu:


There isn't anything besides the Main-Menu yet, sadly.
I am going to waste my entire weekend on this...

(Have a nice day!)

- Longor1996

Sorry for my bad English! That's because i am from Germany.
Offline Longarmx
« Reply #94 - Posted 2014-06-27 22:43:37 »

I was messing around with box2d and scene2d using libgdx. Currently, all you can do is jump around and spawn giant tennis balls everywhere  Smiley



Please ignore the bad art, it was done in less than 10 minutes. Cheesy

I was working on the 5th iteration (Or rather: The 5th "great code rewrite/refactor") of my Voxel-Engine today.
This is the 1 Month birthday of the iteration, and I am working almost every second or third day on it, which is a new record of 'not giving up on it after a month'!

Let's hope that this is the one then!

Offline Leif.Ross

Senior Newbie


Medals: 1
Exp: 3 years



« Reply #95 - Posted 2014-06-28 13:28:47 »

Thanks for the medal! ^^

I think I'm addicted... I feel a strange attraction...

Click to Play

Click to Play

Click to Play


Rendered in real-time, of course.  Pointing
Source (it's still nasty): https://gist.github.com/BurntPizza/34844127864d36e79619

Now to find a heuristic for creating the circular orbs of energy types...

Wow, that looks amazing!

You sort of get pulled in to a trance staring at them, the only thing that snaps you out of it, is the transition between the end and the beginning  Tongue
Thought about making a live wallpaper with them?



Also this is my first post, this seems like a awesome community, hi! Cheesy

Hi there, Welcome to JGO. Smiley


Thanks!  Cheesy

Algorithms designer, freelance developer and professional duck-assassin trainer.
Offline BurntPizza
« Reply #96 - Posted 2014-06-28 16:23:28 »

Thought about making a live wallpaper with them?

I would if it wasn't so computationally expensive, it takes almost all of a pretty strong CPU to render them at a decent frame rate, so mobile is out of the question.

Each frame you see there is 600K plotted points of the attractor.
Source is updated though, much cleaner (and faster), I'm actually sort of proud of how it runs.
https://gist.github.com/BurntPizza/c6f4c7f18daa9950692c
(Adjust sleep in RenderFrame.run according to your comp's power, I haven't got automatic throttling working yet)
Offline m77

« In padded room »

« Reply #97 - Posted 2014-06-28 17:47:52 »

i did absolutely nothing
i feel so empty
i can't say it's bad cause i know how does it feels to feel very bad
new life experience
but i can't say cool cause emptiness is not cool Smiley
Online princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #98 - Posted 2014-06-28 18:53:14 »

Cas basically has to cater to the bottom feeders, so OpenGL 3 level hardware is pretty much ruled out. Having said that, I read Battledroid was put on hold in favor of a game vastly narrower in scope, and more in the genre of puppygames' earlier games. Follow his twitter account for the latest updates.
Some developments in this area... Battledroid turns out needs OpenGL3 level hardware to get the performance we need without having to write some annoying extra code paths, and I think we've covered >90% of the customer base so 3.0+ or better it is for now. The benefits of glacial development speed is that old hardware gradually disappears Smiley So I'm still slowly diddling away on Battledroid and Chaz and Alli are working on a secret project... in Unity. (I was also working on Skies of Titan, another Java arcade game, but Chaz is never going to have the time to do both, so we decided on the Unity one as Battledroid needs progress)

Cas Smiley

Offline DarkCart

JGO Knight


Medals: 18
Projects: 7
Exp: 1 year


Power of the mind over flesh


« Reply #99 - Posted 2014-06-28 20:52:05 »

Been messing around with some software that makes MIDI file sound like old 8-bit music.

Click to Play


I messed around with this old Beatles song, check it out.

https://www.dropbox.com/s/ch4nmw5ydh0v7vr/8bitRingo.mp3

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline JVallius
« Reply #100 - Posted 2014-06-30 17:53:18 »

Reading The Art of Game Design by Jesse Schell

Good stuff

Offline Spacebeans
« Reply #101 - Posted 2014-06-30 17:58:30 »

I added resource loading to my game engine.

level-1.xml - resources
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
<project>
   
//    <!-- Configuration for game -->
    <configuration>
        <initialize title="Some game" width="800" height="600"></initialize>
    </configuration>
//    <!-- End configuration -->
   
    <resources>
//        <!-- Textures for level 1-->
        <resource name="test-texture1" type="texture" path="./resources/texture1.png"></resource>
        <resource name="test-texture2" type="texture" path="./resources/texture2.png"></resource>
//        <!-- End textures for level 1-->
    </resources>

</project>


level-1.log - auto generated
1  
2  
3  
4  
5  
[INFO 2014.06.30 14:01:12] Resource loader initialized successfully
[INFO 2014.06.30 14:01:12] Registered logging platform at '.\resources\level-1.log'
[---- 2014.06.30 14:01:12]  ...
[INFO 2014.06.30 14:01:12] Registered texture resource: test-texture1 - '[Attribute: path="./resources/texture1.png"]'
[INFO 2014.06.30 14:01:12] Registered texture resource: test-texture2 - '[Attribute: path="./resources/texture2.png"]'
Offline Longor1996
« Reply #102 - Posted 2014-06-30 18:23:23 »

I just made a small 'library' (~3 hours), that helps laying out objects (rectangles) on screen in a hirarchy of objects.
Have a screenshot:


I made a small typo there with "written Java": It should be "written IN Java".

Here is how to create a bunch of boxes, using the library:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
      void makeBoxes(ContainerNode root);
      {
         ContainerNode cnode = new ContainerNode(root);
         cnode.setPreferredBounds(new RectangleF(64, 96));
         cnode.addAttribute(LayoutAttribute.compassLayout());
         cnode.addAttribute(CompassAligmentAttribute.south("vertical-align"));
         cnode.addAttribute(CompassAligmentAttribute.west("horizontal-align"));
         
         {
            RectangleNode node = new RectangleNode(cnode);
            node.setPreferredBounds(new RectangleF(16, 64));
            node.addAttribute(CompassAligmentAttribute.north("vertical-align"));
            node.addAttribute(CompassAligmentAttribute.west("horizontal-align"));
         }
         
         {
            RectangleNode node = new RectangleNode(cnode);
            node.setPreferredBounds(new RectangleF(24, 24));
            node.addAttribute(CompassAligmentAttribute.center("vertical-align"));
            node.addAttribute(CompassAligmentAttribute.east("horizontal-align"));
            node.addAttribute(SizeAttribute.createPercentage("height", 50));
         }
      }


The entire thing doesn't care about pixels/inches/centimeters or anything. It just says 'units', and thats it.
Its up to oneself how to use the values/rectangles the layout-library generates.

Have a nice day!

- Longor1996

Sorry for my bad English! That's because i am from Germany.
Online Slyth2727
« Reply #103 - Posted 2014-06-30 23:22:17 »

*snip*

Wow, that's really cool, I may just use this in the future! Could you post a download?

Well as for what I did today, I'm starting to learn more advanced concepts in C#. Since it's so similar to Java it's a nice and easy learn. It also supports a bunch of awesome things that Java doesn't (optional params, class extensions, and operator overloading are my favorites). I'm using it to program something with the Selenium library to test the website of the company I work for. Loving it!!
The only downside is the OS limitation.

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline ra4king

JGO Kernel


Medals: 353
Projects: 3
Exp: 5 years


I'm the King!


« Reply #104 - Posted 2014-07-01 00:12:59 »

I decided to have fun with shadows today using shadow mapping.



The code: https://www.github.com/ra4king/ShadowTest

Offline ra4king

JGO Kernel


Medals: 353
Projects: 3
Exp: 5 years


I'm the King!


« Reply #105 - Posted 2014-07-01 05:54:36 »

In addition to that, I have finally checked all 65+ pages of unread JGO threads I had:


Such a relief!

Offline SHC
« Reply #106 - Posted 2014-07-01 06:49:42 »

I'm thinking of learning PHP and jQuery UI. Just installed XAMPP on my windows 7.

Offline RobinB

JGO Ninja


Medals: 44
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #107 - Posted 2014-07-01 08:19:32 »

I decided to have fun with shadows today using shadow mapping.


The code: https://www.github.com/ra4king/ShadowTest

Thanks! finally a usable example Smiley
Offline PandaMoniumHUN

JGO Coder


Medals: 32
Exp: 3 years


White-bearded OGL wizard


« Reply #108 - Posted 2014-07-01 08:25:53 »

Just installed XAMPP on my windows 7.
If I would be you I would rather forget about XAMPP. Instead I would recommend you to install an Ubuntu Server in Virtualbox, with Apache (or nginx) + MySQL and Samba file sharing or FTP server. You would learn more at least about the server itself and you could have a taste of commercial environments. I know it might sound cumbersome at first but it will worth the time investment imo and it's a pretty straightforward process. Smiley

My Blog | Jumpbutton Studio - INOP Programmer
Can't stress enough: Don't start game development until you haven't got the basics of programming down! Pointing
Offline mojo
« Reply #109 - Posted 2014-07-01 12:49:53 »

Finished implementing first iteration of shadowmaps. New simple dialog ui skin.

Offline Roquen
« Reply #110 - Posted 2014-07-01 13:17:09 »

I finally read this: http://casual-effects.blogspot.fr/2014/03/weighted-blended-order-independent.html and the real paper.

(One of the vids directly from blog post..just to catch your eye)
<a href="http://www.youtube.com/v/41dD2OsUagI?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/41dD2OsUagI?version=3&amp;hl=en_US&amp;start=</a>
Offline Longor1996
« Reply #111 - Posted 2014-07-01 14:12:03 »

*snip*

Wow, that's really cool, I may just use this in the future! Could you post a download?

-snip-

Yes, I can provide a download for it.
Or even better: How about a github repository?

The code is still a bit messy and not completely commented, since I wrote the entire thing in about 5 hours, but it works and is usable. I included a basic usage example in the ReadMe, even though I tried to make the usage as easy as possible. You can also just go and look at the Test-code.

Here is the link:
DatPaperLayout @ Longor1996 @ Github

And yes, the library is called 'DatPaperLayout', because I can't think of any better name.

This is also the first time I am using Unit-Test's instead of 'main(String[] args)' to test the library functions. Mind that I don't really understand how they work (yet), so you may have to rip your hair out over the way I use them. (On that note: Can anybody recommend me a Tutorial for JUnit-4?)



Anyway, Have a nice day!

- Longor1996

Sorry for my bad English! That's because i am from Germany.
Offline theagentd
« Reply #112 - Posted 2014-07-01 23:46:09 »

I was going to use that for rendering transparent effects in my game. The technique described there works well theoretically, but in practice it's horrible. For example, if you have a very barely visible red fog particle in the foreground and a huge gray cloud far behind it, the red fog will (due to its high weight) make the particles behind it look red as well, effectively bleeding its color to objects behind it. The weighting is also very prone to aliasing and banding due to the limited precision of a 16-bit float render target. It also does not support particles with 0 alpha (= additive blending) as alpha is used as a weight, effectively causing a divide by 0 during the resolve. This can be solved by using a value slightly above 0, but if it's too small then we run into float precision issues again. Some of these problems can be alleviated or completely fixed by modifying the depth weight function, but this requires a tailor made function for each scene and does not work with arbitrary geometry.

I ended up using this technique in combination with my own extension: layers. I split up the view volume into 10 layers. When rendering my transparent geometry I use a geometry shader to output each triangle/particle to the two layers that are closest to the depth of the geometry being rendered, with weights depending on how close to the depth of each layer it is. That way I can use a simple exponential depth weight function since the depth range for each layer is so limited. The main problem of this approach is obviously memory usage, as 10 layers of textures using 10 bytes per pixel (8 + 2) uses almost 200MBs of memory for a 1920x1080p window. In addition, each particle needs to be rasterized twice to two layers. To alleviate both these problems, I render all transparent geometry at half resolution, so both fill rate and memory usage is cut to 1/4th. I then use bilateral upsampling to eliminate aliasing from when upsampling to full resolution after the resolve.

Myomyomyo.
Online Slyth2727
« Reply #113 - Posted 2014-07-02 00:10:51 »

Yes, I can provide a download for it.
Or even better: How about a github repository?

The code is still a bit messy and not completely commented, since I wrote the entire thing in about 5 hours, but it works and is usable. I included a basic usage example in the ReadMe, even though I tried to make the usage as easy as possible. You can also just go and look at the Test-code.

Here is the link:
DatPaperLayout @ Longor1996 @ Github

Awesome, thanks so much. Funny enough, I'm actually just starting to learn JUnit as well, for my aforementioned project. Fun stuff.

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline Roquen
« Reply #114 - Posted 2014-07-02 06:11:45 »

I was going to use that for rendering transparent effects in my game. The technique described there works well theoretically, but in practice it's horrible.
Yeah, but all the simple solutions are horrible in different ways.  Let's note that this is intended to be cheap enough to work lower end of current hardware including some mobile.  It good to hear about problems, but I wouldn't blow it off.

So have to read the intel "Multi-Layer" paper?
Offline Roquen
« Reply #115 - Posted 2014-07-02 08:13:37 »

glMultiDrawElementsIndirect is the pinnacle of OpenGL
Some related stuff: http://on-demand.gputechconf.com/gtc/2014/presentations/S4379-opengl-44-scene-rendering-techniques.pdf
Online princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #116 - Posted 2014-07-02 08:18:27 »

Hmm I wonder if it could be optimised to handle 2D sprites. In an ideal world I'd only sort by GL rendering state and get nice phat VBOs to render, but because of the pesky painter's algorithm I have to sort everything by Y. Fine you say, use the depth buffer, problem solved... except of course that breaks with 2D sprites because of the transparent parts, and alpha testing creates horrible artifacts at the edges.

Cas Smiley

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 823
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #117 - Posted 2014-07-02 08:53:00 »

The biggest cause of glDraw-call-count in your sprite engine seemed to be changing textures, due to the inability to create 1 large sprite-atlas on Intel hardware, leading to visually 'interleaved' sprites potentially ending up in different atlas textures. IIRC: we had 300K sprites at 60fps with sprites in 1 atlas, and 3fps with said sprites in 2 atlases. (Ignore the rest of the post if this dated observation is... out-dated)

Still, all (smallish) sprite atlas textures are resident, so you can bind them all to different texture units - AFAIK OpenGL 3 spec states at least 16 texture units will be available. Now add a new vertex attribute (an unsigned byte), which tells the shader which texture to sample from. This has quite some overhead (dependent texture fetches), but it's a superb trade-off, due to the larger batch-size you get in return, as you were clearly not fillrate limited.

Ofcourse, you should switch to GL_TEXTURE_ARRAY_2D and/or sparse texture arrays combined with bindless, but (old?) Intel drivers are probably struggling with that too, if there is support at all.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Online princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #118 - Posted 2014-07-02 09:11:53 »

As it happens, I've switched to GL3+ now, and using GL_TEXTURE_ARRAY_2D, and (currently) about 8 texture units. I've managed to get most of the entire scene drawn using a single draw call using a "mode switch" in a shader, but I still have to sort all the pesky dynamic sprites by Y every frame so I know which order to draw them in. Intel chipsets aren't actually fast enough to render everything at 60FPS anyway - and what's more with the latest drivers Battledroid crashes on startup every other launch, so I'm officially giving them a big two-fingered salute. The end result is tossing away about 15% of potential revenues for a considerably easier life developing and supporting the game.

Cas Smiley

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 823
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #119 - Posted 2014-07-02 09:21:10 »

Presumably you reverted from the multi-threaded grid-based sprite-sorter, potentially due to not being usable in specific (new) use cases. As it was capable of sorting 300K sprites in about 2-3ms I was under the impression that that was a solved problem in the sprite engine. What is the current approach?

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Pages: 1 2 3 [4] 5 6 ... 30
  ignore  |  Print  
 
 

 

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

The first screenshot will be displayed as a thumbnail.

DarkCart (14 views)
2014-10-31 21:44:48

DarkCart (18 views)
2014-10-31 21:43:57

TehJavaDev (40 views)
2014-10-27 03:28:38

TehJavaDev (30 views)
2014-10-27 03:27:51

DarkCart (44 views)
2014-10-26 19:37:11

Luminem (26 views)
2014-10-26 10:17:50

Luminem (30 views)
2014-10-26 10:14:04

theagentd (36 views)
2014-10-25 15:46:29

Longarmx (64 views)
2014-10-17 03:59:02

Norakomi (62 views)
2014-10-16 15:22:06
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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