Main Menu

kind of brain storming

Started by raft, February 16, 2005, 01:52:27 AM

Previous topic - Next topic

raft

hi,

as a dreamer i am trying to develop a chat system in which you may move around. maybe kind of virtual reality system at very very later phases..

well, after toying with jpct and with helge's valuable helps i am not that far from moving in a 3d world and animating characters according to their state. (walking, dancing etc)

here is what i have: a world description with node groups and nodes as leafs. users and world entities (items etc) can only exist in a node. i assumed nodes as parts (mostly rooms) of a building and node groups as buildings.

to minimize network traffic and hence to increase speed, clients are loaded with users' starting node group and its current state (user positions etc). any movement from node to node (in same group) generates a user moved event to user and a one moved event to users of that node group. moving among node groups requires loading of new group and state. (just like switching levels in an fps)

the idea behind this was to optimize network traffic (download size and game speed). downloading and generating event for all of the world both increases the initial download size and event broadcasting amount.

the mechanism is grounded on this: part of world is serialized to client at the beginning and it is reconstructed identical to server's one at client side as need arrives. (moves at node group or jump from group to group)

i planned all that with the idea of no real time graphics: with at most a static image of the node user is in.

now with a desire to fit graphics to it, i am looking for the best way to integrate it with jpct.

one idea is to map karga's nodes to a jpct world and make no change in karga's node definition. genarate 'user moved in node' events and send them to users of that node.

or use octree nodes or portal sectors mapped to karga nodes (this seems harder to implement. by the way, is there any way to define portals in 3dmax, without the need to define portals externally with exact coordinates ?) of course genarate 'user moved in node' events is necessary again.

or is there a way to define nodes as floating but not static. (position in 3d space with a radius etc.) and still generate user moved events ?

another main problem is either to make it fps like (camera at user's eye) or not (camera around user. adjusting itself's position according to user's position in the current scene)

this way or other it comes to problem of network speed and latency. like fps, we need to broadcast every keystroke of user (maybe some optimization is possible) to clients. with outer camera (movement with mouse clicks to destination) it can be implemented with sending only destination point. (say you are moving from one side to other side of a room, like fps it requires lots of movement events (key strokes) to be broadcasted, with outer camera only one event: destination point). does anyone imagine any user friendly way to move with mouse clicks while looking from user's eyes ?

trying to look rationally it seems to chose outer camera and movement with mouse clicks as far more reasonable. but i really wanna it like to be a first person shooter. i am asking myself contsantly, which is the point of optimal trade off ?

well thats are the main questions to answer before going any further. i am open to and in fact looking for any smart and/or efficient ideas.

r a f t
maybe it's best to try both and see what   :?:

EgonOlsen

Whatever you do: Don't consider to use portals for it. It's a real pain to place them and support for them, while still being in jPCT, hasn't been tested for a long time now. Simply because nobody (including me) uses them. If you want spatial subdivision, use octrees. They are much easier to handle.
Concerning the rest of your post, maybe you should ask rolz about these things. He has a cool server based multiplayer game in the works. Check it out in the projects section of this board (if you haven't already). It's called technopolis.

Quote
trying to look rationally it seems to chose outer camera and movement with mouse clicks as far more reasonable.
I think that too. Making this in first person would most likely look and feel very sluggish.

raft

no, stupid enough i didnt have a look at projects page at forum. only at jpct home page

there seems to be a hidden treasure there  :D
r a f t

raft

i have a two roomed world (each an object3d) with a door or tunnel combining the two rooms. i created an octree from each, assigned the octree to room and turned on collision detection for octree.

i assumed while going through the door a collision will be detected. but it didnt. why ? or doesnt it work that way ? if there isnt a polygon there, you cannot collide it.

if so, how can i implement such a door mechanism. i want to be notified when something passes there but i dont want that something changes its movement.

can i disable camera/object sliding in case of a collision ? in both ways: it shouldnt slide but stop and it will go into collision target.

r a f t

rolz

Hey raft,

The general idea about optimizing server performance and network throughtput is in keeping server-side objects as much lightweight as possible.

I'd suggest to start with a simple model and add features as required.


class Map implements Serializable{
Vector players;
}

class Player implements Serializable {
String name;
Point location;
float rotation;

String modelName;
String textureName;
}

Regards,
Andrei

raft

hi rolz,

it is so basic that impossible to object your suggestion. however i had already implemented the node and move mechanism mentioned above. and a couple of things more depending on nodes.

so i am looking for a way to fit graphics into it. with minimum amount of change if possible

r a f t

Anonymous

one may find an early prototype at http://www.aptalkarga.com/applet2.html

user movements are broadcasted to clients and animated. movements are sent with a period of 5 seconds, resulting in an average delay of 2.5 seconds (high by purpose at the moment to ease testing)

just select a login name and check 'guest login'. pull down that messy stuff and face with lovely jpct  8)

best seen with two or more clients logged in

r a f t
requires tiger (java 1.5) at the moment but i'll take it back to 1.4.x later
many thx helge

rolz

Wow looks interesting !
Regards,
Andrei

EgonOlsen

Is it supposed to show a single plane only? Or am i doing something wrong?

raft

oops, somehow forum engine didnt notify me about posts..

to test basics a plane is not that bad i guess, and on a celeron 500 box like mine it is almost necessary  8)

it almost lost its meaning to get karga back to java 1.4.x since sun updated getjava page to 1.5. to tell the truth i am quite unhappy with download size of java5. maybe its time for sun to make partial-java versions with desired packages only. afterall it is not the jvm but all that huge library packages that make java5 so download unfriendly
r a f t
and whay dont they embed jpct in it ;-)

EgonOlsen

Quote from: "raft"it almost lost its meaning to get karga back to java 1.4.x since sun updated getjava page to 1.5. to tell the truth i am quite unhappy with download size of java5. maybe its time for sun to make partial-java versions with desired packages only. afterall it is not the jvm but all that huge library packages that make java5 so download unfriendly
It's not so much about what to download but what you already have IMHO. People are still using 1.4.x a lot. May it be because they can't update or because they won't for whatever reason. And there is still no Java5 for Mac, or is there?
The problem with a partial download/distribution of Java is, that SUN's license doesn't permit that. That's making the distribution of the JRE together with your application unnecessary difficult. For Paradroidz, i made a version that includes the 1.4.2 JRE. With CAB-compression, i'm down to 15MB but it doesn't get any smaller than this, because you are not allowed to remove unneeded things from the JRE...annoying...

raft

Quote from: "EgonOlsen"And there is still no Java5 for Mac, or is there?
is this true ? i didnt know that. sounds really strange

Quote from: "EgonOlsen"The problem with a partial download/distribution of Java is, that SUN's license doesn't permit that
did you get me wrong ? i meant sun should prepare such custom java bundles. it shouldnt be that hard for them to break core packages into many pieces with a dependency mechanism similar to linux packages

for rest, i think similar. even if you manage to make a smaller bundle with its own jre, most possibly people wont like the idea of installing a plugin from an unknown author

supporting other platforms is another pain of course. i never used a mac for instance. i found it very unlikely that even an experienced developer has used all three major platforms (win/unix/mac) and afterall isnt java for getting rid of platform specific stuff ?
r a f t

EgonOlsen

Quote from: "raft"is this true ? i didnt know that. sounds really strange
All i know is, that there were none by the end of the year 04 and i'm unable to find information about the current state of it. Don't know if this is good or bad...

Quote from: "raft"did you get me wrong ? i meant sun should prepare such custom java bundles. it shouldnt be that hard for them to break core packages into many pieces with a dependency mechanism similar to linux packages
No, i didn't get you wrong. What i meant was that if SUN's license doesn't permit it now, i don't think that they'll do this themselfs in the future. I think that the idea is, that a complete JRE ensures that every Java application will work with it, while a stripped down JRE wouldn't and that people would blame that on SUN or Java and not on the JRE.

Quote from: "raft"
for rest, i think similar. even if you manage to make a smaller bundle with its own jre, most possibly people wont like the idea of installing a plugin from an unknown author
They don't have to. The JRE works without any installation. My Paradroidz archive contains a jre-directory from where the VM is started and that's it. At least for Windows...
It's not a problem for MACs because they already have Java installed. And for Linux, well...most distributions should contain it too, and if they don't...i think that Linux user's are more used to change their system to get things working compared to Windows, so maybe it's not too much of a problem.

raft

Quote from: "EgonOlsen"What i meant was that if SUN's license doesn't permit it now, i don't think that they'll do this themselfs in the future.
i still couldnt get it ? is sun restricting himself with his own license ?

Quote from: "EgonOlsen"I think that the idea is, that a complete JRE ensures that every Java application will work with it, while a stripped down JRE wouldn't and that people would blame that on SUN or Java and not on the JRE
well, this may be the case if you use any extension packages like mail etc. java5 is quite huge but still doesnt and cant include all core (java, javax) packages

Quote from: "EgonOlsen"They don't have to. The JRE works without any installation. My Paradroidz archive contains a jre-directory from where the VM is started and that's it. At least for Windows...
paradroidz is a standalone application, i was mainly talking about applets

Quote from: "EgonOlsen"i think that Linux user's are more used to change their system to get things working compared to Windows, so maybe it's not too much of a problem.
quite true. i found a linux user closer to a developer than to an ordinary user

r a f t

Anonymous

very interesting...

[edit: Removed spam...]