Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (736)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (814)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 16 17 [18] 19
  ignore  |  Print  
  [Slick2d] Retro-Pixel Castles > Now on Steam! <  (Read 402145 times)
0 Members and 1 Guest are viewing this topic.
Offline lcass
« Reply #510 - Posted 2015-02-20 10:44:41 »

Entirely new path finding system? I swear you built this entire game around your original path finding system?
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #511 - Posted 2015-02-20 19:46:21 »

I swear you built this entire game around your original path finding system?

Yup. Tongue

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #512 - Posted 2015-02-20 19:47:35 »

where on the fix-list is the "non-steam-release" ? Wink .. wouldn't mind playing even the wrong way.

If I ever have a non-steam release again, it won't be for a long, long time. Wink

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #513 - Posted 2015-03-09 00:41:03 »

InDev 13 is here! This new stable build introduces a ton of new content, tweaks, a better GUI, smaller (but much less resource intensive) maps and many other features.

Originally it was going to be even beefier, but I've decided to push some of InDev 13's planned features into InDev 14 so not to keep you guys from receiving a update for a while. Don't worry, there are no delays. The content you will be getting in 14 you would of gotten around the same time anyway, I just decided to break up InDev 13 into two updates so you can get some of the features a little early. Smiley

So, I hope you enjoy the new features!

IMPORTANT NOTE: This build WILL break all your previous custom maps. You must use the map converter found in the Retro-Pixel Castles install folder to continue using them!

You can report bugs over at the official website's Support and Bugs Forum, or on the Steam Discussion Board. Smiley

InDev 13 Change Log
- New 256x256 map size.
- Added a console based map converter, to convert your maps from the old 512x512 to the new 256x256 system. It can be found in the Retro-Pixel Castles install folder.
- Due to the decreased map size, frame rate, memory usage, and system requirements have dropped dramatically.
- Added new "Wheat Wind" track.
- Converted "The Quiet Forest" and "Hunted" into 8 smaller maps.
- Removed all of the Developer's Choice Maps, except the ones that were originally "Small" or "Medium" sized maps. (Others will be re-added once the authors convert them to their liking.)
- Added a bunch of new tile sets; Sandstone (In Red, Black and Tan), new Rock (in Black, Brown, Red and White).
- Added two new foods, Turnips and Potatoes. But they currently still think they're carrots.
- New map tiles property loader, that helps decrease load time.
- Fixed a bug where sometimes walls would not connect together correctly.
- Drawing in the map editor now no longer replaces the same tile if it already exists.
- Main Menu now loads random maps from the Official Maps pack.
- Added a "Recent News and Announcements" box on the main menu.
- "Stone" resources renamed to "Rock".
- New resources: Boards (Refined logs), Stone (Refined rock) and Crylithium (Refined Crystals).
- Harvesting buildings can now refine the resources brought in into the new refined resources listed above. For example, the Lumber Mill will manufacture boards, and the Crystillery will manufacture Crylithium.
- Completely rebalanced all the building requirements. Many advanced buildings require the new refined resources.
- Added the Small and Regular Crystillary, used for harvesting crystals.
- Added the Cullis Gate, a large Essence Collector like building that will build up and discharge large amounts of energy attempting to summon new villagers into the game ... or other things.
- Rebalanced many of the building costs, and magic based buildings like the Essence Collector and Fire Bolt tower now require crystals to be built.
- Added some new particle effects to the game to use with the new Cullis Gate.
- Added some blue fire flickers to the Essence Collector.
- Essence Collectors and Fire Bolt towers no longer generate essence.
- Essence Collectors and the new Cullis Gate are now fueled with Crylithium.
- Essence Collector's maximum energy reduced to 250.
- Re-added the "Category" frame icons to the Play and Map Editor GUIs.
- Added a pause button for buildings.
- Completely redrawn the bottom pop out GUI in the play mode.
- Completely recoded and redrawn the population tab. The new population tab now lists how many villagers are not employed, homeless, have a mate, or are pregnant along with some other miscellaneous information.
- Added a new buildings tab, based off the new populations tab. The new building tab lists how much total housing you have, how many total workers you have and many other useful tidbits.
- You can click on buildings or villagers in either of the two new tabs to center on them. (Note: Currently, in low resolutions sometimes the center may be under the GUI)
- Many miscellaneous GUI artwork improvements.
- New Mob: The Skeleton. They do not have much health, or hit hard. But they're extremely fast and can sometimes run past your towers.
- Lowered the monster spawn rate substantially.
- Fixed a bug in the map editor's info panel that would not detect if you're trying to use a map name already taken.
- Moved the resource bar in the play mode to above the top GUI.
- Removed the water sparkle trail from Essence.
- Added a new objects tab, when you select an object to build in play mode a small description of that object and the requirements to build it will be displayed.
- Fixed a bug that was causing lag when looking for resources on ground.
- Fixed a bug where villagers would pick up resources to use they shouldn't need, and set them back on the ground.
- Added the Kickstarter Backer's names to the villager name pool.
- Updated the Credits page, adding the additional Kickstarter Backers who submitted their surveys late.
- Added all the Kickstarter Backer's quotes to the game.
- Fixed the lag some users experienced in the credits page.
- Fixed a localization issue that would cause some user's copy of the game to crash attempting t find game resources (Thanks to: khadgar.rumnheim for finding the solution!)
- Tons of under the hood code cleanup.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Offline syszee
« Reply #514 - Posted 2015-03-09 01:26:39 »

So you like having it on steam? Smiley Is the experience good all together? I really hope to one day release to steam.

Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #515 - Posted 2015-03-09 01:29:24 »

So you like having it on steam? Smiley Is the experience good all together? I really hope to one day release to steam.

I enjoy it. Right now the sales are slow, because I'm in Early Access and in Pre-Alpha. But that's expected. Overall it's been a great experience and good exposure. The more the game gets developed the more daily sales I make, so that's a good sign for the future. Smiley

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Offline syszee
« Reply #516 - Posted 2015-03-09 01:48:18 »

That's good, and expected! Sales won't be good until you're out of early access. Imagine sales days too, like the winter sales and stuff!

Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #517 - Posted 2015-03-09 01:53:33 »

That's good, and expected! Sales won't be good until you're out of early access. Imagine sales days too, like the winter sales and stuff!

yeah, Early Access really only brings in good sales if you get REALLY popular (Like Kerbal Space Program or H1Z1 for example) I think most Early Access titles really don't see many sales. But really, Early Access isn't about the money, it's about the feedback. So I don't mind. Wink

That and I still actually get sales, so it's not like I'm NOT making any money. I'm no doubt making a lot more now than I ever have in gamedev.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Offline syszee
« Reply #518 - Posted 2015-03-09 02:12:50 »

Yea, the feedback is the best part of the early access program. You can fix all issues and add all suggestions. Smiley

I've been following your progress for quite sometime, since before the kick start and such. Congratulations on your recent success!

Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #519 - Posted 2015-03-09 02:15:27 »

Thanks Wink

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #520 - Posted 2015-04-07 16:04:44 »

Finally got my new revamped path finding system working, that uses terrain costs and no blocked tiles. Making things that used to be "blocked" like mountains passable, but only when no logical path is found.

It's going to be used in a new system that will allow monsters to start tearing down the map if they can't figure out how to get to your villagers. It was quite a challenge because in A* a lot of the speed comes from ignoring blocked nodes and thus limiting the amount of open nodes to check (The heuristics that slowly guide A* in the right direction being the other major part), but without actual blocked nodes it took some trickery to get the system fast enough to be usable since all the nodes that would of previously been considered blocked, were now open instead just with extremely high movement costs.

Also some thanks to ra4king (for help that shortly after my above post) pointing me to using Collections.binarySearch() to inject new open nodes instead of .sort(), speeding up the main while loop. Wink

gfycat:
http://gfycat.com/SilentYellowGlobefish


- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Offline Riven
Administrator

« JGO Overlord »


Medals: 1310
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #521 - Posted 2015-04-07 18:36:17 »

@Rayvolution: use a PriorityQueue for the open list. It is much faster than inserting values into a sorted array.

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

« JGO Spiffy Duke »


Medals: 945
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #522 - Posted 2015-04-07 19:15:24 »

@Rayvolution: use a PriorityQueue for the open list. It is much faster than inserting values into a sorted array.
Better still, a BinaryHeap. (Source in RotT originally courtesy of pjt33 - still coming in useful to this day!)

Cas Smiley

Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #523 - Posted 2015-04-07 19:41:37 »

@Rayvolution: use a PriorityQueue for the open list. It is much faster than inserting values into a sorted array.
Better still, a BinaryHeap. (Source in RotT originally courtesy of pjt33 - still coming in useful to this day!)

Cas Smiley

I'll give both a shot and see what happens. Smiley

Any little tiny microsecond of performance I can squeeze out of my pathing is critical, since I have monsters and villagers all over the map (hundreds at a time sometimes) wandering all over the place constantly, and due to game mechanic design/requirements I can't "put them to sleep" in inactive areas like most games would. Smiley

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Offline BurntPizza

« JGO Bitwise Duke »


Medals: 485
Exp: 7 years



« Reply #524 - Posted 2015-04-07 19:58:02 »

@Rayvolution I don't know if it would be applicable, but have you looked into faster pathing algorithms like JPS?

http://en.wikipedia.org/wiki/Jump_point_search
http://zerowidth.com/2013/05/05/jump-point-search-explained.html
http://gamedevelopment.tutsplus.com/tutorials/how-to-speed-up-a-pathfinding-with-the-jump-point-search-algorithm--gamedev-5818
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #525 - Posted 2015-04-07 20:24:38 »


yeah, I looked into JPS quite a lot a few weeks ago, the problem is my maps don't actually have any "Blocked" tiles, making JPS not quite work the way it's intended since it's designed to find blocked areas quickly and eliminate bad paths while shooting in the directions of good ones. (and thus, also removing a ton of open tiles by quickly filling large areas on the map). I'm not sure what'll do in my situation, I think it may actually slow down my performance by opening tons of high-cost nodes very quickly (That would be blocked in a normal map/game) that might not of been touched at all with regular A*, as my A* implementation is fairly good at making straight lines out of those large rooms.

The big problem in my game is that without blocked tiles all mountains and trees end up open nodes instead of closed off/blocked nodes, since they have a terrain cost they need to be part of the Queue, and if I use JPS it may more frequently fill up the queue with those tiles (and leaving them open, slowing down the overall loop).

It's a complicated problem, because those tiles need to stay open so they can slowly work there way through (in the same way you would figure the cost of moving through tar/mud), so that if pathing fails without going through the mountains or trees it'll already be on it's way to build the shortest path that may involve hacking away at the topography to force it's way to the target.

But, with my current implementation of binarySearch() (or with PriorityQueue/BinaryHeap if Riven and Cas's suggestions work out) I don't think the actual size of the node's collection/list will actually impact performance nearly as much as I expected it to when I first looked into JPS. I now sort the ArrayList in descending order with binarySearch() and a custom comparator (lowest on bottom) so the extremely high cost nodes are mostly untouched when a new node is inserted since it'll only push the (usually minimal or non existent) values lower than it to the right. JPS might help out greatly since it won't matter nearly as much how large the ArrayList is anymore.

So, tl;dr, I might give it a shot again and see what happens. Cheesy

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Offline BurntPizza

« JGO Bitwise Duke »


Medals: 485
Exp: 7 years



« Reply #526 - Posted 2015-04-07 20:46:13 »

Hmm, sounds tricky. But yeah, if you're not using a heap/priorityqueue for A*, then there is almost certainly room for improvement right there.
Offline Riven
Administrator

« JGO Overlord »


Medals: 1310
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #527 - Posted 2015-04-07 20:53:41 »

I might slap the tail from this thread on the RPC game thread later. DONE Yawn

Having said that, binary search is cache trashing galore. Given your access patterns, it might be faster to do a linear search from the tail of the array, or a binary search on the last X elements, if that fails, a binary search on the range before it. In the end memory bandwidth (and cache trashing) is probably your bottleneck, making these quirky, hackish tricks worthwhile.

Everybody knows binary search scales O(log n), but given the characteristics of modern CPUs, it at one point takes a nose dive, once the working set doesn't fit into cache anymore, and nearly every memory access is a cache miss.

Now, ocourse, this all is meaningless without your current performance numbers, your data models and the characteristics of your maps... which means we're mostly making bad assumptions about whatever it is your dealing with.

On that note, if you find out PriorityQueue is a poor fit, and BinaryHeaps seem tempting... keep in mind d-ary heaps (which are like binary heaps, but have d children, where d is a constant, >= 2) which are theoretically slower, but due to better memory management (less cache misses) outperform BinaryHeaps in almost every case... or so they say.


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

« JGO Overlord »


Medals: 1310
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #528 - Posted 2015-04-07 20:59:59 »

Have you consided mipmapping your graph?

Generally the most effective optimisation strategy is discarding the majority of your data persecutioncomplex

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

« JGO Spiffy Duke »


Medals: 945
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #529 - Posted 2015-04-07 21:30:18 »

Generally the most effective optimisation strategy is discarding the majority of your data persecutioncomplex
... or not doing any optimisation at all, if it's actually fast enough and there's other things to be doing instead Wink

Cas Smiley

Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #530 - Posted 2015-04-07 21:34:16 »

I might slap the tail from this thread on the RPC game thread later.

Probably wise, we're way off topic. Smiley

Having said that, binary search is cache trashing galore. Given your access patterns, it might be faster to do a linear search from the tail of the array, or a binary search on the last X elements, if that fails, a binary search on the range before it. In the end memory bandwidth (and cache trashing) is probably your bottleneck, making these quirky, hackish tricks worthwhile.

Everybody knows binary search scales O(log n), but given the characteristics of modern CPUs, it at one point takes a nose dive, once the working set doesn't fit into cache anymore, and nearly every memory access is a cache miss.

Now, ocourse, this all is meaningless without your current performance numbers, your data models and the characteristics of your maps... which means we're mostly making bad assumptions about whatever it is your dealing with.

On that note, if you find out PriorityQueue is a poor fit, and BinaryHeaps seem tempting... keep in mind d-ary heaps (which are like binary heaps, but have d children, where d is a constant, >= 2) which are theoretically slower, but due to better memory management (less cache misses) outperform BinaryHeaps in almost every case... or so they say.

yeah, without everyone fulling understanding the system it's hard to offer advice, and it's definitely not a standard system. I think PriorityQueue may be the way to go, since it natively functions the same way I've Jerry-rigged my current ArrayList. Smiley

Have you consided mipmapping your graph?

Generally the most effective optimisation strategy is discarding the majority of your data persecutioncomplex

Yep, I've tried to trim out as much as humanly possible, and only (pre)calculated what was absolutely necessary. Smiley

... or not doing any optimisation at all, if it's actually fast enough and there's other things to be doing instead Wink

Cas Smiley

Normally I'd agree, but in this case pathfinding is probably a stress spot in my entire program. Cheesy

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #531 - Posted 2015-04-07 21:49:40 »

@ Riven - PriorityQueue took a full complex path across the entire map from 55-57ms down to 10-11ms. Awesome! Smiley

I think this is where I take Cas' advice and consider it fast enough to get the job done. ;P

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Offline princec

« JGO Spiffy Duke »


Medals: 945
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #532 - Posted 2015-04-07 22:26:02 »

Today, I actually had a good sit down this evening and played Retro Pixel Castles for the first time Smiley Can't figure out how to make food! Gah.
While I was playing I had the good sense to profile it, and here is what it produced:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
Flat profile of 2278.94 secs (172965 total ticks): main

  Interpreted + native   Method
  0.3%     0  +   258    org.lwjgl.opengl.WindowsDisplay.nGetPbufferCapabilities
  0.0%     0  +    41    org.lwjgl.opengl.WindowsContextImplementation.nSwapBuffers
  0.0%     0  +    32    org.lwjgl.opengl.WindowsDisplay.nResetDisplayMode
  0.0%     0  +    31    java.io.FileOutputStream.close0
  0.0%     0  +    30    org.lwjgl.opengl.WindowsDisplay.nSwitchDisplayMode
  0.0%     0  +    26    org.lwjgl.opengl.GL11.nglGetFloatv
  0.0%     0  +    25    java.net.SocketInputStream.socketRead0
  0.0%     0  +    21    java.net.DualStackPlainSocketImpl.connect0
  0.0%     0  +    21    org.lwjgl.opengl.EXTFramebufferObject.nglCheckFramebufferStatusEXT
  0.0%     0  +    18    sun.nio.ch.FileDispatcherImpl.close0
  0.0%     0  +    14    org.lwjgl.opengl.WindowsDisplay.nDestroyWindow
  0.0%     0  +     9    org.lwjgl.opengl.GL11.nglGetTexImage
  0.0%     1  +     8    org.lwjgl.opengl.GL11.nglGenTextures
  0.0%     0  +     9    org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat
  0.0%     0  +     8    org.lwjgl.opengl.GL11.nglTexImage2D
  0.0%     0  +     7    java.io.RandomAccessFile.close0
  0.0%     0  +     7    java.io.WinNTFileSystem.rename0
  0.0%     0  +     7    org.lwjgl.openal.AL10.nalBufferData
  0.0%     0  +     5    sun.nio.fs.WindowsNativeDispatcher.CreateFile0
  0.0%     0  +     5    java.io.WinNTFileSystem.delete0
  0.0%     0  +     5    org.lwjgl.opengl.WindowsContextImplementation.nDestroy
  0.0%     0  +     4    java.util.zip.ZipFile.close
  0.0%     0  +     4    java.net.NetworkInterface.getAll
  0.0%     0  +     3    java.io.WinNTFileSystem.getLastModifiedTime
  0.0%     0  +     3    java.io.FileInputStream.readBytes
  0.8%    75  +   638    Total interpreted (including elided)

     Compiled + native   Method
  0.4%   375  +     0    rpc.particles.ParticleModule.update
  0.1%   118  +     2    rpc.entities.EntityModule.getMobType
  0.1%    55  +     0    org.newdawn.slick.state.StateBasedGame.update
  0.1%    53  +     0    rpc.utilities.PathFinder.searchForResourceTile
  0.1%    51  +     0    rpc.entities.EntityBase.updateAnimation
  0.1%    43  +     5    rpc.guielements.play.Interface.render
  0.0%    43  +     0    rpc.particles.ParticleModule.render
  0.0%    36  +     2    rpc.utilities.PathFinder.findPath
  0.0%    37  +     0    rpc.entities.EntityBase.combatSearch
  0.0%    32  +     2    rpc.particles.ParticleModule.initController
  0.0%    25  +     0    rpc.entities.EntityReachMap.buildReachMap
  0.0%    23  +     2    rpc.resources.ResourceModule.updateResourceCount
  0.0%    20  +     0    org.newdawn.slick.openal.WaveData.convertAudioBytes
  0.0%    18  +     1    rpc.entities.EntityBase.updateAI
  0.0%    18  +     0    rpc.map.CollisionModule.initController
  0.0%    18  +     0    rpc.objects.ObjectRangeBuilder.createSingleRange
  0.0%    16  +     0    rpc.BackgroundModule.update
  0.0%    13  +     0    rpc.resources.ResourceModule.renderSelection
  0.0%     1  +    10    rpc.LightingModule.addLightStraight
  0.0%     9  +     1    rpc.ShadowModule.initController
  0.0%     7  +     2    rpc.LightingModule.updateLightMap
  0.0%     8  +     0    rpc.utilities.PathFinder.searchForEntity
  0.0%     7  +     0    rpc.entities.EntityModule.update
  0.0%     6  +     0    rpc.entities.essence.EssenceBase.checkTarget
  0.0%     5  +     0    rpc.entities.VillagerUtility.getHarvestingWork
  1.3%  1119  +    62    Total compiled (including elided)

         Stub + native   Method
 56.6%     0  + 52790    org.lwjgl.opengl.GL11.nglGetFloatv
  9.0%     0  +  8399    org.lwjgl.opengl.WindowsContextImplementation.nSwapBuffers
  7.9%     0  +  7382    org.lwjgl.opengl.GL11.nglColor4f
  5.3%     0  +  4962    org.lwjgl.WindowsSysImplementation.nGetTime
  4.4%     0  +  4063    java.lang.Thread.yield
  3.9%     0  +  3677    org.lwjgl.opengl.GL11.nglTexCoord2f
  3.2%     0  +  2968    java.lang.Thread.sleep
  3.0%     0  +  2793    org.lwjgl.opengl.GL11.nglVertex3f
  1.0%     0  +   939    org.lwjgl.opengl.GL11.nglEnable
  0.8%     0  +   765    org.lwjgl.opengl.GL11.nglTranslatef
  0.6%     0  +   528    java.lang.Object.hashCode
  0.5%     0  +   434    org.lwjgl.opengl.GL11.nglBegin
  0.4%     0  +   375    org.lwjgl.opengl.GL11.nglBindTexture
  0.4%     0  +   365    org.lwjgl.opengl.GL11.nglEnd
  0.1%     0  +   106    org.lwjgl.opengl.GL11.nglGenTextures
  0.1%     0  +    68    java.util.zip.Inflater.inflateBytes
  0.1%     0  +    56    org.lwjgl.opengl.GL11.nglCallList
  0.1%     0  +    55    org.lwjgl.opengl.GL11.nglPopMatrix
  0.1%     0  +    51    java.io.FileInputStream.open0
  0.0%     0  +    41    org.lwjgl.opengl.GL11.nglVertex2f
  0.0%     0  +    39    org.lwjgl.openal.AL10.nalSourcef
  0.0%     0  +    38    org.lwjgl.opengl.GL11.nglLoadIdentity
  0.0%     0  +    36    org.lwjgl.opengl.GL11.nglGetError
  0.0%     0  +    34    org.lwjgl.opengl.GL11.nglPopClientAttrib
  0.0%     0  +    31    org.lwjgl.opengl.GL11.nglDisable
 98.0%     6  + 91398    Total stub (including elided)

  Thread-local ticks:
 46.1% 79665             Blocked (of total)
  0.0%     2             Class loader


Global summary of 2278.94 seconds:
100.0% 173043            Received ticks
  0.0%    75             Received GC ticks
  1.9%  3296             Compilation
  0.0%     2             Other VM operations
  0.0%     2             Class loader

 
Note here and there the total lack of any pathfinding code contributing to the CPU usage. In fact notice the total lack of CPU usage. You spend 98% of your time in native code! And half of it is nglGetFloatv, which I can't for the life of me think why you would ever call it.

Cas Smiley

Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #533 - Posted 2015-04-07 22:37:46 »

Today, I actually had a good sit down this evening and played Retro Pixel Castles for the first time Smiley Can't figure out how to make food! Gah.
While I was playing I had the good sense to profile it, and here is what it produced:

<snippage!>
 
Note here and there the total lack of any pathfinding code contributing to the CPU usage. In fact notice the total lack of CPU usage. You spend 98% of your time in native code! And half of it is nglGetFloatv, which I can't for the life of me think why you would ever call it.

Cas Smiley

The old pathfinding system is actually pretty solid, it can process 10-15 paths at once in about 15ms, so it's even faster than the new system. It just doesn't understand terrain movement costs (It's similar to a Breadth First Search system). As for nglGetFloatv, I honestly have no idea. I don't call it anywhere in my code, so I'm guessing it's being called under the hood inside Slick2D somewhere. I'll have to hunt it down, because that has me curious. Smiley

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Offline theagentd
« Reply #534 - Posted 2015-04-07 22:42:36 »

Its percentage is probably inflated due to causing a driver stall. The OpenGL function is glGetFloat() BTW.

Myomyomyo.
Offline Riven
Administrator

« JGO Overlord »


Medals: 1310
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #535 - Posted 2015-04-07 22:46:47 »

Line 300 and line 1745, in Graphics.java

1  
2  
3  
4  
5  
6  
7  
8  
   public Color getBackground() {
      predraw();
      FloatBuffer buffer = BufferUtils.createFloatBuffer(16);
     GL.glGetFloat(SGL.GL_COLOR_CLEAR_VALUE, buffer);
      postdraw();

      return new Color(buffer);
   }


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
   public void pushTransform() {
      predraw();
     
      FloatBuffer buffer;
      if (stackIndex >= stack.size()) {
         buffer = BufferUtils.createFloatBuffer(18);
         stack.add(buffer);
      } else {
         buffer = (FloatBuffer) stack.get(stackIndex);
      }
     
     GL.glGetFloat(SGL.GL_MODELVIEW_MATRIX, buffer);
      buffer.put(16, sx);
      buffer.put(17, sy);
      stackIndex++;
     
      postdraw();
   }


most peculiar Stare

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

« JGO Spiffy Duke »


Medals: 945
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #536 - Posted 2015-04-07 22:52:16 »

Yeeargh, Slick  Pointing Keviiiiiiiiiiiiin!

Cas Smiley

Offline Roquen

JGO Kernel


Medals: 514



« Reply #537 - Posted 2015-04-08 07:23:04 »

A small grid might be 256x256=65536 cells.  A navigation mesh of the same data might be some like a dozen...or maybe even dozens!
Offline Rayvolution

« JGO Spiffy Duke »


Medals: 379
Projects: 2
Exp: 2 years


Resident Crazyman


« Reply #538 - Posted 2015-04-14 09:14:56 »

Greetings everyone,

For 7 days I will be giving out copies of Retro-Pixel Castles on Twitter. Winners will be announced at the end of each day! Already own a copy? Gift it to a friend!

To enter, simply follow @RaymondDoerr and retweet the current active tweet for that day. This post will be updated daily with latest active tweet, and a list of previous winners. Anyone can enter, names will be collected from the retweet list on twitter, thrown into a (figurative) hat and one name will be picked randomly!

Even if you win, you can even retweet the future active tweets to try your luck for a another copy!

Bonus: Winners Twitter accounts will be listed below, giving your account some free exposure! Smiley

CURRENTLY ACTIVE: WEDNESDAY 15TH
Winner be announced early on the 16th just prior to the next tweet!

https://twitter.com/RaymondDoerr/status/588291637140262912

Winners:
TUESDAY, April 14th - Jon Hearn (@ZenDarklighter)

Upcoming tweets:
THURSDAY, April 16th.
FRIDAY, April 17th.
SATURDAY, April 18th.
SUNDAY, April 19th.
MONDAY, April 20th.

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
LIVE-STREAMING DEVELOPMENT: http://www.hitbox.tv/rayvolution
Offline lcass
« Reply #539 - Posted 2015-04-14 11:47:02 »

On the latest update ive noticed a few things , firstly the crystal motivator has no image in the menu and it has the same description as the cullus gate. Everything else is great.
Pages: 1 ... 16 17 [18] 19
  ignore  |  Print  
 
 

 
cybrmynd (138 views)
2017-08-02 12:28:51

cybrmynd (159 views)
2017-08-02 12:19:43

cybrmynd (153 views)
2017-08-02 12:18:09

Sralse (169 views)
2017-07-25 17:13:48

Archive (648 views)
2017-04-27 17:45:51

buddyBro (767 views)
2017-04-05 03:38:00

CopyableCougar4 (1301 views)
2017-03-24 15:39:42

theagentd (1265 views)
2017-03-24 15:32:08

Rule (1237 views)
2017-03-19 12:43:22

Rule (1312 views)
2017-03-19 12:42:17
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
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!