Show Posts
|
|
Pages: [1]
|
|
1
|
Game Development / Newbie & Debugging Questions / Roundbased design
|
on: 2005-03-14 11:43:30
|
|
Hello folks,
i m trying to implement a roundbase game, but i have no idea how to design it and have the controll over the rounds etc.
The input of the player is done via a swing panel. A player object is set to the swing-panel and so it can controll the model which is referenced in the player object.
When the shot button is pressed by the player the panel tells the gameManeger that it is the next player's turn. When there is no next player the next round is startet and it is player's 1 turn.
so far so good.
But how can i do with ki-players? They dont press a button to tell that they are finished.
Can i do something with events? and when i could use events, how should i send, process the events? Who gather the events and who shuld send the events?
Confused greetings, b0LbiT
|
|
|
|
|
2
|
Game Development / Networking & Multiplayer / Re: What about ObjectStreams...
|
on: 2004-10-22 09:35:13
|
|
OK... i keep on working with ObjectStreams
Now i have "only" to solve the problem with the relation between serverlocated SpriteModels ans clientlocated SpriteViews ...
It would be great when you could write somthing to that problem when you have some time.
Thanks in advanced.
|
|
|
|
|
3
|
Game Development / Networking & Multiplayer / Re: What about ObjectStreams...
|
on: 2004-10-22 05:47:23
|
A WorldStatus with some Objects in it ... approx. 10 is about 1,10KB is this big, small OK... i have no experieces with that stuff one problem you may run into however is that you "wire" objects must synchronized between client and server.
This is my problem. I have no synchronization between Objects, because i can't gat any relation between objects on the server and objects on the client. in the world status there are infoemation about the sprites stored. e.g. position. with these inofs from the server about the sprites, the client can draw the sprietes, but in don t have a ship 1 on the client for ship 1 on the server.... So i always have to send the hole world also when nothing has changed
|
|
|
|
|
4
|
Game Development / Networking & Multiplayer / What about ObjectStreams...
|
on: 2004-10-21 08:55:24
|
|
Hi folks...
i have finished my fisrct basic Network code and would like you to have a look on it.
First question: I'm using Oject Streams for the communication between clients and server. Is the use of this streams much less performant as DataStreams?
Question two: i have written a small space simulator where spaceships can fight each other. I realise the synchronization between server World and client world as follow:
The server world has a mainloop. in the loop the server do the following: - sync the time - update all sprites - check collison - sends worldstatus
The world status is a WorldData Object which contains the position, velocity, color and some more attributes (e.g. name, enrgie are optional) continously to all clients. The World state is timestampted
The clients recieve the data and store them. in the mainloop, the clients do the following: - calculate the lag (timestamp of World - current time) - update the world status with the lag (it s a simple interpolation based on the velocity of each sprite) - check player controlls and send them to server (each controll is a simple object) - paint the world
What could i optimize? Is this strategie acceptable?
Question 3: I have problems to connect the modells of my sprites which are flieng around in the werver world with my SpriteViews, which should be managed on the client. i can't assign the model on the server to the view on the client.
To solve this i implemented a little Renderer, which decide based on a casting, weather to paint a ship or ah shot (e.g.) But i don t have a view fpr each sprite on the client.. I hope you can understand my problem. if i could implement a connection betwwen a server model and a client view, i would be able to reduce the data, which is neccesarry to draw the Sprite. (e.g. playername, color)
I hope someone can help me here.
Thanks in advanced
|
|
|
|
|
5
|
Game Development / Networking & Multiplayer / Re: How to start a network support...
|
on: 2004-10-18 13:38:19
|
|
OK... i m ready with my basics
my server stores the models and braodcast all 15ms the world status to all clients...
the clients recieve these data and draws the world. Also they grap all keyPressed & Keyreleased Data and sends them in a proper way to the server.
in LAN it works with a lag of 30 ms....
tonight my gamecore will have a try in the internet...
Just because i m interesting: is RMI a performant way to do a client-server communication?
This would have the advantage that messages shouldnt't be generatet by client and parsed by server.
|
|
|
|
|
6
|
Game Development / Networking & Multiplayer / How to start a network support...
|
on: 2004-10-12 10:58:59
|
|
Hi folks,
i 'm trying to implement my first game and i have the physics ready.
now i want to add network support, but i don t know how to do it.
As short info: Its a 2D Game. In this game there are 2 (or more) spaceships, which fight against each other.
I have difficulties to get an idea how to synchronize my world on the diffrent clients.
perhaps anyone of you can give me some advises.
A Spaceship has a position, a velocity, a orientation and an image which displays the ship.
If you need more information, don't worry to ask :-)
Thanks in advanced
|
|
|
|
|
10
|
Java Game APIs & Engines / Xith3D Forums / Problems with Sprite3D?
|
on: 2004-05-05 19:53:02
|
Hello, i want to write a sprite3D class, wich has the basic features of moving. But i have several Problems which i can t solve on my own  Here is my code: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
| package de.TWOmas.xith.sprite;
import java.text.DecimalFormat;
import javax.vecmath.Point3d; import javax.vecmath.Tuple3f; import javax.vecmath.Vector3f;
import com.xith3d.scenegraph.Switch; import com.xith3d.scenegraph.Transform3D; import com.xith3d.scenegraph.TransformGroup;
public class Sprite3D { private Vector3f posVec = new Vector3f(0,0,0); private Vector3f directionVec; private Vector3f strafeVec; private Vector3f upVec = new Vector3f(0,1,0); private float spriteSpeed = 10; private TransformGroup transformGroup; private Transform3D transform = new Transform3D(); private Transform3D tmpTransform = new Transform3D(); public Sprite3D(TransformGroup transformGroup, Vector3f direction) { this.transformGroup = transformGroup; transformGroup.getTransform(tmpTransform); tmpTransform.get(posVec); directionVec = direction; } public void move(Vector3f move){ transformGroup.getTransform(transform); tmpTransform.setIdentity(); tmpTransform.setTranslation(move); tmpTransform.scaleTranslation(spriteSpeed); transform.mul(tmpTransform); transformGroup.setTransform(transform); } public void rotXYZ (float x, float y, float z) { transformGroup.getTransform(transform); tmpTransform.setIdentity(); tmpTransform.rotXYZ(x,y,z); transform.mul(tmpTransform); transformGroup.setTransform(transform); } }
|
I don t know, wether this methods work corectly, so plz comment, if u find any trouble. Here are my problems: Must i submit the direction of the sprite in the constructor? I think yes. How should the Class know how the sprite is aligned, right? How do i update my Strafe Vec after rotation? I need them to rot along strafe and direction axis, because my sprites should move in terrain. Thanks for helping...
|
|
|
|
|
12
|
Java Game APIs & Engines / Xith3D Forums / Re: Missing Behaviours in Xith
|
on: 2004-05-04 11:43:52
|
i studied the Xith API and noticed that behavior is implemented. If i m right, i have to extend my own behavior like KeyBehavior like that 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| public class KeyBehavior extends Behavior{ private WakeupCriterion criterion; public void initialize() { criterion = new WakeupCriterion() { public boolean hasTriggered() { return false; } }; wakeupOn(criterion); }
public void processStimulus(Enumeration arg0) { } } |
But how can i define the criterion to be triggerd on a KeyEvent from the Canvas3D? Here i can't fit the things together? Also, because wakupcriterion is an abstract class. What should i implement in WakeupCriterion#hasTriggerd()
|
|
|
|
|
13
|
Java Game APIs & Engines / Xith3D Forums / Missing Behaviours in Xith
|
on: 2004-05-03 12:44:28
|
|
Hello,
i start reading all texts and tutorials referring to Java and 3D.
And because of the simmilarity of Java 3D and Xith i often could use the stuff from Java 3D in my Xith tests.
I also read somthing about behaviours implemented in the Java 3D API. I think it's a nice way to control the objects and miss it in the Xith API.
Is behaviour going to be implemented?
And somthing else: In Java 3D it s possible to place a Canvas3D in a JFrame. Why couldn't I do this in Xith? :-/
Thanks for help
Greetz Thomas
|
|
|
|
|
15
|
Java Game APIs & Engines / Xith3D Forums / Re: with which programm can i create ASE?
|
on: 2004-04-30 10:34:42
|
|
OK, i createt my Model with Wing 3D. I think this tool is the most convenient one, esecially for beginners.
Now i export my Model as 3ds and obj file.
But how can i load it into my xith application? And how can i load each individuall group as note?
I only can group the diffrent Parts in Wing3D but i can t build a real hierachy.
Should it be better, to build the models in an other tool to built up the dependencies of the single parts?
Thanks for help
|
|
|
|
|
17
|
Java Game APIs & Engines / Xith3D Forums / Creating large random landsapes with Hills?
|
on: 2004-04-29 17:37:25
|
|
Hi community,
i have finished my first steps in 3D programming and want now to create a large random landscape.
This landscape should be changeable. For Example, when there is an explosion, this should lower the land at this point.
It schould be a landscape with hills. But i have no idea, how to do this. Do you know any links? Do you have any suggestions?
Thanks fpr tips and help
|
|
|
|
|
18
|
Java Game APIs & Engines / Xith3D Forums / with which programm can i create ASE?
|
on: 2004-04-29 17:34:08
|
|
Hello,
i m quit new to the 3D Business and startet my first programms with Xith.
Now i want to create my own models, but i don t know which Programm can export models as ASE.
I read about 3D Studio Max but it s far too expensive for me.
Is there a cheaper or free alternative? i downloaded g max, but this can only export plasma (*.p3d).
Thanks fpr help and tips.
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|