Shard Master Classic - WIP

I’d love to, but the “engine” (i put quotes around it because it’s just a graphics engine, not exactly a game engine) has basically become twisted and molded into Shard master so that the game can run as fast as possible.

Essentially, I wouldn’t be easy to tear the engine apart from Shard master because the engine and Shard master became one entity haha.

If you have any questions though, feel free to ask, I’m more than happy to answer questions :slight_smile:

Ah, ok, that makes sense… bit too early in the morning to see that sort of gore :stuck_out_tongue:
That aside, I was just primarily interested in seeing what made it tick, and possibly what could be done to make it run a little faster.

hi, registered just to ask this question!
since i know a bit about drawing graphics, but not much about anything else,
i was wondering how/in what format you are storing and reading the map.
could you maybe explain a bit about how the game does that?

thanks!

I just store the tile information (x,y,objectID, height, etc…) in a bytebuffer and pack it into a file at a certain entry. Look into ZipFile and ZipEntry javadocs

The versions of the game that are available for download poorly reflect the current game that I have not posted yet. The current game runs faster due to rendering optimizations.

Here is a pretty cool update with a download!

Started equipment, skills, etc…

http://www.mediafire.com/download/fm094746az711as/ShardMasterClassic_1-16-16.jar

Turn off shadows in the settings tab for a significant performance boost.

Press E to see the orthographic render of the world from the light source’s point of view (shadow mapping).

Wow, looking good there.
What’s the black space above the inventory/settings/skills tabs going to be used for? Also, are you computing those shadows every frame? You could try to cache them somehow, for things that don’t move. That might help with performance but memory usage would rise a bit.

Thank you! That black space above the tabs will most likely be used to display other information about your character like your name and some other miscellaneous level-based info

Also, yes the shadow map is getting calculated every frame because it has to move with the player. The drawing of the shadow map itself is fast, it’s the pixel by pixel loop after the frame is processed that affects speed.

Made shadows a little bit faster

Added pickable crops.
Different types provide a different number of that food item. For example, one corn plant gives 4 corn while one potato plant gives one potato.

Added doors!
Opening a door:

Showing the opened door:

You can’t close the door while you are on the door’s tile to prevent getting stuck in the door.

Walking through and showing the door from another angle:

Started health and damage. The picked crops heal you for a certain amount and eating flowers hurt you.

Health bar above head only appears when you are damaged and also disappears after not receiving damage for 4 seconds. It does not appear when you heal yourself, however this may be changed.

Looks good! ;D I’ve one question though: Everything is 3D here, even the simplest plant. So why not the player?

Haha yeah, the player (and the future npcs) will be 2D because I suck at 3D modeling and animation. Also I do not know how to properly implement a 3D animation into the game.

If I were to be implementing a 3D animation system into this I’d do something like the following:

  • separate the player into joints (so the player is a skeleton, composed of joints)
  • create some sort of animation manager that keeps references to currently running animations and update this manager every game tick
  • for each animation, store positional data per each ‘frame’ - update the points on the skeleton with new locations and angles
  • render each component of the skeleton separately, using relative coordinates to the player, using respective parts of the model.

Thanks but I am 100% sure that there won’t be a 3D player in shard master haha

What sort of hardware are you developing this on? I’ve been running it on a retina mbp (dual-core 2.9 ghz i5) and getting 20-40fps.

I have a 2012 mbp retina with a 2.6 ghz intel i7. I get around 25-28 fps with the shadows on (these are the old shadows im referring to, the new faster ones I get around 30 fps) and with shadows off, I get a constant 40-41 fps (which is the sweet spot for the engine)

Sorry for lack of updates, getting equipment to work is a real monotonous thing since i have to make the images and position them on the 2D player for each of the 8 faces so I just work on it slowly because I cant handle too much of it.

Hey everyone, so I did a ton of cool things with this game and I will announce them in the next release, but I have an important question that I’d like to ask you all.

Should I keep shadows in Shard Master even though with all this new content and stuff it makes the game run at 12-13 fps?

^^^^^^^^

Personally, I think that if you can’t break 30 frames per second with it all, cut the shadows.

You might want to make the renderer multi-threaded to speed it up instead of dropping the shadows.

Seconding EgonOlsen, there’s no reason you can’t spend time optimizing to bring your frame rate up.