Page 9 of 11

Posted: Sat May 23, 2009 3:58 am
by Imperio59
Hmm, what about using JME www.jmonkeyengine.com . It seems like a pretty robust engine! And if we really want scripting for it we can use Jython...

http://www.youtube.com/watch?v=_CC7eFIzQi4 is a demo of the engine.

The reason why I'd really like Java is because of the pain it is to have to do 2 builds for 'nux and windows on a server written in C++ and the headaches it brings. /me dislikes compiler troubles.

To be honest, even if we do go ahead and use Panda, we can still have a server in Java. I'll just have to write ports of the code to import the scene graphs and model data...

EDIT: Yea, scrap the JME, doesn't look as easy as I thought. I say we go ahead and use Panda. I'll rewrite whatever code for the server is needed...

Posted: Sat May 23, 2009 5:26 am
by Imperio59
Follow me on twitter, my nickname is imperio59. I'll try to keep it updated as I work on the server code.

Posted: Sat May 23, 2009 7:50 am
by badpazzword
Erm... may I remind you that PHP is "scripted" too? It's what the frikkin' Mediawiki runs on ;)

As for Python powered websites, you may want to look at everything django, EVE Online, etc.

Posted: Sat May 23, 2009 2:23 pm
by Imperio59
There's a difference between a website where users won't mind the .1 or .05 seconds it takes extra to parse and interpret the code to show you the page, and a large Game server where you have to hold 128 users simultaneously without any lag whatesoever.

I'm not saying it's not possible, just that you will never have the same performance.

Still, looking at it, I think I'm gonna have to write the server engine in python, just because it would be so much work to have to rewrite everything from scratch in java to match the panda engine... It'd be like rewriting half the engine.

Posted: Sun May 24, 2009 2:39 pm
by Imperio59
Hmm, Python is driving me half-nuts trying to write a simple class for Logging to a file. I might just turn around and go back to Java if it keeps being such a pain.

Posted: Sun May 24, 2009 2:43 pm
by badpazzword
You mean something roughly like this? :P

CODE
class Logger:

def __init__(self, filename = sys.stderr):
self.file = open(filename, "a") #a'ppend

def log(message):
self.file.write(message + "\n")

def __del__(self):
self.file.close()

myLogger = Logger()
myLogger.log("Does this work?")
# del myLogger #not needed, Python will collect and close the file automagically :)


(Typed in notepad. Untested. Might be wrong on the names.)

Posted: Mon May 25, 2009 12:35 am
by Imperio59
Great, now if only my code wouldn't tell me the log function took 3 parameters when it only takes 2, that'd be great ;)

Posted: Mon May 25, 2009 5:26 am
by badpazzword
myLogger.doStuff(foo, bar) → Logger.doStuff(myLogger, foo, bar) # 3 parameters

:)

Posted: Mon May 25, 2009 6:49 am
by Imperio59
Python is weird :P
I've started looking at writing an importer in Java for .egg files. It doesn't seem like too much work, but importing BAM files (compiled models) might be a bit more frustrating.

Posted: Tue May 26, 2009 6:37 pm
by finnbryant
wow... you've been busy.

I really recommend that you use the panda engine, not using it would entail an endless line of continuous problems trying to replicate it. unfortunately that means that you need to use c++ or python. You have some legitimate concerns about the python speed server-side.

I think the best way to go would be to write the server in python at first, this would mean that we may only be able to allow 16 people-per server at first, but since we're expecting a limited beta, that isn't such an issue. Then we can run some tests to find out what code blocks everything and rewrite those parts in c++, we can deal with the compiling problems then.

python is only different, once you "get" it, its really not that odd.