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] 2
  ignore  |  Print  
  The hunt for the lost rainbow jewels  (Read 12320 times)
0 Members and 1 Guest are viewing this topic.
Offline Varkas
« Posted 2015-09-14 09:44:25 »



The old thread has been locked, because there were no news for a too long time:

http://www.java-gaming.org/topics/the-hunt-for-the-lost-rainbow-jewels/31407/msg/304224/view.html

But recently I felt inspired to work some more on this project.

I've worked on the basics of a magic system, with a first nova type spell effect in place now:

https://www.youtube.com/watch?v=aLMGeJ1OGYg

Also I've completed the melee combat code, and published a new release:

http://sourceforge.net/projects/jewelhunt/files/r015/

It should work on Windows and Linux. But I haven't tested the Linux version since a long time ...

Since the release I worked mostly on the player stats, and I could finish the character screen. It shows "real" values now instead of dummies, and all the internal calculations for the stats should be in place too (besides those which I have forgotten ...)



Next steps will be to set up item modifiers for all the stats and an improved map generator for wilderness type maps.

The current state is still a walkaround demo, to showcase what is already there. No game yet.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline DavidBVal
« Reply #1 - Posted 2015-09-14 10:42:35 »

Wonderful job so far, man.

Isometric RPGs, that's what the world needs!!! Smiley

Offline Varkas
« Reply #2 - Posted 2015-09-14 11:13:01 »

Thanks Smiley I must tailor some aspects of the project to my skills, but I hope I can make it fun nevertheless.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Varkas
« Reply #3 - Posted 2015-09-18 10:35:47 »

I've published a new development snapshot:

http://sourceforge.net/projects/jewelhunt/files/r016/

Since r015, it's been mostly bugfixes and cleanup work. Item prefixes have changed, and the item-color-depends-on-mods feature is currently disabled. Some item graphics underwent some adaptations too, in lightness and size. The new walls are included as well.



Melee combat still is very clumsy, but it works. Right mouse button is bound to a fire nova spell in this release, which is handy to handle bigger groups of imps. Mana costs and mana recovery is in the demo, but there is not limit ... you can continue to cast spells even if your mana is negative already.

Same for life. You can take damage, but your character won't die.

Slain foes drop items now. 50% chance to become a magic item, 20% chance to become a double-magic item, and a 3% chance to become a rare item with 3 or more mods.

This versions almost feels like a little RPG now.


if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline TheBoneJarmer

Junior Devvie


Medals: 6
Exp: 1-3 months


hi!


« Reply #4 - Posted 2015-09-19 10:33:57 »

Hey!

So far, your game looks really promising! The graphics are nice, there is no audio unfortunately (or it did not work). But what really made me stop playing is the horrible fps. I bought a new laptop like 6 months ago which I can play Tomb Raider Underworld with at full settings so I was quite surprised to see your game using so much CPU. You should run the game with the option -verbose:gc. The GC fails in allocating memory a lot (this means the garbage collector uses your virtual memory because your ram is full). Try not to create so many objects in your game loop.

I noticed you're uses LWJGL2.9.1. I really recommend not to. LWJGL3 has by far much better performance and GLFW is much faster for display and input. Calculating the movement after input really took a while. I hope you can fix this because it really does look promising!

-TBJ
Offline Varkas
« Reply #5 - Posted 2015-09-19 12:52:48 »

Thanks for the feedback Smiley

Yes, there is very little audio yet, only two sounds when moving item in the inventory, one of them also used if the PC picks up an item.

I wasn't aware of any performance problems, that's why I didn't spend time on optimizing anything. I'm testing on a laptop which is fairly recent, and an older desktop PC, both can run the game at 60 FPS and on the desktop (which I am using right now, so I could check this quickly), the game uses between 3 and 5% CPU while running, far from any sort of problem.

I'll still try to take a look into the garbage collection problem that you mentioned.

Since I wasn't aware of performance problems, there seemed to be no need to upgrade the LWJGL version. Usually I stay with a library version as long as possible, because new versions always bring not-yet-known problems.

Are there more people out there who are experiencing performance issues with the game? I got very little feedback so far, and it's hard for me to guess if it's a problem of one system only, or a general problem. Particularly since it runs with very little load on my test systems.

PS:

I made a quick test with -gc:verbose but I didn't see anything scary:

Startup phase:
[GC 33737K->9147K(125952K), 0.0123542 secs]
[GC 42939K->21172K(125952K), 0.0076944 secs]
[GC 54964K->26810K(125952K), 0.0048174 secs]
[GC 60602K->29049K(125952K), 0.0034013 secs]
Display up:
[GC 62185K->41519K(170496K), 0.0083056 secs]
Map creation, moving, entering catacombs, map creation again, monster etcs. Killed a few imps:
[GC 106543K->53479K(173056K), 0.0167703 secs]
Killed more imps, GC didn't output anything more. FPS were 56...60 during this test.

Seems there are plenty of objects created, but GC times are still low ... should I be scared by the last line, when the GC cleaned up 50MB of heap?

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline TheBoneJarmer

Junior Devvie


Medals: 6
Exp: 1-3 months


hi!


« Reply #6 - Posted 2015-09-19 14:17:05 »

I would like to note that I'm using Ubuntu 14.04.3 LTS 64 bit. I had this problems myself when I was testing a small game I made and by actually preventing these many new objects inside the main loop I was able to speed up my game amazingly. Your output looks amazing so I really do wonder if it has nothing to do with my hardware or drivers and if it is Linux-related or not.
Offline Varkas
« Reply #7 - Posted 2015-09-19 14:21:58 »

I'll see if I can do a test on Linux.

I've been profiling the code for object allocations and found a few places where Integers and Strings were created in bigger counts per frame. I could eliminate a few. The next version will include the improvements, and I'll keep an eye on it from now.

Maybe there is a link between sound not working on your system and the high CPU usage.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline DavidBVal
« Reply #8 - Posted 2015-09-19 14:49:46 »

On principle, don't instantiate anything, ever, inside your main loop. Create fields of the needed types, and reuse them.

If you ever plan to move to mobile, then the GC is a performance killer, and you have to prevent even the smallest instantiation. In particular, start optimizing by loops inside of your main loop / render /draw routines. Don't use "foreach" loops in those places, for it instantiates an iterator on each loop cycle, and if there's anything you can cache, do it. For instance, if you're translating coordinates for isometric drawing, cache them after calculation, and only recalculate if the entity moves. Avoid string manipulations if you can, as well.



Offline TheBoneJarmer

Junior Devvie


Medals: 6
Exp: 1-3 months


hi!


« Reply #9 - Posted 2015-09-19 20:10:47 »

The mistake I made a lot was re-creating buffers (FloatBuffer or ByteBuffer) inside my main loop because I needed those as parameters for certain OpenGL calls like glLoadMatrixfv. What I did to change this was actually replacing all those public variables with getters and setters. And whenever I really had to change a position or matrix, I simply re-built the buffer in the setter method. This was a huge speedup for my project and prevented my game to lag less.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Varkas
« Reply #10 - Posted 2015-09-21 19:32:54 »

Now with more scary! Dungeons became dark ...



@TheBoneJarmer: I've published a new version which produces less garbage. If this was a problem on your system, this version should run better:

https://sourceforge.net/projects/jewelhunt/files/r017/

You can find a first rainbow jewel in this version, the violet one, but since the temple map is not included yet, there is nowhere to bring it to ...

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline gereon

Senior Devvie


Medals: 12
Projects: 1



« Reply #11 - Posted 2015-09-25 12:11:07 »

I like isometric games Smiley
And I especially like the look your masonry graphics, together with the lighting effects great mystic atmosphere!

Regarding the garbage collection: If you are using Eclipse, you can analyse the heap with DDMS. Some time ago when I used it... it helped me examining the garbage collection.

Do you use any frameworks/libraries for the isometric graphics?

My current work in progress: Plasmoid ✴ http://www.java-gaming.org/topics/iconified/36667/view.html
Offline Varkas
« Reply #12 - Posted 2015-09-25 12:28:20 »

I'm using LWJGL but no higher level frameworks. Isometric graphics are fairly easy, the axis transforms are like i = y-x and j = y+x, signs depend on the direction of the axes. The graphics are pre-rendered in the right angle and just positioned on screen.

I'm almost certain that garbage collection is not a problem, but on the other hand, I didn't see any harm in spending some time on optimizing the code a bit further, when TheBoneJarmer said it would be a problem on his system (at the moment I think he was just guessing, because GC was a problem in one of his projects, but the real problem why jewelhunt ran badly on his system was something else). I'm using Netbeans and the builtin profiler.

I haven't received any feedback yet though how the demo runs on a larger number of systems. On my two test systems it runs fine, so I can only assume it will do so for many others.

Makes me happy to hear that you like the atmosphere of the dungeon screens. I'm also quite pleased with the results of the light mapping.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline gereon

Senior Devvie


Medals: 12
Projects: 1



« Reply #13 - Posted 2015-09-25 12:47:26 »

Good to know. If things go well, maybe I will make an isometric game some day... Smiley
Yea, unless it is a real problem, it's not worth to spend too much time on it. Just try not to create big/many objects in the hotspots.
Keep up the good work!

My current work in progress: Plasmoid ✴ http://www.java-gaming.org/topics/iconified/36667/view.html
Offline Varkas
« Reply #14 - Posted 2015-09-25 13:01:25 »

At times I'm wondering if going 3D with rigged and animated models, but a fairly fixed viewpoint, so that it looks isometric, wouldn't be superior. I believe it is, but one must learn a whole lot more to get that working. The approach with pre-rendered graphics which are only placed onscreen is easier, but limited. And prone to visibility glitches, e.g. parts of an object being visible when they shouldn't.

One can work around it, but it is an ihnerent problem of this aproach, a problem that a "real" 3D solution doesn't have.


if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline TheBoneJarmer

Junior Devvie


Medals: 6
Exp: 1-3 months


hi!


« Reply #15 - Posted 2015-09-26 08:51:48 »

Hey Varkas!

I just downloaded your demo again. It runs amazingly smooth right now. Nice job! I am still playing it while I'm writing this message because I do have some feedback:

- When I click somewhere my character does not immediately respond. It always take a few seconds before it starts moving.
- There are no close buttons for windows and clicking outside a window doesn't close them right away.
- The information window you see when you hover an item in your inventory sometimes remains active even when your mouse isn't hovering it.

But so far I really like this! I too like isometric Role Playing Games. Or just these kind of Role Playing Games in general. Good ol' times that is. Anyway, keep up the good work!

-TBJ
Offline Varkas
« Reply #16 - Posted 2015-09-26 14:50:26 »

There still seem to be performance issues ... the delay in the movement tells me. Pathfinding is done asynchronously. There is a queue for all pathfinding requests of all creatures on the map, and a thread is working through this queue. If you have to wait till your character moves, it means that the CPU was busy with something else meanwhile and the pathfinding took, well, quite a bit longer than on my test systems.

Can you give me some more specs of your system, CPU and ram? My development box has an Intel i7 CPU running at 3.4Ghz, 8 MB ram.

You can close the windows by pressing c and i (character sheet and inventory), that's the official way, or by moving the mouse out of the windows towards the main window borders (e.g. to close the inventory, move the mouse out of it to the right). I'm lazy on clicking and was looking for a way to close the windows without a click, but it's non-intuitive and there are no hints for this feature in the game.

Thanks for testing again Smiley

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline TheBoneJarmer

Junior Devvie


Medals: 6
Exp: 1-3 months


hi!


« Reply #17 - Posted 2015-09-26 15:03:40 »

Here you go. My system specs which were generated by the program hardinfo:

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  
-Computer-
Processor      : 4x Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz
Memory      : 3969MB (2154MB used)
Operating System      : Ubuntu 14.04.3 LTS
User Name      : YoMammaIsSoFatSheNeedsABeltAsLongAsTheHorizon
Date/Time      : za 26 sep 2015 16:59:04 CEST
-Display-
Resolution      : 1600x900 pixels
OpenGL Renderer      : Mesa DRI Intel(R) Haswell Mobile
X11 Vendor      : The X.Org Foundation
-Multimedia-
Audio Adapter      : HDA-Intel - HDA Intel HDMI
Audio Adapter      : HDA-Intel - HDA Intel PCH
-Input Devices-
 Lid Switch
 Power Button
 Sleep Button
 Power Button
 AT Translated Set 2 keyboard
 ETPS/2 Elantech Touchpad
   USB Keyboard
   USB Keyboard
 RAPOO RAPOO 5G Wireless Device
 RAPOO RAPOO 5G Wireless Device
 Acer WMI hotkeys
 Acer BMA150 accelerometer
 HD WebCam
 Video Bus
 HDA Intel HDMI HDMI/DP,pcm      : 8=
 HDA Intel HDMI HDMI/DP,pcm      : 7=
 HDA Intel HDMI HDMI/DP,pcm      : 3=
 HDA Intel PCH Headphone
-Printers-
No printers found
-SCSI Disks-
ATA WDC WD5000LPVX-2


Yeah sorry for the unnecessary stuff. The report generator includes them and I'm to lazy to sort it out right now. Hope this helps! D:

-TBJ
Offline Varkas
« Reply #18 - Posted 2015-09-28 09:17:15 »

Thanks for postingn the specs. That helps to get an idea what I need to aim for. Actually I've been thinking, until I'm done with the project, quite poewerful computers will be standard, and I can be lazy on optimizing the code Roll Eyes

Edit:

To minimize the delay until the PC starts moving I'm now using a thread pool instead of creating a new thread for each pathfinding job. Doesn't make a difference on my system, but I hope that on slower systems it will help, since the overhead of creating a new thread each time the PC moves is gone.

The other news is that I've started to implement item sockets, like Diablo II had them. So one can use runes, gems and jewels to enhance the items.

I'm wondering if I should adopt "Path of Exile" system of typed sockets. It has three socket types, and gems only fit into matching sockets. Also sockets can be linked, so that one gem can affect the working of another gem in a linked socket.

At the moment my thinking is to use untyped sockets (like D2) and links (like PoE). This avoids some of the annoying "good item, but wrong socket types for my gems" problems and still allows the feature of two gems working together via a socket link.

Edit 2:

Wall mounted torches are something fine ... and these don't even stain the walls!


if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline Varkas
« Reply #19 - Posted 2015-10-03 14:01:49 »

I've published a new development snapshot:

https://sourceforge.net/projects/jewelhunt/files/jewelhunt/r019/

Changes since v0.18:

- Improved visual feedback in combat.
- Fixed 'undying' invisible enemy bug.
- Added shadow effect for player character.
- Added wall mounted torches with a light effect.
- Changed pathfinding to use a thread pool instead of creating new thread instances for each path.
- Added frost nova spell effect.
- Added magic rod graphics and item data. They have no function yet, even if you might find one.
- Added a first draft of the rainbow temple map.
- Improved temple graphics.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline Varkas
« Reply #20 - Posted 2015-10-04 14:22:23 »

I could test the v0.19 on a pretty old netbook, an Asus EeePC 900 HD. That was sold in 2008, and was a low-end computer already back then. Single core Celeron at 900Mhz, 1GB ram, some intel onboard graphics. It got Linux Mint 17.2 installed.

Jewelhunt 0.19 runs there, at 30-40 FPS. Basically it works, except for little delays in movement, when pathfinding is triggered. Sound didn't work. No idea why - my Linux knowledge is too little to really investigate the problem.

I'm fairly sure now that Jewelhunt should run fine on all current systems.

Edit:

Working on graphics for a new game location, a sort of a temple. So far I have parts of the walls and the floors:


if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline Varkas
« Reply #21 - Posted 2015-10-13 13:51:41 »

Seven jewels have been stolen. So far, the location of the first one was known. It went down the sewers and ended up in the imp catacombs.

Among the classic locations of importance, pyramids always have been among the most impressive.

And as it seems, the second jewel has been hidden in a particularly pale place, the uncolored pyramid, home of the grey mummy.


if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline Nibby

Senior Newbie


Medals: 3



« Reply #22 - Posted 2015-10-13 21:55:48 »

Was this inspired by Legend of Mir 2, in some way or another?

"Whatever you are, be a good one."

-Abraham Lincoln
Offline Varkas
« Reply #23 - Posted 2015-10-14 11:06:29 »

No. The main inspiration came from Diablo II, how items will be made. Also, Roguelikes, but they share a lot with Diablo II.

The game world is my design, but honestly, I'm still facing problems. After the decision that there are 7 rainbow jewels, I needed 7 locations where the thief hid them, and I couldn't come up with anything better than the classics - a dungeon, the pyramid, a tower, an ice castle, a cave, and actually I have forgotten the others. But somewhere in my notes, there should be a list of seven locations Roll Eyes

But as it seems, even if I try to keep things very simple, it will take years to finish all that ...

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline TheBoneJarmer

Junior Devvie


Medals: 6
Exp: 1-3 months


hi!


« Reply #24 - Posted 2015-10-14 16:37:21 »

Tried it out again. The delay with the movement still exists. In fact, it took a while for attacking enemies too. Whenever I clicked it didn't immediately respond. What Java version are you using with this?
Offline Varkas
« Reply #25 - Posted 2015-10-14 20:21:02 »

Sun/Oracle JDK 7

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\>java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)


I've been looking into the path finding some days ago and noticed it wasn't very optimally coded. I had done that library for turn-based games some years ago, and obviously I was of the opinion it'd be "good enough". Since then I optimized it a bit, but I should implement A* some day. Currently it is a simple breadth-first search, even if now optimized it is quite a bit slower than A* in most cases. The next release should be easier on the GC in pathfinding, though, the new code creates 50% less objects.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline TheBoneJarmer

Junior Devvie


Medals: 6
Exp: 1-3 months


hi!


« Reply #26 - Posted 2015-10-14 20:37:08 »

Just out of curiosity, why aren't you using Java 8?
Offline Varkas
« Reply #27 - Posted 2015-10-14 20:58:37 »

Psychological trait: Late adopter.

Can't say why, but usually I stay with the things I know until there is a compelling reason to change something. Java 7 works fine for me, I'm not very curious or eager to use anything that was newly introduced in Java 8, and compiling my code on language level 7 makes it more likely to run on many other systems, including those who haven't upgraded yet.

The next release will have an A* implementation for pathfinding.
 

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline Varkas
« Reply #28 - Posted 2015-10-15 20:03:57 »

I've published a new development snapshot. This time it's a more "in-between" version, because the pyramid interiors are not done yet, and the pyramid map is done only partly.

https://sourceforge.net/projects/jewelhunt/files/jewelhunt/r020/

The only noteworthy change in terms of code is the switch to A* pathfinding. My priority queue implementation is cheap, and not optimal, but it produces less garbage than the old breadth-first pathfinder from the former version. I don't see any performance change on my system, but in theory, this new version should be better.

There is also a change that allows to display "equipment overlays" for the PC, depending on the used equipment. I've done only one overlay yet, though, for shields. It's only a visual goody, and quite a lot of effort to make the overlays, so I feel uncertain if I want to continue this. In the current release the system is active, though (for shields).
 



if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Offline Varkas
« Reply #29 - Posted 2015-10-20 21:48:29 »

I wish I could make better looking water surfaces - today I made a pond for the rainbow temple map:



And the village map got a waypoint:



Today I feel a bit disappointed - the project isn't looking bad, but I can't get it the way I want. The controls are clumsy, the magic system is largely non-existing, I have no real idea how to make good looking graphics effects with OpenGL, and still the project feels like bloatware: 12MB download for a walkaround demo - which even stalls on slower systems.

Maybe my winter depression is creeping at me again. There is little to be happy about these days. It's dark, cold, and the autumn leaves are dropping, soon the world will be brown and gray, dirty. Pale, colorless, like baddies in my project want it to be, too.

if (error) throw new Brick(); // Blog (german): http://gedankenweber.wordpress.com
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

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

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

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

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

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

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

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

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

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

Rule (1313 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!