Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 06 May 2009
Offline Last Active Apr 25 2013 10:51 AM

Topics I've Started

Synchronizing physics, when physics is ran client-side?

24 April 2013 - 06:45 AM

I'm developing a web-based networked game using HTML5 and Box2D as physics engine.

The network communication is by Web Sockets.


Player A can spawn objects in the world, while Player B controlls an actor that can interact with them (jumping on them and such).


But here's the problem I've come across:

How do I synchronize the spawning objects from Player A, to Player B?


I mean. Imagine if Player B is running across the screen, and Player A spawns an object that is falling to the ground.

Now, due to the latency, the actor is running a bit behind on Player A's screen, and therefore, the spawning object might collide with the actor on Player A's screen. But in reality, the actor on Player B's screen have already run pass that point, and therefore, no collission.


It's a very basic game, but now I just realized I'm stuck and don't know how to solve it really.


I guess I have to do something with the server.

At the moment, the server only relays the messages between the clients, no physics or so is ran at the server-side. All physics is on client-side.


Thanks in advance! :-)

[python] Voice-communication in python?

11 June 2010 - 11:51 PM

I'm currently in a project where I need to write a VoIP program like Ventrilo/Teamspeak/Mumble. I'm very familiar with python and I really like it and it would be great if I could use that as my language to develop it.

But the question is.
Is there a good idea? To use python I mean.

Second, do you know any good library for manage audio in/out and encoding?

I've found THIS speex-wrapper and also found pyAudio to be a good wrapper of PortAudio, also pyMedia has got some nice features, such as mux/demuxer.

But I don't know if it's a good idea, so I want to hear your tips/ideas/feedbacks!

Thank you in advance!

[python] Encode a pyAudio stream?

09 June 2010 - 01:52 AM

Hello folks!
I'm writing a small VoIP chatprogram in python an Im stuck with some problems.

First of all im using pyAudio which is a PortAudio wrapper for python (if you didn't know). I'm currently reading chunks with the size of 2048 of the stream, and I wan't to send those over the network.

Then I found this speex-wrapper for python (yay). BUT. There's a problem. Speex seems only to be able to encode 320 bytes of data at time?? Therefore, if I want to use speex, I have to chunk up my data in the size of 320 bytes, and that will clog up my audio-buffer.

Because i've tried to encode chunks of 2048 in size, but speex only encodes a tiny bit of it and the sound gets all wierd and so. But maybe there's just a bad wrapper? It's found over here: http://www.voicechatter.org/forum/viewtopic.php?f=10&t=563 (random hax since the original pyspeex os outdated).

SO I'm looking for a way to encode my audiostream to be able to send it over the network!

Thanks in advance! (:

Feedback on my new VST's and sample

31 January 2010 - 01:51 AM

Yo! A friend of mine is currently working on a MMORPG and I was asked to write the score (or music w/e you wanna call it) for his game, so I sat down and played around a little. The result is this: http://www.box.net/shared/xex7jucx8x Took me like three hours in total to make. But it's mostly a test, not really a complete track, but I just wan't to hear your oppinions on it? I wanted to create a kind of "mystic" feeling, and I like to think of a cold landscape with lots of mountains and snow when this sort of music is being played (lol). As in Dun Morogh if you've ever played World Of Warcraft...

[PYTHON] Threading help!

25 January 2010 - 12:19 AM

Hi! I'm having some issues with threading, I'm not really sure how to implement it, take a look at this sample code:
from threading import Thread

class Test(Thread):
        def __init__(self):

	def main(self):
		# This is my main-function
		while 1:
			# It's in this loop my actual program runs.

The "problem" is how I start the thread and execute the main() function inside the class, I don't really understand how I should do it to make it work. You see this class is only one piece of my program, I want this main() function to be run in a separate thread. Thank you in advance! :) [Use source tags to format code. -Zahlman]