Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (589)
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 3 ... 5
  ignore  |  Print  
  Mini Adventure  (Read 18459 times)
0 Members and 1 Guest are viewing this topic.
Offline kevglass

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Posted 2004-02-28 14:17:25 »

Well, here we go again.. looking for some feedback on control systems. I'm looking at writing this little adventure system and was wondering what sort of control system would work.. here's the current demo..

http://www.cokeandcode.com/miniad/miniad.jnlp

If you click around your little chap will walk to the location clicked. Ignore the fact that you don't walk behind things or that you can walk through things. I was wondering if maybe it'd be more natural to be controlling via keyboard. This will of course wreck my network code but better to find out early (it'll currently run a local server).

I'm intending to add a GUI around the current view area to support the inventory, particular actions and chat. I'd also be interested in opinions on walking speed and/or the character being centered in the area (as opposed to free moving)

Your time and feedback is appreciated as always..

Kev

PS. I've fixed the frame rate to 30 so hopefully its not going to tie peoples systems up.

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #1 - Posted 2004-02-28 14:55:00 »


  • The jerky movement in the demo makes conclusions a little tricky - suggest you smooth it a bit to be sure that people are providing apt feedback. If you aren't seeing jerkiness yoursefl, erm...well this is on my normal 1Ghz machine nothing else really running so I don't know why it's jerky Sad. But I'm assuming it's because you've got a quick hack positional interpolation that's coarse grained at the moment...?
  • For point-n-click games of this style, frequent clicking is tiring, slow and ultimately leads to RSI. A vast number of people end up just holding the mouse down and dragging it. This is partly because early games with this kind of control mechanism either polled for mous position and moved accordingly, or ingored the in-game position pointed to and just looked at the mouse's relative position to the player (e.g. Ultima 7). The diablo series, which obviously have set expectations for a lot of people, act like this although I suspect they have a dual mode - if you click and release, it acts like yours does now, if you click and hold, it acts like U7. This is all transparent and non-configurable, fo course.
  • Your demo doesn't support the drag paradigm - looks like you're listening to the mouse-down, then ignoring the mouse position until it ups and downs again?

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

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #2 - Posted 2004-02-28 15:05:29 »

Jerky movement? Oh dear, thought I was past the annoying bit. Its smooth as a baby's bottom here. Whats jerking exactly? The scrolling?

Mouse drag, sounds like a good plan. At the moment the network stuff is set up to be order based. You click, that sends a message to the server to place the order. The order is relayed back to the client and acted out. If I support holding the button down I can either:

a) Spam the server with updates to the position
b) Check say every second for a new position and update the order.

Does b sound ok?

Kev

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

JGO Coder


Medals: 1


http://t-machine.org


« Reply #3 - Posted 2004-02-28 15:33:56 »

Quote

a) Spam the server with updates to the position
b) Check say every second for a new position and update the order.


c) make the client appear to react as fast as a), whilst sending server updates only every 500ms, and doing some form of dead-reckoning/predictive movement.

Well, c is what nearly everyone does when they can't afford a, so ... Smiley.

d) mkae everything coarse-grid-based, such that the playuer is only ever on a tile about 1 - 1.5 times his size. Smoothly animate on the client, but only transfer the new tile to the server when it changes. This smooths out most "lets change direciton really fast and be a PITA" behaviour, at the cost that players in game who try to "dance" in front of each other will be deeply unimpressive to onlookers. Many hack-n-slash games do this, because they don't care about the players' desire to "express themselves".

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

Senior Devvie





« Reply #4 - Posted 2004-02-28 15:49:52 »

Smooth like a baby, here too. :-)
Offline nonnus29

Senior Devvie




Giving Java a second chance after ludumdare fiasco


« Reply #5 - Posted 2004-02-28 18:34:58 »

Runs at 29-30 on my machine.  Looks good so far.  I had a c++/allegro demo similar to this plus pathfinding minus networking last year.  The thing that stopped me cold was object management/interactions.  Thats when I started exploring scripting and never really got back to the game.

I'm curious about your command/order protocol.  The system I've played with in scripting is variable length arg events (Obj [] in java) to objects (and the game engine) via a GameObject.doEvent(Object []).  I was thinking something similar to this would work well over a network; event type would be first element of the array.

I'm curious if I'm on the right track here?

Otherwise, the controls responded as I expected; to my knowledge the Baldurs Gate games didn't do the follow-the-mouse-drag movement, they were click and move like yours.
Offline kevglass

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #6 - Posted 2004-02-28 18:48:45 »

I've actually just swapped to keys (which keeping a backup of the old stuff Smiley). Somehow keys feels much more natural for this. The inventory is going to use mouse I guess.

The chat might be slightly annoying because of the key controls.


Nonnus, I'm not quite sure I get what you were doing before. I've not got as far as the scripting, I guess the scripting will all be handled by the server, so shouldn't cause to many problems.

The actual movement was done on an Order basis initially. The user takes an action and this fires off an order to the server. The server responds by telling you that your character should start the order.

Kev

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #7 - Posted 2004-02-28 19:13:29 »

Quote
I've actually just swapped to keys (which keeping a backup of the old stuff Smiley). Somehow keys feels much more natural for this. The inventory is going to use mouse I guess.

The chat might be slightly annoying because of the key controls.


Depends on both the audience and the style of game. If you want chat to feature quite strongly (e.g. everquest amounts) then you should make a UI where people can type on the keyboard at any time without pressing a special key first. This will make a very large and obvious difference to socialization within the game (nb: personally I'd make it one of a couple of controller configs, so people who chat rarely can instead have their keybaord full of one-key shortcuts, along with the standard "hit enter to go into chat mode until the next press of enter" paradigm).

W.r.t. mouse vs keyboard you will get a lot more players if you offer a very simple and obvious mouse-based UI. In a perfect world, I'd make the mouse UI the default, with easy instructions in the first few minutes of the game tutorial area on how to change to a cursorkeys-based UI (and that chat-centred UI as a 3rd option). This will turn off the fewest possible players. So long as they are aware they can make the change, most won't at first (apart from your hardcore players who like to fiddle), but will remember they can later on once they get accustomed to the game.

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

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #8 - Posted 2004-02-28 19:57:27 »

Ok, just uploaded a new version.

* Keyboard controls (cursors)
* Mouse controls - the pointer should really change into an arrow. Essentially wherever the pointer is denotes the movement direction.

This seems to my recolection of how UO worked Smiley

In addition I added the sorting to support moving behind things, although this won't work properly since I don't have collision in yet.

Kev

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #9 - Posted 2004-02-28 21:03:30 »

Quote
Jerky movement? Oh dear, thought I was past the annoying bit. Its smooth as a baby's bottom here. Whats jerking exactly? The scrolling?


When it scrolls, it doesn't move evenly, it seems to go at varying rate. Seems like it's pausing for a couple of frames or so every couple of frames, or something. It's pretty regular, like it's doing 1-1-3-1-1-3 frames per frame or something (e.g. like with missed vsyncs). The pause is too rapid to really work out what I'm seeing Sad

Then I noticed the FPS is 24-27.

malloc will be first against the wall when the revolution comes...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #10 - Posted 2004-02-28 21:05:22 »

PS Ultimas had the arrow get longer and the speed increase based on absolute distance from the player. This is a convenient way of letting people move fast and yet lose fine control at the same time - it's much harder to be agile while running simply because you have to move the mouse much further to effect the same change in direciton.

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

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #11 - Posted 2004-02-29 04:54:24 »

Quote

When it scrolls, it doesn't move evenly, it seems to go at varying rate. Seems like it's pausing for a couple of frames or so every couple of frames, or something. It's pretty regular, like it's doing 1-1-3-1-1-3 frames per frame or something (e.g. like with missed vsyncs). The pause is too rapid to really work out what I'm seeing  

Then I noticed the FPS is 24-27.


Erk, that probably means the demo is exceeding capabilities of your machine.. what spec are you trying it on. The FPS should be stuck on 30.

Kev

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #12 - Posted 2004-02-29 07:21:16 »

Quote


Erk, that probably means the demo is exceeding capabilities of your machine.. what spec are you trying it on. The FPS should be stuck on 30.

Kev


1Ghz P3, 256Mb, Geforce2 (16Mb), linux.

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

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #13 - Posted 2004-02-29 08:01:32 »

Guess this teaches me to use Java2D, I suspect its the implementation on Linux.

Time to use J2DA to make it work via OpenGL or Java2D Smiley

EDIT: Actually, maybe not. What JVM are you running and are you one of the folks thats got 1.5 up and running? If so could you try it on 1.5, apparantly thats got OpenGL support for Java2D.

Kev

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #14 - Posted 2004-02-29 08:07:22 »

Quote

EDIT: Actually, maybe not. What JVM are you running and are you one of the folks thats got 1.5 up and running? If so could you try it on 1.5, apparantly thats got OpenGL support for Java2D.
Kev


I don't use the beta JVM's, but we're about to use them at work ( want to do "-source 1.5 -target 1.4" if it works, assuming that javac is much more stable than the rest of the JVM). When this happens I'll retest and tell you the differences (side by side).

EDIT: just noticed that to run java 1.5 in your browser, if you have SuSe linux Sun requires that you are running Mozilla 8.1 (looks like SuSe users have a few decades to wait... Wink)

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

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #15 - Posted 2004-02-29 08:25:10 »

Just booted into linux and run it here (Gentoo, GF4), using blackdown's 1.4.1 java (default one I appear to have) I'm getting fps of 800+ (since I took the limit out in the latest version). Could you try the current version and see if your frame rate is still <30?

Are you running linux without nvidia drivers? Wink

Kev

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #16 - Posted 2004-02-29 09:23:06 »

Quote
Just booted into linux and run it here (Gentoo, GF4), using blackdown's 1.4.1 java (default one I appear to have) I'm getting fps of 800+ (since I took the limit out in the latest version). Could you try the current version and see if your frame rate is still <30?


Reported fps: 250 to 270
Actual fps: 0.25 (or less...that's just an estimate)

Quote

Are you running linux without nvidia drivers? Wink
Kev


! Nope, there *are* only nv drivers for this geforce (laptop version).

PS do you know how to change which JVM JWS is using? I *cannot* overwrite my system JVM with a beta VM (because I have to use this for work...). Appletviewer is very easy - it's just a symbolic link in the plugins directory (which in my case now points to *another* symbolic link for "my current preferred JVM's directory", which works perfectly Smiley. I can swap between 1.4.2 and 1.5.beta just by changing the JVM directory link; everything updates except JWS, but that was installed automatically and I have no idea where or what it's config is Sad ).

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

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #17 - Posted 2004-02-29 09:31:20 »

No idea I'm afraid, I've just installed a jre and its brought a new webstart along with it... so I guess you get a new javaws directory per jvm Sad

Shouldn't worry about installing the 1.5 VM for this. If you manging to get a FPS count reported of 250+ then there is something more basic wrong.. wonder if it could be to do with the threading model difference between windows and linux. Not sure, but its most likely due to current running the server as another thread.

I'll stick a yield in the server thread aswell, see if that helps. I thought sleepUntil() in gagetimer did this but maybe not.

However, getting 250+ fps is a good sign Smiley

Kev

EDIT:
PS. Did the scrolling get any better with the fps reported higher?

Offline AndersDahlberg

Junior Devvie





« Reply #18 - Posted 2004-02-29 09:55:58 »

Regarding nv versus nvidia drivers for Linux,
if you have
1  
Driver      "nv"

in your /etc/X11/XF86Config file you're using "software" drivers, if you instead have downloaded and installed binary hardware drivers from www.nvidia.com the above should instead read:
1  
Driver    "nvidia"


Just a heads up in case you're using "default" nv drivers supplied with the operating systems (รก la microsofts default soft opengl drivers)
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #19 - Posted 2004-02-29 11:48:16 »

The WebStart app launcher has settings for what JREs Web Start will use.

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #20 - Posted 2004-02-29 11:59:48 »

Quote
The WebStart app launcher has settings for what JREs Web Start will use.


Thanks; once I'd found the executable I sorted it.

FYI things were about ten times worse with 1.5 beta - far far more choppy and jerky, fps jumped from 1 to 55 to 255 to 55 and all over the place, perceived fps was 1 frame every 5 seconds or so, sometimes lots a second, then back to every couple of seconds.

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

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #21 - Posted 2004-02-29 12:33:31 »

Report the bug - give them the app so they can see for themselves.  Catch it while 1.5 is still in beta.

Offline kevglass

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #22 - Posted 2004-02-29 12:50:37 »

Report that the beta is slow?

Kev

PS. I put up a quick website for this, here: http://www.newdawnsoftware.com/miniad/

Offline kevglass

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #23 - Posted 2004-02-29 18:50:10 »

Added a simple chat area.

Kev

Offline Java Cool Dude

Senior Devvie




Java forever


« Reply #24 - Posted 2004-02-29 18:56:50 »

~1950 fps
w00t
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #25 - Posted 2004-02-29 23:30:41 »

Quote
Report that the beta is slow?

Absolutely.  I doubt serious performance regressions are acceptable to Sun, if they can be avoided.   But if nobody complains they may not realize it until it is too late.

Offline kevglass

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #26 - Posted 2004-03-03 05:46:34 »

For those interested, I've uploaded a remote server enabled version. The server supplied should be alive, apologises if not, its on my home machine.

Registration is available from the client.

Kev

Offline kevglass

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #27 - Posted 2004-03-03 19:57:35 »

Latency smoothing and chat enabled,

Kev

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #28 - Posted 2004-03-03 20:09:52 »

20 fps w00t :/

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #29 - Posted 2004-03-03 20:10:46 »

uhh, but other than that minor  Roll Eyes issue - it's looking good

Pages: [1] 2 3 ... 5
  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.

trollwarrior1 (22 views)
2014-11-22 12:13:56

xFryIx (69 views)
2014-11-13 12:34:49

digdugdiggy (48 views)
2014-11-12 21:11:50

digdugdiggy (42 views)
2014-11-12 21:10:15

digdugdiggy (36 views)
2014-11-12 21:09:33

kovacsa (60 views)
2014-11-07 19:57:14

TehJavaDev (63 views)
2014-11-03 22:04:50

BurntPizza (61 views)
2014-11-03 18:54:52

moogie (76 views)
2014-11-03 06:22:04

CopyableCougar4 (77 views)
2014-11-01 23:36:41
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!