Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 3 4 [5] 6 7 ... 27
  ignore  |  Print  
  What I did today  (Read 66443 times)
0 Members and 1 Guest are viewing this topic.
Offline princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #120 - Posted 2014-07-02 09:31:41 »

I backed out of the grid-based sprite sorter in the end to try and keep my brain from imploding trying to understand it and keep two separate sprite engines maintained and created instead a single multi-threaded sprite engine with freezable sprites and freezable layers.

The sprites are ticked and updated and transformed using all cores, before being gathered at the end, and then again using all cores to write the sprite data out to VBOs. Frozen sprites don't need transforming - I cache their VBO data and simply copy it verbatim. Frozen layers imply all sprites are frozen and that enables me to also avoid having to sort those layers unless sprites are added or removed. So a bunch of little optimisations on that front to save some CPU time, and a whole load of multithreading, but it all works in almost the same way as the original sprite engine did.

The sorting is still pretty fast - I had a multithreaded mergesort at one point but the overhead of the merging meant it was rarely useful. Gnomesort tends to crap out a bit too often as well - at least in the battle scenes I was rendering - I think that the speed at which sprites where whizzing around was causing too many swaps all the time. In the end the JDK sort function seems to be doing absolutely fine.

Right now it's rendering ermm.. can't remember - maybe about 100k sprites per frame but of course 3/4 of those are actually frozen and very cheap to process. I ended up with bottlenecks in the particle system in the end (which itself, is now multithreaded, too). The end result is I can watch battles with about 6,000 robots, zoomed right out to see approx 100x100 of the map area, at 60fps on the 5 year old i7/gtx280 rig, which is good enough for me.

Cas Smiley

Offline princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #121 - Posted 2014-07-02 09:35:11 »

I had a neat trick with the particle system btw... I've rendered some emitters out into sprites - that is, complete particle effects - and created single sprite animations for them. Emitters now have a Z-range at which they operate; so when zoomed out, it switches to using these "canned" emitters for explosions, smoke and ricochets, and when zoomed in, it uses normal emitters. That way I can render what looks like about 200,000 particles when zoomed out to look at the whole battle (you can't really tell they're "canned" because I've got about 3-4 sequences of each one rendered and it chooses them randomly).

Cas Smiley

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #122 - Posted 2014-07-02 09:48:17 »

Good to know you switched to caching (at 2 different abstraction levels) as a way to increase performance. Back in the day that wasn't quite an option, as the sprite engine had to manage anything that was thrown in its general direction.

Merge-sort indeed scales pretty badly, as when merging multiple sorted datasets, you completely trash the cache, repeatedly, until you merged the last two sets. This overhead quickly outweighs the benefit of having your initial dataset split up and sorted by multiple threads.

I gather that the persistent sprite engine, featuring 'unlimited' decals, currently also resides in the eternal bit fields?

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #123 - Posted 2014-07-02 09:58:53 »

It remains in limbo - I like what it was doing but I wanted it to do a whole load of new stuff to look really good and I don't quite have the ken to work it out just yet (well there are more important things to get on with). Essentially I was going to want permanent bump-map decals and such as well as just diffuse texturing so along with scorches we actually had lumps carved into the ground and footprints / trackmarks etc. Maybe when I've got more time and some money coming in I can revisit it.

Cas Smiley

Offline theagentd
« Reply #124 - Posted 2014-07-02 14:32:25 »

I wrote a custom screenshot saver which uses asynchronous transfers to read back and then write a screenshot to file in a separate thread without significant amount of stuttering. I did this because Print Screen produced a blurry screenshot (what) and Fraps' screenshot function crashed the Java VM when I was running Nvidia Surround at 7680x1440.

https://drive.google.com/file/d/0B0dJlB1tP0QZaEtvR2FkVHhVa2M/edit?usp=sharing
Warning: Full res screenshot is around 15 MBs.

Myomyomyo.
Offline matheus23

JGO Kernel


Medals: 109
Projects: 3


You think about my Avatar right now!


« Reply #125 - Posted 2014-07-02 17:20:43 »

Dedicated this and the last day to learning for a (relative to my level and age) hard maths exam tomorrow.

A week and a half and I'm finally free from any school-related work until in about 3 months.

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline Spacebeans
« Reply #126 - Posted 2014-07-02 18:13:38 »

I wrote a custom screenshot saver which uses asynchronous transfers to read back and then write a screenshot to file in a separate thread without significant amount of stuttering. I did this because Print Screen produced a blurry screenshot (what) and Fraps' screenshot function crashed the Java VM when I was running Nvidia Surround at 7680x1440.

https://drive.google.com/file/d/0B0dJlB1tP0QZaEtvR2FkVHhVa2M/edit?usp=sharing
Warning: Full res screenshot is around 15 MBs.

Wow, that looks really cool. Is there any chance I could get the source for that screen shot saver? Great job also!
Offline pitbuller
« Reply #127 - Posted 2014-07-02 18:14:02 »

Finally remembered to weight my SSAO samples. Just simple aproximation that most of the ambient light in outdoors come from sky so samples that point upwards get bigger weight. This look much better than it sounds. I only weight ambient occlusion with this but I leave indirect bounce light untouched.


This is done per sample.
1  
float aoWeight = saturate(dot(sampleDir, u_viewUp)) * UP_WEIGHT + 1.0;

Comparision:
https://www.dropbox.com/s/hg51ydwyxodfaq4/skyBiasON.png
https://www.dropbox.com/s/yae6v06czkxh11j/skyBiasOFF.png
Offline 04hockey

Junior Duke


Medals: 2
Projects: 1
Exp: 2 years


Founder of Fanger Games.


« Reply #128 - Posted 2014-07-02 19:37:47 »


Started working on this.

Ignore the crappy character sprite, but the world is an infinite, procedurally generated world, with chunk loading so FPS doesn't drop no matter how big your world is. Also maxing out at 1 millisecond per generating a new chunk (4098x4098). Grass is randomly generated, going to make it so you can enter the buildings too Smiley. Grass has a cool wavy animation too.
Offline theagentd
« Reply #129 - Posted 2014-07-02 20:20:41 »

I wrote a custom screenshot saver which uses asynchronous transfers to read back and then write a screenshot to file in a separate thread without significant amount of stuttering. I did this because Print Screen produced a blurry screenshot (what) and Fraps' screenshot function crashed the Java VM when I was running Nvidia Surround at 7680x1440.

https://drive.google.com/file/d/0B0dJlB1tP0QZaEtvR2FkVHhVa2M/edit?usp=sharing
Warning: Full res screenshot is around 15 MBs.

Wow, that looks really cool. Is there any chance I could get the source for that screen shot saver? Great job also!

ScreenshotCapturer: http://www.java-gaming.org/?action=pastebin&id=1004
GLThread: http://www.java-gaming.org/?action=pastebin&id=1005

To use it, call
ScreenshotCapturer.capture(new File("screenshot.png"));
right before calling Display.update().

Myomyomyo.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ra4king

JGO Kernel


Medals: 350
Projects: 3
Exp: 5 years


I'm the King!


« Reply #130 - Posted 2014-07-02 23:47:54 »

I wrote a custom screenshot saver which uses asynchronous transfers to read back and then write a screenshot to file in a separate thread without significant amount of stuttering. I did this because Print Screen produced a blurry screenshot (what) and Fraps' screenshot function crashed the Java VM when I was running Nvidia Surround at 7680x1440.

https://drive.google.com/file/d/0B0dJlB1tP0QZaEtvR2FkVHhVa2M/edit?usp=sharing
Warning: Full res screenshot is around 15 MBs.

Wow, that looks really cool. Is there any chance I could get the source for that screen shot saver? Great job also!

ScreenshotCapturer: http://www.java-gaming.org/?action=pastebin&id=1004
GLThread: http://www.java-gaming.org/?action=pastebin&id=1005

To use it, call
ScreenshotCapturer.capture(new File("screenshot.png"));
right before calling Display.update().
You use a new thread to capture the data through a SharedDrawable, what if the original thread calls GL code while the context is still in that other thread?

Offline theagentd
« Reply #131 - Posted 2014-07-03 00:38:55 »

You use a new thread to capture the data through a SharedDrawable, what if the original thread calls GL code while the context is still in that other thread?
That doesn't matter. Both threads have their own context, but they share certain object; buffers and textures for example. I do not want to call glMapBuffer() in the main thread since that would essentially stall the thread until the asynchronous copy has completed and the data is available, so I call that function on the other thread. Since the asynchronous transfer has already been fired off in the main thread, we're guaranteed to receive the correct data in the PBO, and since the PBO is not modified from multiple threads there's no risk of any problems there either.

Myomyomyo.
Offline ra4king

JGO Kernel


Medals: 350
Projects: 3
Exp: 5 years


I'm the King!


« Reply #132 - Posted 2014-07-03 07:29:48 »

Ah so through the use of a SharedDrawable, two threads can call GL codes at the same time, of course making sure no problems arise from usage of the same resources?

Offline pitbuller
« Reply #133 - Posted 2014-07-03 18:25:08 »

Implemented initial and hacky texture streaming. At start first 4 mip levels are skipped and texture loading is almost instant(instead of seconds). When game is started I just load one texture per frame and this use about 10ms extra and all textures are loaded after ~300 frames. Next task would move this to worker thread. I also need to implement some kind of importance ranking and texture memory budget limiter so it will scale to thousands high res textures.
Offline theagentd
« Reply #134 - Posted 2014-07-03 18:47:14 »

Implemented initial and hacky texture streaming. At start first 4 mip levels are skipped and texture loading is almost instant(instead of seconds). When game is started I just load one texture per frame and this use about 10ms extra and all textures are loaded after ~300 frames. Next task would move this to worker thread. I also need to implement some kind of importance ranking and texture memory budget limiter so it will scale to thousands high res textures.
Ah so through the use of a SharedDrawable, two threads can call GL codes at the same time, of course making sure no problems arise from usage of the same resources?
Relevant to both of you: http://www.java-gaming.org/topics/tutorial-stutter-free-texture-streaming-with-lwjgl/32571/view.html

Myomyomyo.
Offline pitbuller
« Reply #135 - Posted 2014-07-03 19:35:09 »

Implemented initial and hacky texture streaming. At start first 4 mip levels are skipped and texture loading is almost instant(instead of seconds). When game is started I just load one texture per frame and this use about 10ms extra and all textures are loaded after ~300 frames. Next task would move this to worker thread. I also need to implement some kind of importance ranking and texture memory budget limiter so it will scale to thousands high res textures.
Ah so through the use of a SharedDrawable, two threads can call GL codes at the same time, of course making sure no problems arise from usage of the same resources?
Relevant to both of you: http://www.java-gaming.org/topics/tutorial-stutter-free-texture-streaming-with-lwjgl/32571/view.html

Have you tested any loading heuristic based on usage, distance or texture importance? How about when you want to hard limit amount of texture memory usage.
Offline AppleSauce
« Reply #136 - Posted 2014-07-03 20:42:26 »

Learned how to render Images in libGDX.

Offline princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #137 - Posted 2014-07-03 21:30:04 »

Started complete rewrite of awful SPGL UI library. Just got sick of hacks and difficult XML. Time for a more modern system.

Cas Smiley

Offline theagentd
« Reply #138 - Posted 2014-07-03 22:48:50 »

Implemented initial and hacky texture streaming. At start first 4 mip levels are skipped and texture loading is almost instant(instead of seconds). When game is started I just load one texture per frame and this use about 10ms extra and all textures are loaded after ~300 frames. Next task would move this to worker thread. I also need to implement some kind of importance ranking and texture memory budget limiter so it will scale to thousands high res textures.
Ah so through the use of a SharedDrawable, two threads can call GL codes at the same time, of course making sure no problems arise from usage of the same resources?
Relevant to both of you: http://www.java-gaming.org/topics/tutorial-stutter-free-texture-streaming-with-lwjgl/32571/view.html

Have you tested any loading heuristic based on usage, distance or texture importance? How about when you want to hard limit amount of texture memory usage.

Not really. I only base it on the time until it was last used. I leave the VRAM usage constraint to the user in the form of a texture quality setting. It's not all over if you run out of VRAM, usually the driver just swaps out resources that haven't been used for a while to RAM.

Myomyomyo.
Offline tom_mai78101
« Reply #139 - Posted 2014-07-04 11:03:26 »

Today I have set an appointment to see a dentist in order to take out an irritating wisdom tooth affecting my right jaw hinge area.

Currently, the swelling around the jaw hinge is causing mucus buildup near my esophagus, my nasal passage, and the right ear canal (creating earwax buildup and slight deafness).

If for some reason, I'm no longer updating my Pokémon Walking project in 1 month (as in, no activities in 1 month in the "testing" branch on Github), it means I may be dead. I probably need a volunteer in the future to notify Github that I'm dead and the project should be marked as "no longer active" or something.

This news article is what's scaring me, Man dies of toothache.
http://abcnews.go.com/Health/insurance-24-year-dies-toothache/story?id=14438171

Most of me being scared of this, Complications after extraction of tooth, such as Bleeding to death.
http://doctorspiller.com/Extractions/Extractions_4.htm

I don't have a death wish list, but I just wanted to see my Pokémon Walking be completed when I die.
Offline JVallius
« Reply #140 - Posted 2014-07-04 12:22:47 »



Made Lilith and her axe from Legos Grin

Offline OpenGLShaders
« Reply #141 - Posted 2014-07-04 18:42:42 »

Finally made a screenshot function, so I could make a gif of this decapitation on my very slow computer Roll Eyes

Click to Play
Offline kevglass

JGO Kernel


Medals: 186
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #142 - Posted 2014-07-04 18:45:12 »

Today, I had an epiphany that I haven't worked on a Java game properly for 3 months! Time to get back to work.

Cheers,

Kev

Offline princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #143 - Posted 2014-07-04 19:08:46 »

Good grief Kev! Get to work!

Cas Smiley

Offline Rayvolution

JGO Kernel


Medals: 216
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #144 - Posted 2014-07-04 22:27:31 »

Today, I had an epiphany that I haven't worked on a Java game properly for 3 months! Time to get back to work.

Cheers,

Kev

Holy medals batman.  Shocked

also been a while since I posted in this (or was it the other one?) I guess I'll jump in.. was playing with scaling yesterday for fun. Mostly I just wanted to see what my game could look like at different scaling factors. Tongue

(Bonus cool tidbit, even with scaling disabled, rendering 32,400 tiles and all their lighting/shadows: 60FPS!)

First one: 3x/Original game scaling
Second: 2x
Third: no scaling.






- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Online DarkCart

JGO Knight


Medals: 18
Projects: 6
Exp: 1 year


Power of the mind over flesh


« Reply #145 - Posted 2014-07-04 23:06:03 »

Inspired by "Teaching Java Game Programming to Children" thread, I'm messing around with a simple game engine. What do you think?

Click to Play

Offline kevglass

JGO Kernel


Medals: 186
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #146 - Posted 2014-07-07 10:07:32 »

Yay, got a new release of Jumproom done! Started thinking about my next rogue like and got a few more tweaks on https://nitpika.com completed.

Seriously productive for me of recent Smiley

Cheers,

Kev

Offline princec

JGO Kernel


Medals: 404
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #147 - Posted 2014-07-07 10:32:39 »

Inspired by "Teaching Java Game Programming to Children" thread, I'm messing around with a simple game engine. What do you think?

Click to Play


A bit like the way it's done in lwjgl eh:
1  
2  
3  
4  
public static void main(String[] args) throws Exception {
    Display.create();
    // Insert game here
}


Cas Smiley

Offline Rayvolution

JGO Kernel


Medals: 216
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #148 - Posted 2014-07-07 11:20:55 »

1  
2  
3  
4  
public static void main(String[] args) throws Exception {
    Display.create();
    // Insert game here
}


Best. Game. Ever. Smiley

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Offline kevglass

JGO Kernel


Medals: 186
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #149 - Posted 2014-07-07 12:03:30 »

Did a few pixel art characters at lunch time:



Cheers,

Kev

Pages: 1 ... 3 4 [5] 6 7 ... 27
  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.

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

Norakomi (38 views)
2014-10-16 15:22:06

Norakomi (31 views)
2014-10-16 15:20:20

lcass (34 views)
2014-10-15 16:18:58

TehJavaDev (65 views)
2014-10-14 00:39:48

TehJavaDev (65 views)
2014-10-14 00:35:47

TehJavaDev (54 views)
2014-10-14 00:32:37

BurntPizza (72 views)
2014-10-11 23:24:42

BurntPizza (43 views)
2014-10-11 23:10:45

BurntPizza (84 views)
2014-10-11 22:30:10
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!