Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (603)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (652)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 5
1  Game Development / Performance Tuning / Re: Performance Slowdown (LWJGL, OSX) on: 2015-05-16 11:16:18
I appreciate the tip, but might not get the chance to delve into this until next week.  Scheduling.  Bah.
2  Game Development / Performance Tuning / Re: Performance Slowdown (LWJGL, OSX) on: 2015-05-10 20:55:03
@Spasi, KaiHH-  I fear the tech-level here is a little above my head, but I appreciate the explanations. Smiley

@theagentd-  I suspect that's what's happening as well.  (I would have thought that even suboptimal use of the GPU wouldn't make a huge difference to my sim-logic, since I'm not calling glFinish() anywhere and it should be working away asynchronously.)

I might try integrating those GPU-queries anyway: my simulation doesn't happen on a different thread, but it does happen *later* in the render cycle from the graphics calls- the two shouldn't be waiting on eachother much on a call-to-call basis.

I did some profiling earlier on TerrainSet.refreshAllMeshes(), and AFAICT that's all concentrated in initial map setup- the meshes stay almost entirely stable afterward.

What I did notice was that, every few seconds, one particular creature/person would take a crazy long time (like 400 ms) to update within a given frame.  Thing is, if I cut out the section of code responsible, the delay would jump somewhere else- to a particular type of building, or the base(colony)-update call- a bit like whack-a-mole.  (I was wondering if these might be garbage collection, since I'm not using Pools anywhere, but I've never seen GC cause stuttering like this before.)


EDIT:  Oh, I also asked my tester-buddy to run the game on a large map on his home machine.  He didn't see any slowdown, but that was on a 3.9 GHz PC with an AMD R7 260X.  Much more brute force.  Might ask him to profile it later.
3  Game Development / Performance Tuning / Re: Performance Slowdown (LWJGL, OSX) on: 2015-05-10 15:18:43
I got VisualVM installed on WinXP and a second macbook running OSX Yosemite.

The results on Yosemite didn't show time wasted on nSwapBuffers, but I was still seeing noticeable jittering, especially when creatures/citizens were more active (e.g, during daytime hours.)  And a huge chunk of CPU is still being spent on nUpdate.





The results from WinXP (same old macbook, running on Boot Camp) show a somewhat different picture.  Total CPU consumption by LWJGL is only 48% (versus 82% on OSX.)  The pattern was similar though- slowdowns/jittering, especially during game-daytime.




I think it's reasonable to conclude that driver differences are accounting for part of the slowdown on OSX, but my simulation code must be causing some additional spikes in usage, even if the average CPU burden on that side is low.

Still, I'd like to be able to address those driver problems if possible.  I'll try to integrate those GPU-timer-queries next and see what happens.
4  Game Development / Performance Tuning / Re: Performance Slowdown (LWJGL, OSX) on: 2015-05-10 12:54:14
Alright.  I tried running on WinXP using Boot Camp to see if this was specific to mac drivers.  There was still some pretty noticeable 'jittering', but I don't *think* it was quite as bad as on OSX.  Could be my imagination, though.

GPU-Z seemed to indicate that the graphics card was running at 30-50% capacity most of the time, with occasional spikes to 60-70%.  So... room for improvement there, but probably not the bottleneck?  I'll have to install the JDK on boot camp before I can run Visual VM, though.

I might get one of my testers to run the game on a larger map, just to see if it's specific to my hardware setup.
5  Game Development / Performance Tuning / Re: Performance Slowdown (LWJGL, OSX) on: 2015-05-10 10:29:34
I appreciate the tips, but I'm using an older Macbook running OSX 10.6.8 and a NVIDIA GeForce 320M.  I don't think there *is* a NVIDIA control panel by default on the Mac (and alternative drivers seem to need a more recent OS version.  GPU-Z also seems to be windows-only.)  I will try looking into GPU timer queries, though.

I kinda need to upgrade my machine.
6  Game Development / Performance Tuning / Re: Performance Slowdown (LibGDX, OSX) on: 2015-05-09 21:43:27
Sorry, my mistake- I just realised those are LWJGL methods being called, so nothing in particular to do with LibGDX.  Still, any pointers on what might be causing the slowdown would be very helpful.
7  Game Development / Performance Tuning / Performance Slowdown (LWJGL, OSX) on: 2015-05-09 20:28:54
Hi there- Quite a while back I was posting about an SF citybuilder project of mine.  It's not quite dead yet, but I've run into a significant performance bottleneck on larger maps and I couldn't seem to track down a consistent culprit for the slowdown.

Anyway, I ran the program under a couple of conditions using VisualVM and came up with the following fairly consistently:


Which seems to be pointing the finger at stuff LibGDX is doing internally.  Now I know this is only happening on larger maps, so it's probable that I'm inefficiently allocating some kind of repetitive task to the engine where the cost is only evident later in the update loop.  But I don't quite know enough about the engine to pinpoint how I might be misusing it.  Do those methods look familiar to anyone?

(There are public releases of the game available at the second link, so if anyone wants to take a gander, feel free.)
8  Game Development / Newbie & Debugging Questions / [LibGDX]- Incorrect checksum for freed object (Solution) on: 2015-02-21 12:34:13
Just thought I should follow-up on an earlier thread here:

http://www.java-gaming.org/index.php?topic=32877.0

I've run into similar errors and found they were related to modifying a Mesh or Texture after dispose() had been called on them.  The crash was pretty-consistently traceable to the following:

1  
2  
3  
4  
5  
6  
7  
8  
0   libSystem.B.dylib                0x00007fff85b8c0b6 __kill + 10
1   libSystem.B.dylib                0x00007fff85c2c9f6 abort + 83
2   libSystem.B.dylib                0x00007fff85c1b62d szone_error + 519
3   libSystem.B.dylib                0x00007fff85b42a46 tiny_malloc_from_free_list + 715
4   libSystem.B.dylib                0x00007fff85b41abd szone_malloc_should_clear + 242
5   libSystem.B.dylib                0x00007fff85b4198a malloc_zone_malloc + 82
6   libSystem.B.dylib                0x00007fff85b3fc88 malloc + 44
7   GLEngine                         0x000000011e2eccb8 glShaderSourceARB_Exec + 328


Anyway, hope this helps someone.
9  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2014-02-06 13:57:54
Huh.  Didn't realise I could modify the OP now.  Will do.

When I read that, I was initially thinking you have created a mind control facility for your game Cheesy
Mind control is actually one of the types of psyon ability the player-character can learn, and the palace level enhances range/cooldown on those, so... technically, it's pretty close.

Anyway, thanks for all the support, and I'll let you know once I have some major new feature to show off.
10  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2014-01-27 19:40:29


Recent brainwave- for a long time I was agonising over the proper roles of various buildings, like the town vault, stock exchange, bastion, etc.- since a lot of the time, their functions seemed overlapping or mildly redundant, but I didn't want to just throw away all the effort invested in the art.  So I decided that I could re-use the art as different stages in a single-structure's 'upgrade sequence'.

It'll need some polish, but I'm pretty happy with how the town vault/bastion/palace sequence worked out.  In the meantime, there's been some more progress with the LibGDX conversion.  More at 11.
11  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2014-01-21 16:55:07
Thank you!  Out of curiosity, any thoughts on the gameplay clips above?
12  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2014-01-21 12:59:21
Good news everyoneI've taught the toaster to feel love!  Also, Kerai and I have made further progress on porting the game's graphics routines over to LibGDX & shaders, which means that we should be able to release demos for windows/linux, and possibly iOS/android, in the relatively near future.

At least one of the above statements is a lie.
13  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2014-01-09 19:55:46
At any rate, closer to home, new videos covering ecology simulation and basic combat routines-

http://www.youtube.com/watch?v=UlvrmjijPsM

http://www.youtube.com/watch?v=qGA_XUezSPw

EDIT:  Also, housing evolution-

http://www.youtube.com/watch?v=jrt8innlkuM
14  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-12-13 14:55:08
Haven't posted in a while, but just to keep folks in the loop:  New functionality/art is being delayed by sorting out bugs and gaps in *old* functionality/art.  Which is good, but not terribly exciting per se.  But I can likely post some new videos covering combat and housing evolution at least.

On a more promising note, I might have some good/big news to announce on the collaboration front some time in the new year.  We will see.


Expanding on some ideas from earlier in the thread, I think I may have worked out some more specific (though still hypothetical) solutions to the problems of 'scaling'.  The big step here would be to limit the game to a single planet (and possibly save others for expansions,) using a settlement paradigm similar to Deadlock or Sid Meier's Colonization.  The game therefore operates on 2-and-a-half distinct scales:  the settlement scale, and the planetary+homeworld scale.

Basically, each planetary faction (or House) has a backing or patron Homeworld which provides initial supplies and colonists, but gradually shifts from blessing to burden as your estates expand and more tribute has to be shipped back home.  Aside from being an interesting progressive-taxation mechanic, this allows a degree of integration with the larger setting, without having to model it too dynamically (the Homeworlds are too distant and populous for you to heavily impact their politics & culture during the course of the game.)

On the planetary level, however, the various sub-continental territories can all be claimed, invaded or colonised by the competing factions, who can themselves be allied or negotiated (or married?) with, all using the traditionally dynamic 4X or grand-strategy paradigm (albeit greatly simplified- we're not looking at more than 20 territories here.)  But the populations and extent of these territories are comparable, so it's reasonable to have them impact eachother.

That just leaves integration between your particular settlement and the management of a territory, which is tied to the shift between early and late-stage gameplay.  The 'early game' (at least within a particular assignment) consists of exploring the map, ferreting out resistance, and either conquering or assimilating it, while your initial base gradually expands into a mature settlement.  (The surrounding territory, of which this is merely the 'capital sector' is assumed to follow your rough example.)  This then gives you enough military, demographic or cultural clout that you can start throwing your weight around in adjacent territories, and begin gradually annexing them into your estates.

The way that this expansion is modelled on the settlement level is that your vassals and allies among the ruling classes will establish 'holiday homes' of a sort within your capital, so that as more tribute rolls in, the problems of securing and processing natural resources on the same map are largely displaced by the 'later-game' headaches of keeping visiting nobles pampered and obliging.  Which goes a fair ways toward ensuring they don't rebel, and helps provide an 'organic' method for interfacing with political intrigue, given that a large chunk of your citizens will be representatives of the ruling elite.

However, this still leaves the problem of (A) inheriting/conquering foreign settlements, and (B) coming back to your own settlement after long absences, both of which would require some method of doing relatively quick simulations of hundreds of in-game days of development and AI-ordered construction in ways which still create a functional economy.  And... I don't really want to think about that yet.

15  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-11-23 18:37:58
Not much more progress to report at the moment (busy trying to fix up lairs, ruins and native villages, combat/contact missions, etc.)  In the meantime, here's a small demo video I might as well share:

https://www.youtube.com/watch?v=k1WnR5yl1Vc
16  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-11-16 18:58:19
Thank you!  We artists... well we love praise, yet we love truth better.

I don't have any immediate plans for a multiplayer option, but if it ever gets to the stage where I have proper voicelines and music done- and I hope it will- then I'll probably try adding multiplayer as well (at least over LAN or using a shared server a-la minecraft.)  I recall this was one of Kerai's wishlist options as well, so if folks have other requests, let me know.
17  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-11-15 23:50:10
Updated the app with a couple of new psi-power features (such as save-and-quit,) and fixed a number of teething problems.
18  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-11-11 23:50:51
Sorry about the hiatus, but here we are- a working, standalone demo app for OSX.  (I had to sort out some subtle bugs related to JVM versioning and decoding class files within jars.  Bah.)

https://github.com/Morgan-Allen/Presidium_Demo_Mac

There's a few extra features I need to either add or smooth out, but for now, this should be enough to play around with.  As always, feedback is welcome.


Oh, just so you know I haven't been idle- here's a very rough tone-sketch/preview of some supplementary art I've been working on- game-setup-screen portraits for (left to right) Houses Taygeta, Procyon, Suhail and Altair:

19  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-10-30 16:51:31
The problem is that, although the java code itself should naturally be cross-platform, I'm apparently not making very efficient use of certain OpenGL features, and in ways that become very visible under windows drivers.  This is a problem that I certainly intend to address, but it will take time, so I won't be releasing on windows immediately.  (According to Kerai, it runs okay on Linux though, so that might be a nearer-term option.)

Thanks for the feedback anyways.
20  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-10-30 16:11:31
Well, I have good news and bad news.  The good news is, the game should be just about ready to run as a standalone application- all the main structures are implemented (barring some inevitable tweaks and polishing,) the UI has been streamlined and psy powers implemented, and there's a main menu with setup and loading options, et cetera.  Bad news is, I need to get my machine serviced before I can reinstall the developer tools needs to bundle the app on OSX (which is the only platform I'd feel comfortable about releasing on for the moment.)

So, stay tuned...
21  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-10-17 14:01:54
I just stumbled upon this over on hacker news.  If I'm eventually gonna port to LibGDX/shaders for the graphics side of things, I might consider porting the logic to one of those new-fangled concurrent-execution frameworks.  (Not today, mind.)

Sickbay functions seem to be working well, adding some polish/tweaks to the audit office, mining and archives.  (I keep forgetting stuff I need to do.  Ah, well.)  Also added basic version of the holo-arcade and edifice, but I'll probably need to polish up arcologies some more.
22  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-10-07 22:25:00
...That was humour, people.

I think I just need to finish up some work on the surveillance post, sickbay and aesthete structures, and then I'll be more-or-less ready to put up something executable.
23  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-10-05 12:12:51
@ Kagesh:  I appreciate the offer, though I should mention I'm going through some fixes to housing requirements that might cause massive housing de-evolution in the current saved-games.  (So, don't be surprised if that happens.)  But sure, testing is good!

@ opiop65:  Thanks for the link.  I would mention that site has a very attractive format in every respect aside from the centre-justified code segments.  ....Ow.
24  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-10-03 21:12:06
I think I have that solution working now.   ...But sure, I guess a few pointers on shading technique wouldn't hurt.
25  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-10-03 17:22:17
Oh, I fully intend to move to a shading-based engine in future, I just haven't gotten around to learning GLSL yet.  (Originally, I wanted the game to be able to run on older hardware, but at this stage anything shader-incompatible is probably on a scrapheap.)
26  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-10-03 14:26:21
I appreciate the reference, though it seems to be going out of it's way to say 'don't ever use this, use shaders instead'.

I have thought of a different approach that might work.  I could basically store the old and new fog values as 2 layers of a 3-dimensional texture, and change the UV mapping of the fog-layer-geometry so as to interpolate between them over time.  I could either cache the intermediate results (about 1 meg per frame) or generate them as needed (maybe 1% of CPU) or simply apply the fog as one giant quad (which assumes perfectly flat terrain.)  I think the lattermost approach might be an acceptable hack for the moment (I have the capacity for proper 3d-terrain, but I'm not making any real use of it at the moment.)
27  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-10-02 18:18:53
I've tried various blending options, but either they don't do what I need or I don't understand them properly.  (e.g, GL_MODULATE seems to multiply the two textures together, GL_ADD is too bright, and others give special treatment to the alpha channel, which I don't need.)

I could just do it on the CPU, but it's something I'd rather not every 25th of a second.
28  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-10-02 10:40:01
Thanks for trying it out.  If you don't mind my asking, were you running it under windows/mac/linux?  I've had some noticeable slowdowns on other OS/hardware, so external reference points are good. Smiley

I've expanded considerably on the content associated with most of the structures in the game over the last month or so, and the economy mechanics are essentially sorted at this point.  There's a good deal of extra content to introduce or debug, but it's quantitative rather than qualitative- I know with some precision what needs to be done, and just have to follow well-defined steps to do it.  (Rather than being, e.g, paralysed with indecision over the proper tile resolution for terrain-mesh sections.)

This should be a representative sample of the current game-state:



There is one technical point I could use some advice on, though:  I've been updating the fog-of-war display so as to try and blend/fade visually between old and new fog values every second or so.  I'd prefer to do this purely using the GPU and without shaders (since I don't want to dive into those just yet.)  Is there any simple way for 'classic' GL to get and apply the weighted average of two textures, including their alpha... or have I missed something obvious?
29  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-09-28 19:11:34
You can try out DebugBehaviour or DebugPathing instead (TBH, the functions are pretty loose at this stage.)  Cripes, I haven't posted in a while.  I'll letcha know what's happening soon.
30  Games Center / WIP games, tools & toy projects / Re: SF Citybuilder- Buildings/Concept Art on: 2013-09-07 14:08:06
Planning to introduce some new critters at the moment-



From bottom-left to top-right, you can see the ee-evil looking defence drone, recon drone, demolition drone, tripod, cranial and tesseract.   At least a couple should be functional for the demo.  Working on ruins placement atm.
Pages: [1] 2 3 ... 5
 
SHC (21 views)
2015-08-01 03:58:20

Jesse (19 views)
2015-07-29 04:35:27

Riven (39 views)
2015-07-27 16:38:00

Riven (21 views)
2015-07-27 15:35:20

Riven (24 views)
2015-07-27 12:26:13

Riven (14 views)
2015-07-27 12:23:39

BurntPizza (35 views)
2015-07-25 00:14:37

BurntPizza (46 views)
2015-07-24 22:06:39

BurntPizza (28 views)
2015-07-24 06:06:53

NoxInc (36 views)
2015-07-22 22:16:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21
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!