Health bar, obelisk, summoning effect and monsters |
Here are some recent screenshots of the Green Algae project. Progress so far is minimal as I was discovering how to use GLES20 for Android. Added a green health bar and summoning of enemies from the obelisks with a basic scaling circle for a summon effect so far. It's rudimentary but at least it is something. I used the same placeholder image for both the enemies and for the player avatar. So the avatar in the image is the one directly below the obelisk or the messed up wooden thing sticking out of the ground. I refined the map generation algorithm a little and put in sandy beach like outlines. Still have way too many trees there.
Accelerated Image Problem
I also fixed an issue with images not being accelerated, the problem being unknown but found when I got incredible choppy and low framerates after putting in the fullscreen switch. You can test if an image is accelerated like this
GraphicsConfiguration gc = GraphicsEnvironment .getLocalGraphicsEnvironment() .getDefaultScreenDevice() .getDefaultConfiguration(); boolean isAcclerated = image.getCapabilities(gc).isAccelerated();
In order to get the images accelerated I simply switched them to being VolatileImages which did the trick but then it broke the fullscreen switching so I need to reload them when the switching to fullscreen exclusive mode, or use the fullscreen window and just scale everything to match the size without changing resolution.
Map Generation Changes
Map generation actively changes as the map is being generated |
Here is another screenshot, its the map generation preview which helped me debug a few oddities with the sand outlining piece and parameters. I have a bunch of primitive looking slide-bars that act as controls for how many islands and how large, long, and how much they vary when built. You can see my attempt at grass here and making it repeat well. Also my first attempt at an actual standing tree to align with the top-down style graphics, it needs work and a leafy version.
Combat System Snippet Work
So, after fiddling a little bit with trying to make the summoned monsters fight back I found that I am indeed in need of a combat system. So I started thinking about the design of it and what I wanted it to be able to handle. I have a few basic classes and interfaces put into a separate project so I can share it with all of you as a snippet. Currently the idea is to use the mediator design pattern having a CombatSystem class as the mediator to handle things like who swung first and what not, handle multiple Combatants (which are the Colleagues in the pattern). Asses damage and timing between attacks it seems like it will be a good way of handling combat and could potentially be used in a lot of different games. So hopefully have that working in a couple of days if I get time to work on it. Or it may have to wait till the weekend, my day job does get busy sometimes.
If anyone would like to share what types of systems they've used in the past for combat, I am sure people would find it very helpful. Thanks for reading, and if you have any suggestions for snippets or need help figuring out something that I may know how to do don't hesitate to ask in a comment.
No comments:
Post a Comment