SC4 Devotion Forum Archives

Other City-Building Games => Other games => [Archived] CityMania - Open Source Sim City => Topic started by: croxis on October 26, 2009, 03:03:24 PM

Title: Client Engine
Post by: croxis on October 26, 2009, 03:03:24 PM
What engine to use? My ideal solution is to stick with Python or C/C++ for portability reasons. While I am told C# is easy to program with it is very windows centric and I would like linux/mac/win compatibility.  Mods are welcome to fill this out as well

Engine Choices:
Panda (http://www.panda3d.org)
Python and C++ (like our server application).
Licence: BSD
Advantages: Actively developed by corporation/university/community. Python for fast development and C for speed. Full game engine (sound, ui, etc). Other useful utilities like 3d web plugin (play game at work via web browser? :P)
Disadvantages: Some features (web plugin, dynamic shadows) in cvs but not yet in release version. Engine I used before so I am biased :P


The following are 3D engines only, but have an assortment of addons to make it a complete engine.

OGRE (http://www.ogre3d.org/)
Licence: LGPL
C++
Advantages: Popular so lot of extensions and addons
Disadvantages: 3D engine only

Irrlicht (http://www.irrlicht3d.org/)
Licence: Modified zlib/libpng
C++
Advantages: Lightweight, simplicity.
Disadvantages: 3D engine only.
Title: Re: Client Engine
Post by: Nique on October 26, 2009, 05:51:11 PM
Panda

but i need to do some research on c++/python
Title: Re: Client Engine
Post by: tomkeus on October 26, 2009, 06:16:43 PM
I like Irrlicht for its small size and simplicity, but Panda also looks good.
Title: Re: Client Engine
Post by: croxis on October 26, 2009, 08:48:01 PM
I only used panda, so please let me know of pros and cons of ogre or irrlicht or another foss engine.
Also updated with licence type.
Title: Re: Client Engine
Post by: Sartoris on October 26, 2009, 08:59:15 PM
Might want to add some audio libraries to complement the 3d engines.

SDL_mixer
OpenAL
...
Title: Re: Client Engine
Post by: Nique on October 27, 2009, 01:28:04 AM
irrlicht has irrKlang for audio (3d audio)
Title: Re: Client Engine
Post by: Nique on October 27, 2009, 07:57:32 PM
CityMania (Irrlicht Test) Client (nothing special, it uses OPENGL, i can't compile for linux (yet!)),

wrote it in C++  ;D

(little stupid build for windows users only)
http://www.megaupload.com/?d=PZN99S3P

for source see attachements.

My next TEST will be with PANDA3d
Title: Re: Client Engine
Post by: croxis on October 27, 2009, 09:07:06 PM
If you don't have a linux install and don't want to mess with partitions, you can try using Wubi (http://wubi-installer.org/).
I also have my panda client in my github repo as well if you wanted that reference.
Title: Re: Client Engine
Post by: Nique on October 28, 2009, 05:45:46 AM
I have a ubuntu server next to me. But i dont know how to compile these things in there  ;D
Title: Re: Client Engine
Post by: tomkeus on October 28, 2009, 06:07:49 AM
OK, I took a peek at Panda's abilities to draw lines, circles and other vector graphics I need for construction layer and I think I'll go with Panda. If we settle on Panda, I'll port my demo app to Panda.
Title: Re: Client Engine
Post by: Nique on October 28, 2009, 06:56:06 AM
Panda3d is hard for me. If someone knows some tuts/documentation about it to learn.. please.. tell me.
Title: Re: Client Engine
Post by: tomkeus on October 28, 2009, 07:23:04 AM
Quote from: Nique on October 28, 2009, 06:56:06 AM
Panda3d is hard for me. If someone knows some tuts/documentation about it to learn.. please.. tell me.

I don't know anything more than you about Panda, but that's no problem, take a look at Panda's website, there is wealth of material there.
Title: Re: Client Engine
Post by: croxis on October 28, 2009, 09:35:21 AM
I've used it before (the python side of things at least) so I can try and answer any questions on that. The manual and reference page are great resources, as is their forums. They also have a chat channel on freenode (same server as our chat) under #panda3d
Title: Re: Client Engine
Post by: Nique on October 28, 2009, 05:55:58 PM
I'm really having a hard time understanding panda3d (and python at all). In Irrlicht there where classes that helped me setting up

- game scenes (main menu, region view, mayor view etc etc)


I cant find any examples / tutorials on this. The tutorials ive seen are just bunches of code which i have to 'back-engineer'...

The tutorials are just blank py files but don't tell me anything from the beginning where to start, how to work efficiently, how to build up a framework..  :(. I cant build a client engine in the next year i think.. because i need time to learn it with panda3d).. someone else needs to take over here i think  :(
Title: Re: Client Engine
Post by: tomkeus on October 29, 2009, 04:31:14 AM
Use C++ API if Python is too confusing for you. Besides, most of GUI will probably be written with C++.
Title: Re: Client Engine
Post by: Nique on October 29, 2009, 07:22:34 AM
i have used visualPython for python inside Visual studio 2008. But i have problems with building it. From the commandline i can just do python file.py and everything is ok, but when i press F5 inside Visual Studio nothing happens except a bunch of crappy errors that i couldn't find the python.dll library or something. Weird..

Anyway, for simplicity i want to try to do something with the GUI indeed (c++).. python is to hard for me at the moment. Maybe someone can try to build a terrain using panda3d? just as an example? I couldnt find 'good' examples/tuts about this part.

About the GUI.. shouldn't we make some drafts on how it should look like? Do we have a main menu, or do we just have region view when startup the game.

Left bar (simcity-like)
Top bar (linux (gnome) like)
Bottom bar (strategy gaming like)
Title: Re: Client Engine
Post by: tomkeus on October 29, 2009, 07:42:49 AM
I will probably sort out things about the construction layer. But it would be nice to see some design work being done on the UI.
Title: Re: Client Engine
Post by: townscape on October 29, 2009, 07:48:09 AM
I'm already working on it and can even show it a little later after I work on it a little more.
See below :)
Title: Re: Client Engine
Post by: croxis on October 29, 2009, 10:14:13 AM
Nique, hop in the chatroom and I'll be able to help.

Panda gives a bit more freedom in that there isn't a strict scene system. Some people use the FiniteStateMachine class to manage scenes. In the past I wrote my own gui manager. Panda uses a nodetree scene graph, render is scene for 3d rendering, aspect2d is for the ui.

You can also check out the panda client I have so far here: http://github.com/croxis/CityMania/tree/master/LinuxClient/

main.py is the start file.