Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (492)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Storm the Castle  (Read 4017 times)
0 Members and 1 Guest are viewing this topic.
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Posted 2005-04-03 19:17:50 »

I fancied a go at a 3D game in java and here it is. It needs Java 1.4.2 or later and the page will ask to fetch it if you haven't got it. Mozilla/Firefox users additionally ideally need a plugin to play the MIDI soundtrack. Firefox will suggest Quicktime, but it is a manual install.
http://homepage.ntlworld.com/alan.d.waddington/demo/GameEngineDemo.html

A couple of questions, while I'm here.
1. While this app requires 1.4.2, it's really only the use of BufferedImage, some Collections & built in (but unused) support for in-game midi that uses it.  Oh and the sound samples are at 11kHz & would have to be resampled.  So it probably could be made to work under 1.1 if I wanted (which I don't really, since this is really for my amusement). However I wonder whether the loss of the JIT compiler would make the app crawl with 1.1.  I have seen elsewhere that the old microsoft VM was quite fast.  On the other hand, with broadband penetration rising rapidly, maybe the days of users with really old VM's are on the way out.
2. Is it me, or does playing midi in java work (if it can be called that) really badly.  Even if a soundbank is installed, the sound is awful and the auto-install doesn't load one; hence putting the track in the html instead.  Maybe a 15 second PCM loop in java would be a better bet instead. Repetitive and somewhat large yes, but at least it should be reliable.

Cheers
Alan

Time flies like a bird. Fruit flies like a banana.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #1 - Posted 2005-04-03 19:59:53 »

1. Don't ask people to click if you don't let them use the mouse for a mouse-genre game - it just underlines the fact that you aren't letting them use the mouse

2. Your kb sensitivity is far far too high, you have a 20 degree turn rate AFAICS, i.e. you have a 1 in 4 chance of being able to hit a target that's 5 degrees wide, i.e. it's very difficult to hit anything

3. the guards are invicible?

4. never use "z" as a fire key - ctrl, space, shift, anything like that. It's like telling people to use t, b, f, and k for up down left right. Weird and confusing for no benefit.

5. the animations look nice. I'm guessing the game could be quite fun if I could get past the UI problems.

6. applets are the scum of the earth. Webstart it, or upload to JGF and it'll webstart automatically (although you'll need to sign your jars if you want to do things that applets can't normally do)

malloc will be first against the wall when the revolution comes...
Offline Daire Quinlan

Junior Member





« Reply #2 - Posted 2005-04-03 20:39:48 »

Actually the 'z' key is a bit of a standard with the shmup crowd as well, along with 'x' for secondary fire/power ups or whatever. Every one of those wierd japanese shooters that pop up every now and again use the z & x keys so you get accustomed to trying them :-)

D.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #3 - Posted 2005-04-03 20:48:55 »

Thanks for the comments.  The 'Click to Start' was to ensure the applet gets the focus.  I did try some javascript to do same, but while it worked in Firefox, IE ignored it. Hence the click to start kludge.

Fair enough about the turn rate, which needs a slow down.

The guards take 20 hits, although this could be reduced at the risk of making it too easy.  The guards run when they have less then 10 points left, so after that it's easy.  You can get the bowmen by running after them, whilst shooting them in the back.  The swordsmen won't run.  Running backwards whilst shooting works fairly well, or just dodge & take pot shots.  I can now regularly finish the game & am not generally a particularly good player.

'Z' was used because it was close to the Shift key, whichwas used for sighting on both my laptop & desktop.  These could be changed and will be reconsidered.  Not sure about SPACE though, since it can stick on cheap keyboards.

Webstart is no problem, but if you are suggesting going full screen, this would mean signing the applet and that means either an untrusted key or stumping up for a proper one (too much for a hobby really).  Whether it's worth going full screen for 5 to 10 minutes gameplay is uncertain.  It would for a more fully featured game.

Alan

Time flies like a bird. Fruit flies like a banana.
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #4 - Posted 2005-04-04 16:23:05 »

I dropped the turn rate by a factor of two, but found that while this improved aiming accuracy, it was still poor and the reduced turn rate made manoeuvring whilst running impractical because the turning circle was now too large.  So it's back as it was.

So firing when running isn't very accurate, however the sighting mode (with Shift held down) is at a much slower turn rate and does allow accurate aiming.

Depressing the shift whilst running and turning doesn't help since the up/down cursor keys are remapped to change the elevation angle.  Perhaps elevation angle could be mapped to another set of keys, but then that would be awkward.

I might try making already depressed up/down cursor keys continue to move forward/back, when shift is pressed and only change to elevation control a key down event, whilst shift is down.

Regarding Applet versus Webstart.  My aim is only to support what I term micro-levels.  This is partly because my level editor is rather basic and therefore productivity is too low for massive levels.  However this can be considered an advantage for Applet games, where loading times must be fairly short.  Of course Applets mean no 3rd party libraries & thus no OpenGL.  Thus the need for a software renderer (hard going).

Small levels also mean that the game engine design doesn't have to scale well, which is fortunate really since mine draws every room in every frame.  Adding a visible room list to each room, would fix this at no run time cost, but precalculating those visible rooms would be difficult and take a while...  This is more suitable for a Webstart based, OpenGL, scalable engine, which is a fair way away from what I've got, so perhaps more suited to a future project. Besides, there's lots of good engines out there already.

Time flies like a bird. Fruit flies like a banana.
Offline Vorax

Senior Member


Projects: 1


System shutting down in 5..4..3...


« Reply #5 - Posted 2005-04-04 16:56:13 »

I like what you've done so far.  It runs pretty nicely for a SW renderer, though I was never able to kill a guard Sad

To solve the control issue, how about switching to a mouse based interface?  That would allow much more precise turning and control.

Offline digitprop

Junior Member





« Reply #6 - Posted 2005-04-05 07:42:51 »

Well, on my keyboard the 'Z' key sits neatly between 'T' and 'U' (it being a German keyboard). Don' know about Dvorcak keyboards.

That is to say, don't make assumptions about keyboard layouts. I would strongly recommend to make the keys customizable, or to go with keys which have a fairly standard position (i.e. shift, ctrl, space).

M. Fischer . www.digitprop.com
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #7 - Posted 2005-04-05 15:47:42 »

Thanks Vorax & Digitprop for your comments.

Vorax,
Using the mouse is a bit tricky.  A 'mouselook' type control would be nice, but not really practical in an applet, so something more conventional is needed.  My thinking is running as follows:

1. Since it is not possible to continuously rotate (the cursor hits the screen edge), rotation using the cursor left/right keys needs to be retained.

2. When the cursor is over the applet, it could change to the crosshair sight.  The aimpoint can then be moved anywhere in the field of view.  This does not change the direction of travel, which remains via the cursor keys.  Left Mouse down results in auto-repeat firing.  It is possible to move the mouse while firing (i.e. drag operations are treated as movement + firing).

3.  The above does not provide a means of tilting the camera in elevation (e.g. for aiming at the ramparts of the castle when they are not in view).  To solve this, dragging with the right mouse button down will rotate the camera in azimuth and elevation.  The aim-point will follow the cursor, essentially staying at the same place in the 3D world.

Digitprop,
Thanks for the pointer about the German keyboard layout.  I know about the german layout, but it completely slipped my mind, when choosing keys for the game. ::Slaps head::  Hopefully my revised mouse system will work and the problem will be solved.  If not I take your point about CNTRL & SHIFT being more consistently positioned.

Alan

Time flies like a bird. Fruit flies like a banana.
Offline CaffeineOverdose

Senior Newbie




Java games rock!


« Reply #8 - Posted 2005-04-06 03:58:11 »

The guards gand up on you really fast. Like when I shot at the two guards guarding the door (from as far away as possible) the a bunch of guards came out of the castle and attacked me. The only way I think the game could be beat, is if first you heard up all the guards into one huge mob, then you drag them around the castle while running backwards turning around the 4 corners and shooting at them. This is very difficult to master and it would probably take a few weeks of intensive training to do it. Also, turning 90 degrees while running backwards is to hard because each turn is something like 20 degrees.

The graphics are great, and getting that down and getting it to run smoothly was the hard part. Getting the controls and gameplay right should be a litle bit easier.

Also, it would be nice if you could actually hide behind the trees so the guards can see you.

I assume the little dart moving forward when you press Z is an arrow? If you want to make the game look really great (without too much effort) you could have part of a bow in front of the character visisble from first person view. When he is moving it bounces to the side back and forth a little so you can tell that you are holding a bow. When you press z to fire the bow there could be an animation of the bow being raised and an arrow leaving it (if you want to get even fancier you could show an arrow being placed and then moving back before you get ready to fire). You could have a loading system, where you put the arrow in the bow and then hit z to release it. This would add some type of strategy to the game, like you reload the bow, jump out shoot, hide behind something or run away while reloading.

The guards have the ability to attack you with their swords. Maybe you could consider adding this ability to the character so he can charge up to the enemy and attack him?

The graphics right now are pretty awsome, they are very smooth, and the AI is quite good (infact it might even be a little too good). You could make it much better by adjusting the controls and make it look a little bit better by adding firing animations, reloading, sword as a weapon, and sword swing animations (as simple as rotating the sword down from the guards hand and then rotating it back up, asking you to add arm and body movements is too big of a step from where the game is at now.

I think you are the only person here who has beaten the game. Perhaps there is a special strategy that we are missing?
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #9 - Posted 2005-04-07 20:20:11 »

Version 2 with mouse controlled targeting is now available at the same URL.
http://homepage.ntlworld.com/alan.d.waddington/demo/GameEngineDemo.html

See if this is an improvement.

Thanks for the comments on the gameplay CaffeineOverdose.  Hopefully the better targeting will make it easier to defeat the guards.  I like your suggestions but it's a bit of a balancing act between features and framerate.  Drawing a bow as you suggest would be a nice feature.

Alan



Time flies like a bird. Fruit flies like a banana.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Vorax

Senior Member


Projects: 1


System shutting down in 5..4..3...


« Reply #10 - Posted 2005-04-07 20:47:02 »

It's much better with the mouse for aiming.  I got 300 points and captured the flag, but I died trying to get the rest of the guards.

The guards are still pretty hard to kill, but at least I took a couple with me this time Smiley

Offline CaffeineOverdose

Senior Newbie




Java games rock!


« Reply #11 - Posted 2005-04-07 22:41:35 »

The mouse aiming makes it much easier. The guards are still hard to kill and you have to kite (meaning running away and shooting then running away and shooting) them to down it. Also using this method to kill the guards takes up a lot of space and tends to attract the attention of other guards. I think the guards should be easier to kill.

The ability to strafe left and right would be really nice and make a lot of things much easier (more elaboration below).

I like how it looks up for you when you move the mouse up, but sometimes this is annoying like when you are trying to aim for something at the top of the screen.

I really like the controls in games like Unreal Tournament where the arrows (or W,A,S,D if you so please) move you up, down, strafe left, strafe right, and the cursor is locked in the center of the screen. Moving the mouse rotates your characer and changes what you see (because the cursor is always in the center of the screen, so moving your mouse to the left turns you left). Those controls word best in first person combat games (not necessarily shooters, because games like UT2K4 have combat weapons in addition to guns). However, implemented these types of controls is a problem in applets that are not fullscreen because users will need to have their mouse hid the edge of the screen in order to rotate, so I don't know why I even wrote this paragraph because these suggested controls are not applicable unless you want you applet to be full screen.....

The graphics runs very smoothly on my computer which is amazing because most 3D Java games lag quite a bit on it (I have a bad computer). I think you could improve the player inferface, by maybe displaying a health bar instead of just a number.

Anyway, it's much improved since when you first showed the game here, good work.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Nickropheliac (15 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (33 views)
2014-08-22 19:31:30

atombrot (41 views)
2014-08-19 09:29:53

Tekkerue (40 views)
2014-08-16 06:45:27

Tekkerue (35 views)
2014-08-16 06:22:17

Tekkerue (25 views)
2014-08-16 06:20:21

Tekkerue (37 views)
2014-08-16 06:12:11

Rayexar (72 views)
2014-08-11 02:49:23

BurntPizza (49 views)
2014-08-09 21:09:32
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!