Author Topic: kind of brain storming  (Read 19543 times)

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
kind of brain storming
« on: February 16, 2005, 01:52:27 am »
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.

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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
kind of brain storming
« Reply #1 on: February 16, 2005, 05:27:42 pm »
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.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
kind of brain storming
« Reply #2 on: February 17, 2005, 01:37:28 am »
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
Code: [Select]
r a f t

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
kind of brain storming
« Reply #3 on: February 17, 2005, 05:55:14 am »
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.

Code: [Select]
r a f t

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
Hola
« Reply #4 on: February 17, 2005, 06:37:05 pm »
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.

Code: [Select]

class Map implements Serializable{
Vector players;
}

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

String modelName;
String textureName;
}

Regards,
Andrei

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
kind of brain storming
« Reply #5 on: February 17, 2005, 11:56:37 pm »
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

Code: [Select]
r a f t

Anonymous

  • Guest
kind of brain storming
« Reply #6 on: March 06, 2005, 09:16:15 pm »
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

Code: [Select]
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

Offline rolz

  • float
  • ****
  • Posts: 280
  • Technocrat
    • View Profile
!
« Reply #7 on: March 07, 2005, 08:49:18 am »
Wow looks interesting !
Regards,
Andrei

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
kind of brain storming
« Reply #8 on: March 07, 2005, 06:32:18 pm »
Is it supposed to show a single plane only? Or am i doing something wrong?

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
kind of brain storming
« Reply #9 on: March 24, 2005, 01:27:28 am »
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
Code: [Select]
r a f t
and whay dont they embed jpct in it ;-)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
kind of brain storming
« Reply #10 on: March 24, 2005, 10:24:41 am »
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...

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
kind of brain storming
« Reply #11 on: March 24, 2005, 04:01:02 pm »
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 ?
Code: [Select]
r a f t

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
kind of brain storming
« Reply #12 on: March 24, 2005, 04:25:57 pm »
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.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
kind of brain storming
« Reply #13 on: March 24, 2005, 04:47:01 pm »
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

Code: [Select]
r a f t

Anonymous

  • Guest
kind of brain storming
« Reply #14 on: April 18, 2005, 10:26:08 pm »
very interesting...

[edit: Removed spam...]