Started Coding

The land-based version of Allegiance, under construction.
Imperio59
Posts: 27
Joined: Thu Aug 19, 2004 7:00 am

Post 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...
Last edited by Imperio59 on Sat May 23, 2009 4:12 am, edited 1 time in total.
Imperio59
Posts: 27
Joined: Thu Aug 19, 2004 7:00 am

Post by Imperio59 »

Follow me on twitter, my nickname is imperio59. I'll try to keep it updated as I work on the server code.
badpazzword
Posts: 3626
Joined: Thu Jan 12, 2006 8:00 am
Contact:

Post 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.
Have gaming questions? Get expert answers! Image Image
Imperio59
Posts: 27
Joined: Thu Aug 19, 2004 7:00 am

Post 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.
Imperio59
Posts: 27
Joined: Thu Aug 19, 2004 7:00 am

Post 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.
badpazzword
Posts: 3626
Joined: Thu Jan 12, 2006 8:00 am
Contact:

Post 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.)
Last edited by badpazzword on Sun May 24, 2009 2:47 pm, edited 1 time in total.
Have gaming questions? Get expert answers! Image Image
Imperio59
Posts: 27
Joined: Thu Aug 19, 2004 7:00 am

Post 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 ;)
badpazzword
Posts: 3626
Joined: Thu Jan 12, 2006 8:00 am
Contact:

Post by badpazzword »

myLogger.doStuff(foo, bar) → Logger.doStuff(myLogger, foo, bar) # 3 parameters

:)
Have gaming questions? Get expert answers! Image Image
Imperio59
Posts: 27
Joined: Thu Aug 19, 2004 7:00 am

Post 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.
finnbryant
Posts: 360
Joined: Sat Feb 17, 2007 11:18 am
Location: England

Post 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.
Last edited by finnbryant on Tue May 26, 2009 6:39 pm, edited 1 time in total.
Post Reply