Hello one and all 
I’ve been rather slowly working away at this, and it is coming along …slowly.
Some of you may recall many months ago I posted something that looked reasonably similar, and unfortunately the development has been entirely non-art asset related, so on the face of it doesn’t look like much progress at all 
Anyway here’s a quick summary…
Technical Details
Custom framework that sits on top of:
- JME2
- jme-jBullet physics
Description
On a high level, the direction intended to take with this is an as action RPG, with elements of strategy - leveraged by having large & crazy battles.
This current Swordplay game is really a smaller scale proof of concept, to iteratively develop enjoyable base mechanics for the action part of the game. Plus to server as a driver for scalable development of the various sections needed for the game (i.e. physics, animation, AI, GUI).
Attacking
A strike can be along any one of eight angles around the clock or a thrust. To cause damage the weapon needs to actually hit the opponent, glancing off their weapon does no damage.
Defending
There are two options to avoid being hit by an attacker in range:
- Move move out of range before the strike lands.
- Intercept their weapon before the strike lands, which can be done with a perfectly matched attack, but is easier with a block.
Health
The red bar in the top left corner in game hud, currently fixed amount a of damage, which gives 3 strikes before you’re out.
Stamina
The blue bar in the top left corner in game hud, movement, attacking and blocking all require stamina, which automatically recharges (at a rate equal with movement, but lower then blocking and attacking).
Controls
The basic keyboard controls can be overridden with custom bindings, in the Options menu:
- WSAD; basic movement
- QE; rotation
- Right mouse down, drag and release; one of 9 attacks (8 angles and one thrust).
- Left mouse down, drag and release; one of 5 blocks (4 angles and thrust)

Areas for Feedback
At this point in time there are some features sill being tuned up (such as the rag doll constraints), so it would be ideal for any feedback on the following areas:
- Base mechanics of Attacking, Movement & Blocking
- AI behaviour
- Fixed and Mouse look camera control
- Mouse driven attacking & blocking
- Any Hardware & OS support / failures
- Framerates
…and here’s the webstart link!
I did try this out. Here are my review points
- After lots of blinking (automatically trying some display settings i guess), im proposed with the small window to choose screen resolution and depth but it is not taken into account (window is way bigger than the chosen 640x480, which maybe should not be available there comparing with your ingame settings).
- Lots of visual garbage, that might be due to my poor intel GM45 chipset on linux. Unfortunately it made the game almost unplayable.
- Storing of settings should be in a new folder, an hidden one (starting with a dot) on linux.
I was going to comment that this sounded a lot like Mount & Blade and Die By The Sword (both of which I thoroughly enjoyed playing), but then I realized I replied with that same comment back when you first discussed this concept, he he.
I seem to have always had a problem with Webstarts on Ubuntu, so I can’t test right now. Looks like you’ve made some excellent progress though, congrats! Say, what GUI system are you using?
So will I be fighting AI or do I get to wreck havoc on a fellow monkey swordsman?
cghislai said:
I did try this out. Here are my review points
- After lots of blinking (automatically trying some display settings i guess), im proposed with the small window to choose screen resolution and depth but it is not taken into account (window is way bigger than the chosen 640x480, which maybe should not be available there comparing with your ingame settings).
- Lots of visual garbage, that might be due to my poor intel GM45 chipset on linux. Unfortunately it made the game almost unplayable.
- Storing of settings should be in a new folder, an hidden one (starting with a dot) on linux.
Thanks cghislai for your prompt feedback,
- The reason for the maximum screen resolution is because LWJGL detects the correct settings of the display to be maximum possible resolution of your monitor. So if your max resolution is 1024 x 768, then it will set it to that to begin with even if you choose 800 x 600 or 640 x 480. I do not know at the moment why it does this under Linux, but under Windows, it seems fine for the initial run. Also I do not know why Webstart wanted to display that LWJGL config screen (??) where you choose resolution because the application should do this detection for you and store the settings config.
If someone can shed some light on this, I would be grateful.
As a work around, you can click OK, then go to the settings screen and set to a lower resolution under the graphics tab and this should work OK.
- The visual garbage could be to do with the Intel card, please can you provide more info.
- The settings, do you mean, the generated files should be stored in separate directories?
Thanks again
Riz
1 Like
cghislai said:
- The detection seems to work this time, again with lots of blinking at first. changing from menu works well.
- Gargbage is actually awful, i think no texture is properly displayed, even the mouse, which is supposed to be a sword i guess, is barely visible, if visible at all. The game looks really weird with blinking meshes textured with garbage colors. My card as limited opengl support, so maybe you are using some unsupported features. I had all settings at lowest level.
- I mean put all files in a new folder, and not in the current directory. Currently, I have all the .dat files in my home folder, which is certainly not desired. For instance, you could write files in a path
new Path(System.getProperty("user.home")+System.getProperty("path.separator")+".swordplayPoC")
The leading dot in the subdir name might be recommended on linux, maybe not on Windows and Mac.
On a personal note, i would write all those settings as properties files, or xml, to allow manual editing; and include a version info in each file so you can take needed actions if your format change/options differ. Actually java support writing object as xml files, so you don't even need to get all properties one a time, just load your AudioConfig object and use AudioConfig.getMusicVolume(). Those class should respect some guidelines, like having an empty constructor and implementing Serializable. See http://www.developer.com/xml/article.php/1377961/Serializing-Java-Objects-as-XML.htm if you want examples.
Other than that, the game seems fine, although a bit slow (maybe due to my problems at point 2). I always loose!
Sorry if I can not give you more gameplay review as it is hard to plya in those conditions.
Hi cghislai,
Thanks for your response.
- I see you are probably running the webstart demo as a normal user and not admin user (please confirm this). This is probably why you see the JME Properties dialog box. Also, you will see the nasty disjointed textures because for some reason, webstart does not retrieve resources from the JAR file (for the look and feel) when running as normal user so the UI looks nasty. I have no idea why this is the case with a standard user. I will need to investigate some into this as I am getting this problem under normal Windows user too (admin works fine!).
- As for the screen resolution problem you mentioned, where the screen would run maximum windowed mode, taking up full screen, regardless of resolution, this was a bug which I have fixed and updated the webstart. The screen flickers somewhat initially to find the screen resolution of minimum 800 x 600, anything below is ignored. (The properties screen is a dummy and is ignored, as a root user, it does not get displayed).
- The dat files, etc are placed by default in the user directory because of webstart as is the logging folders, this will change when we finalise the application as we will not deploy it via webstart but will use an installer package, probably requiring admin/root user privileges. We used webstart because it is good way of shipping quick demos for feedback. Inevitably, there can be some issues with webstart.
- I will look into the serializing proposals you mention although this is not a high-priority enhancement in this current time, but thanks for the suggestions and tips.
Please try running the webstart demo as a root user and let me know if it makes it better?
Ta
Riz
Nice!
Two questions?
How did you create the Loading Bar with Nifty?
How did you connect the bones to the physic?
Thank you for all responses!
Reading back over the posts, there a few points I should mention:
-
@rizwanjavaid is the other developer, responsible for the AI and webstart (It’s really not just me logging in under a different account
)
- The finished product is going to be distributed as a standard NSIS installer, the webstart is just being used, as theirs less overhead when developing (which is why the webstart isn’t quite perfect).
@erlend_sh
Good memory there man!
@cghislai
Screenshots, it’s help me if you could just take a screenshot of the main menu & in game (if you’re feeling really kind edited with GIMP to show just the game window and exported as a JPG).
Screen Artefacts
All the in game models are rendered with GLSL code, using at least normal and specular maps. The GLSL was originally based on some code I found on here a while back but had to rewrite it as the rendering failed on my development laptop (reasonable spec with a dedicated graphics card), although tested on a bunch of different hardware, it could always be a cause.
GUI
The entire GUI is done in a custom skinning for swing components, rendered as a JmeDesktop
Loading screens
The loading bar code is some old code I wrote, basically a BasicGameState that uses Java Graphics2D.
Nifty
There is no Nifty GUI is used.
The GUI elements were all completed a few weeks before the posts about Nifty GUI made it onto JME site.
Rag Doll Physics – Animation
Getting the bones mapped to physics was no great chore, however getting the the bones at a moment in animation, converted correctly into physics took well over two month to get working!
Using the JME2 Ogre animation classes, changed a few methods to public, and added a few, to allow setting a bones location & rotation. The animation bones are then mapped to the corresponding physics bone of a Rag Doll via a manager and updated during the standard update cycle.
There is a fair amount of jiggery-pokery to get the animation classes to behave correctly, and a few meaty size classes handling the conversion, updating of the model, and a particular setup needed for the bones in the model.
How is the connection between Rag Doll and Animation bones handled in JME3?
i tested it out, did not have any graphical problems. Game seemed interesting, i got my butt kicked though. detection worked pretty good too.
@erlend_sh for the time being the game is a single player, as there is a great deal to get done to achieve that, besides all the headache associated with multiplayer, network and matchmaking – that is something to add at a later date!
@Eggsworth the AI is on what will be the top level, so should not be a easy dispatching for you
(but still should be possible, it’s just a matter of timing, distance and angle).
@cghislai thanks for being so quick with the screen shots!
The skinned swing looks fine (JmeDesktop code section).
The health and stamina bars look correct, so that’s the old paintable image code working.
Failure of the various GLSL shaders, but as you say the probably is down to the GM45 chipset you have.
Worryingly the background to the main menu looks scrambled, worrying as that’s using the basic JME code for rendering a image as a objects texture, but the image being rendered is sizable 1K x 1K.
Cghislai, out of interest, do you run any other shader focused games on that box, and if so, how well do they perform?
The thought of supporting less enabled chipsets & lower spec machines by having an option to remove all the graphical effects (shadows and shaders), but the downside is everything will look awful.
As all the models are / will be low poly (as shaders are used instead for detailing), it's whether anyone will want to play a game looking like it belongs running on VRML back in the nineties.
I run spring rts which performs not so good but still fairly playable. I don’t know if its shader based.
All quake3-based games/mods works fine too.
for other lwjgl games, minecraft works well… Tribal Trouble worked well also if im not mistaken, i might have ran it on my old pc (which has better 3D card).
Vertext shader support by my driver is limited, and not all opengl features implemented according to a fast search landing on some forum. opengl 1.4 should be ok.
Well, i really like your game!
Keep up your efforts 
If you need models i can give you some
@cgjislai it looks like some of the spring rts games use bump mapping, so I’d guess it’s probably down to the my GLSL shader using openGL methods not supported by your hardware 
@DarkPhoenixX glad you enjoy the game!
The game is all rather bare bones atm, but as the majority of the functional coding is now done, I’ll be able to really get started on asset creation and additional huds that should help with the intuative meaning behind the gesture based input.
DarkPhoenixX said:
If you need models i can give you some
Yes, actually any vegetation (tree, srubs, flowers, grass) would be most welcome ;) As modelling those things is something I'm really not looking forward to!