MUD becoming MORPG - is Panda3D the right choice?

First, let me thank all the developers of Panda3D. It is a wonderful gift to the open source. At first I couldn’t believe what I read about this engine, but one week ago I started “playing” with it and was impressed.

I am mostly a PHP, C++, and Ruby programmer, but I have started using Python a few months ago. No need to say it is one of the easiest languages out there, and probably the one I enjoy using the most. Simply put, it does a lot of things that other languages should have done long time ago. Even advanced python code is easy to understand.

I am looking for a graphics engine to turn my MUD into a 3D online game. The server code is already quite advanced; the server will obviously handle all logic and will always have full authority, while the client should just be an interface for the player. Even though the process is almost invisible right now, players in my MUD already move in a 2D grid, with each cell having its different material, inclination (basically, we have also a z axis), and other features. Delta compression, pathfinding, and dead reckoning routines are ready, and I have almost finished outlining the basics of the client prediction module. In the past, I have just tried to use a basic 2D engine (with graphics similar to SNES era Zelda games), but I wanted something prettier.

While I really do not plan to create the next great MMORPG (or MORPG, for that matter), my team is very small (one programmer, two artists, and everybody has worked in the game design process). At first, I plan to have a very small playable area, mostly because while I am good with Blender 3D (couldn’t ever afford a license for 3DSMax), I will not have the time to create thousands of objects needed for a game world at first. I will probably use mostly low-poly cute characters. But this is a problem we will address later.

Having a simple playable 3D area, with a working menu system and interface, would already be great.

Do you honestly think Panda3D could be my engine of choice for this project? Why? Or I’d better stick to more simple 2D graphics? How advanced is the network architecture included in the current distribution of Panda 3D?

Lots of questions, I know!

Thanks everybody for your time and for what you are doing with this project.

/bows

welcome to panda =)
to encourage you, i’m thinking about doing ecaxtly the same as you . i havent thought about server questions yet but i checked everything related to a client.
to keep it short. it is possible. even a modern looking mmorpg would be possible with a bit of tweaking.

for grafic:
a “normal” looking 3d environment was my target too and it can be realized, even if you’r targeting gforce2 hardware. viewing distance depends on hardware and on detail level but it’s more than ok =).

you can model your world completly in blender. the exporter for static meshes is pretty good, supporting vertexcolors (can be used for lighting/radiosity).

you have full fredom when it comes to level creation, overhanging cliffs as well possible as holes in the ground,caves , “really” seamless indoor-outdoor transitions etc…
using blender’s clay tool is great for outdoor details.

panda can load levelparts fast enought to allow a huge world without noticeable loading ( huge enought to kill your harddisk trying to store it :smiley:).

panda might not look like it but it is surprisingly fast… and pretty felxible. well suited for outdoor stuff

for networking: -havent looked into netcode yet but seems to be working :smiley:

sound and other stuff… well all included.

already having a server you have already done a lot of work!

ps: if you dont mind i can help you out sometimes, models, levels or just infos on how stuff can be done =). try googling for “zanzarah”. grafic like that was my idea. pretty and reasonable easy to do (as long as you have the 2d artists :smiley:). fell free to contact me per icq or yahoo (adresses in my profile)

Everything sounds great!

I will indeed contact you as soon as we start development and I have understood the basics of Panda3D, even though we are nothing compared to Zanzarah! It looks wonderful, really! Are you part of the development team? Which tools did you use to create the game?

I also need to make sure the game would run on older machines, as you said, and hearing that Blender works nice with Panda3D makes me really, really happy. I always feared Blender3D couldn’t compare to 3DSMAX, but the recent releases have made it even more professional than before. By the way, have you ever tried the old Panda3D Scene Editor?

By the way, I think that Panda3D comes with its own server; am I wrong? Would I need to integrate my modules into the existing server or simply use my own ?

Thanks!

nah i’m not part of the development team…i just like the game :smiley:… i never was part of any professional team. i was just helping out wherever i could, a level for a shooter here, a player for an rpg there, the usual stuff to kill some time. this way i collected lots of knowledge about all kinds of engines and techniques and quite a bit of background knowledge.

but as far as i know: zanzarah uses the renderware engine (same as GTA3 tonyhawk pro skater 3 (and mafia,at least i think so) uses and they have their own editor stuff included with the engine. although it requires DX8 it doesnt use any if its features so you can archieve the same grafic with pretty old hardware. unfortunately the whole project run out of money pretty soon after the release. nothing the less. the game itself is great. not only grafik but the whole concept, musik,gameplay,… everything fits.

to get back to the topic:
blender export is not prefect yet. animated models have to go thorugh the *.X file format which has a couple of things to take care of but it usualy works. static geometry is pretty good supported.

the stuff with the network is pretty much undocumented. but someone wrote a example application which should include the basic stuff. for everything else…try reading thorugh the panda sourcecode^^ or ask here at the forum. i dont know if its easyer to integrate your own server or using pandas (if panda has a server at all).
but as far as i know again it looks like panda does have kind of a server. at least you dont need a seperate server-application to get a network connection. aaaas far as i remember this one…

i tried the scene editor once but it didn really work for me.
if you plan to use one continous level you will end up in lots of small pieces which can be loaded and unloaded at runtime. for older hardware you should be fine with 16x16 meter chunks or more, depending on ground resolution. if you create a small *.py file for each of these world chunks you can add additional geometry like grass,trees particle effects or whatever and load/unload them pretty easy.

targeting “old” hardware became a pretty different meaing these days.
my target was my pc. 2ghz and a gf4ti4200. i’d say you can achieve zanzarah like grafic with a 1ghz and a geforce2 without any problems.
shure it’s possible to tweak it further…

ps: i personally prefer blender over 3dsmax… since blender is crossplatform and for free… and blenders development is more than fast. just a matter of time until it’s THE 3d-all-inclsuive package (well it already is…)
cant say it often enough :slight_smile:-> make shure to have a few good,talented 2d artists. they are by far the most important part when it comes to grafics.

sorry to make you read all this :smiley: i like writing… sometimes :stuck_out_tongue:
anyway. you’ll have a hard time trying to find a engine better suited and easyer to use than panda3d is… i’d say almost impossible (at lesat not for the same price)

You are right about the 2D artists; we definitely need to find a great texture artist; nice looking models are great, but they mean nothing if you do not have great textures.

So, basically, since you don’t use the Scene Editor, you use Blender as a sort of level editor, right? I was wondering if taking the time to develop a new scene editor, or rewrite the current one would help us in the development of the game.

Thank you Thomas!

well blender is pretty good as object editor.
a large world would require a world splitted up in pieces.
depending on the size of the final world you have to make different efforts.

__best approach would be:
-a terrain modelled in blender and splitted up in fitting pieces.
-a bunch of objects like trees,grass,houses etc
-a customized scene editor to load the terrain chunks and add the objects,particle effects spawnpoints etc

the scene editor would have to write a seperate .py file for each world-block (terrain+objects and stuff).
each py file can be included on runtime to load and unload the world-blocks.
each py file would include a flattenStrong() on the static geometry in the world-block to avoid performance problems with lots of small objects(while keeping the vertex-limit of your hardware).
transparent stuff like grass and leaves would require some more thoughts.

this way you can archieve a scaleable world while keeping the memory usage (during runtime as well as HD-storage) to a minimum.

__the easy way for testing a small world would be modelling the whole world in blender, export it as one mesh and load it into panda (ok for a world with about 100x100 meters). transparent meshes should go extra.

__a simpler way to avoid a modifying or rewriting a scene editor would be:
creating the single wold chunks completly in blender and export each block as egg or bam file. drawback are larger files cause you need to save data like trees lots of times instead of only once.

i think i read something in the panda docu about panda beeing able to save more than just a mesh but a whole node-tree. i’ll have a look at this again. if things are working like i hope it should be fairly easy to build up your own scene editor.

bdw… there aren’t nice looking models without good textures :wink:
i’m somewhat unexperienced when it comes to texturing but if i take my time i can get somewhat usable stuff… it’s just slow.

It would probably be worth the time to develop something like the level editor included in some popular games; the scene editor could be the starting point, and then it could be possible to add more functionalities. Reaching a complexity like the editor in games like the Elder Scrolls series would be great, but probably too time consuming.

really depends on how far you want to go. a level editor is useful if you intend to create huge worlds or to allow the user to create new parts of the world.

would be a little too much work to write a level editor for testing purpose.
i never worked with elder scrools level editor. are they using highmaps for terrain?

well allways depends on what you need=)

Yep, they use highmaps.

heighmaps are somewhat hard to make with blender. (well not really but to make everything fit together again is not easy)
since you’r coming from a MUD you might find “dungeon sidge” quite intresting. they use a set of 3d-world blocks with exchangeable textures and re-center the world from time to time to avoid errors due to large distancnes from the world-center. (although the blocksize they use is rather disadvantegous it still is ok as long as you dont need several hundret meters fewing range, flatten the geometry during runtime to larger blocks would "improve performance, too)
already posted the link somewhere else but you might want to read though it.
http://www.drizzle.com/~scottb/gdc/continuous-world.htm

pro:
“easy” to write level-editor (by far easier than a heighmap editor)
compatibility with old hardware (no multitexturing required)
ok performance ( allows good tuning)
still good looking levels (depending on textures)
easy for players to extend the current world
no memory overkill, same level meshes can be used over and over again
no loading times
still high degree of freedom in leveling
you could keep a certain “tile-based” concept
no limit when it comes to world-size (at least not client sided^^)
proved to be working =)

contra:
needs quite some work with textures (would be required anyway)
lighting issues on tile-edges (needs a workaround or something)
viewing distance depends on hardware (everywhere the same…but should be ok)
requires some thinking and a system:“which level meshes can be combined with which others” (or dont check and let this be the artists job)

in my eyes this would be a good all-round solution.

if you are intrested on how the textures from real dungeon sidge are looking just ask me. i still have a few tilesets lying around, extraced them some times ago… for educational purpose only :wink: … about 8000… or so. :stuck_out_tongue: ok about 5000 are gui :smiley: cough well at least i own the game.since it doenst run under linux i’ll learn from it the best i can.

Hello Thomas -

first, thanks for sharing your knowledge with me, this is really extraordinary. I like Dungeon Siege style and graphics, and I am reading now through the article.

While it would be easier to keep the tile based style, I would like to break this scheme a bit. Dividing the space in a 2D grid is still necessary in my opinion for a MMORPG, but I would offer something that goes beyond it.

Leaving aside gameplay for a bit (even though we should never do it when we design games), I think atmosphere is important in a game, and I would love to have nice looking natural sceneries, where players can look at valleys and mountains, with trees, water, and (maybe) simple fauna roaming in the wilderness. I obviously do not want to reach the beauty of current generation games, as we would never achieve it with our resources, but I would like to be able to convey the sense of beauty we can find only in natural elements.

I was just browsing a gallery of Blender 3D a few months ago, and found [URK=http://blender3d.org/cms/typo3temp/pics/6286cdceb6.jpg]this wonderful artwork[/URL], created in Blender. I obviously would never ask to reach such beauty and complexity in a real-time game that is supposed to run also on older machines, so this is just an “ideal” of what I would like to achieve. Recreating something like this within a game with graphics comparable to those of Zanazarah would be great.

If you can really send me some tilesets I would really appreciate it. We really need to look at the work of real professionals. If you can, send a bunch of the best ones to me at revol@30gigs.com, or please send me a link.

Well, back to the article! Thanks Thomas!

G you should decide wether to use 2d-tiles, 3d-tiles or complete heighmap based (again tiles but often generated from images ,with or without help of texuturegerenatoin plugins), of course you can mix these elements but it would distrub the look of the game itself if you arent very careful.

usualy you have the choice between a very detailed environment but only a little viewing distance (little is already quite good on normal pc’s)and a huge terrain with little details. to have both you need high-end hardware and a custom made engine to handle it.
since panda dosent have a good terrain-code (actually only prute force… someone wrote it with support for a lod but its not complete) its better to have more details like trees,bushes,flowers, and other objetcs

if you stick with dungeon siedge technics (remember you have more freedom than they had) and aim for zanzarah grafic… you should be able to create quite bueatiful scenery… remember dungeonsiedge is quite old… zanzarah too.
the only real problem i can see for now is vertexlighting since this would have to be done in realtime (thats not the problem) the normals of 2 neighbouring meshes wont be smoothed and therefore would result in a sharp edge when beeing lit,well lighting is important after all.

if you can solve the light problem you should be able to get something between zanzarah,dungeon siedge and gothic2, or better
something like this should be no problem at all:
http://www.arbse.net/Files/Gothic2/gothic2_04.jpg

ps: you should receive mail ,soon… if not already^^

Thanks so much Thomas, for the suggestions and the textures.

The screenshot you provided is exactly what I as speaking about!

@harry: you got mail =)
if anyone else is intrested in makeing reeeaaaly huge and yet detailed landsacpes (without using heighmaps for terrain) just ask me. found a somewhat new aproach to reduce required disk-space for storage.

I didn’t read the last part of your message! I am absolutely interested in reading your idea on the subject ThomasEgi.

It’s wonderful to amount of staff I have understood thanks to you :wink:

ok. so i’ll try to explain the idea to everyone.
the given problems are large ,detailed 3d worlds which have to run on older hardware. simmilar to a 2d-tilemap -> 3d-tilemesh solution. and the storage of these maps.
(cause of the old hardware and missing or limited multitexturing ,terrains generated from heighmaps are not a good solution)

saving large worlds (10x10km for example will result in lots of data ( about 800mb for terrain itself with 0.5m horizontal ground resolution) if saved directly into a bam file

so the idea was to use small 3d-tiles which can be used over and over. small spieces of ground,terrain,whatever. these tiles saves a lot of memory, several thousand unique tiles of around 4x4m only cost few MB disk space.
so you need a 3d-mesh tileset and a 2d-texture-tileset to texture them. textures can be exchanged of course.

to make it more panda-friendly its good to build a little larger world blocks with these tiles. 8x8 tiles with each 4+1x4+1 vertices flattened together at runtime should do the job(depending on the hardware.

the new thing about this idea was to save the position of the meshes in png files. since panda has good acces to images. to the pixel position makes the horizontal position the color gives the vertical position,texture and rotation,and the mesh-tile number.
having 2 png textures gives us between 48 and 64 bit’s to store stuff.
48bit are fineso 2x24bit in textures:
-2 for rotation (enough since sqares can be rotated only in 90degree steps to still fit together)
-15 for the texture-number ( allows 32768 different textures)
-15 for the mesh-tile-number (allows 32768 different 3d-tiles)
-15 for the vertical position (allow 32768 vertival positions)
-1 left for anything else. perhaps a non-collision-object atribute or something.
of you need more just add more files or use 32bit textures to store the extra information.(having a vegetation map could be useful, or store stuff like ore recources or someting like that)

having several layers above each other is no problem since you can just add more textures and give them a layer-count in the filename. since png is a lossless compressed format you will have small files if you have just a few blocks you want to store. cliffs are therfore no real problem.

so in the end you have for example a 256x256 png image. used to create 32x32 world blocks, each world block consists of 8x8 3d-tiles, each world block consists of 5x5 vertives which make 4x4 quads.

a fully textured 1000x1000meters (with 1m horizontal resolution) map with “worst-compression” would end up in 2x~200kB images = ~400kb +(the textures and 3d-meshes which both can be used over again)
all in one bam files would be around 8mB + textures
in a heighmap perhaps 200kB + textures + 100-200kB blendmaps

objects like buildings,players,vehicles,water,special world parts or such still would require “a normal” way to store them since the dont really fit into the 4x4x0,1 m raster (or whatever rastersize you choose). but they are fewer objects than the world consists of and shouldn’t eat up the harddisk.

this shure is a little bit abstract and simmilar results could be archieved using and storing simple lists in python (the python files again would need to be compressed). but i think png’s are fine since it’s quite easy to store and access them and they are already compressed (not all to bad even with this kind of data)

additional advantages are:
-posibility to stream new maps over the internet. a few kB png’s wont even hurt a dial-up connection too much.
-allow the user to edit his world during playing (designated region where users,or chosen editors are allowed to edit). a admin or supervisor would just have to approve it.
-extendable to insane scale :stuck_out_tongue: "recentering the world"alows infinitive worlds and avoids precition problems (using lots of png’s, not one huuuge;) ;only limited by the disk space)
-the larger the world the more efficient
-tons of details and high freedom in map design.
-possible to self-tune it for every end-user with a small test-application (depending on the hardware to get the best vertex count per object, viewing distance, nuber of displayed objects etc)

drawback:
-smaller light bugs between the 3d-tiles can be seen depending on the way they are lit.
-no terrain-optimisation (only viewing distance and hide objects are possible)
-more work to create the textures (compared to multitextured terrain)
-more work to create a 3d-mesh tileset (compared to multitextured terrain). well once this work is done its easy…
-needs some extra work on a scene editor to add this all. (well not too hard)

if there are any questions regarding how this should work i’ll try to explain or to create a small illustration of it =)

ps: damn… just wrote another endless post… bad habbit of mine :smiley:. but i hope you find it at least useful

I missed this yesterday, sorry.

I must honestly admit that I not even remotely have enough knowledge of Panda to imagine how this can be done in practice (I mean, I am unable to grasp an overall idea of the pipeline needed to do everything you mentioned), but the the idea is terrific, and contains answers to some questions I have been asking myself about using Panda3D with MMO games.

Using PNG files in that way might seem awkward, but has a lot of advantages, first of all the fact is easy to handle them with Panda and that they can be used to stream data from servers to clients. I heard that the client of ToonTown is relatively small - so I suppose the developers of ToonTown must have used some way to stream data from their servers to their clients and/or to compress the information for each map. In a MMO game, you cannot simply have maps stored on the client. You can have local copies of maps to reduce bandwidth usage, but you always have to check the validity of the map used by the client server-side. Even if you store local copies of the maps into the client, you might need to update a map, during gameplay or more simply when the user is downloading a new publish of the game. But you cannot push updates of 400+ MBs everytime you create a new large area for your game to send a bam file.

Anyhow, I need still a lot of practice to fully understand what you want to do; I hope to be able to contribute a bit with my own ideas once I am ready.

hm… i’ll try to make an illustration which explains this… but i might need a few days since i have a party at my place today/tomorrow.
the basic idea is very simple and there is nothing really hard to code…

the overall pipeline is quite easy =) build small level-parts (5x5 vertices are fine usually fine) simmilar to the single tiles in diabolo2 or other games but in 3d.
create a texture for them.
use a slightly modyfied scene-editor to load the small level part, assign the texture to it. save (editor is creating pixelvalues for each level-part and writes an image files, if there are 2 or more level parts above they go into several images)
once you got the the save and load funktions ( and they shouldn’t be that hard to code) you’ll have a workflow very similar to common 2d-MUD stuff.

well another big advantage of png is that it choses the best available compression itself (actually the compression used wasnt made for images but for actual data)

k… i finnished a short overview on how the stuff is stored using this way.
of course you can change the single bits if you dont need 32000 different meshes. of course this would require to convert the numbers given from the position/rotation and such to binary values. if there is no such funktion withing python you just need to set up a list to convert hexadezimal to binary… well nothing too hard.
one you have the binary value with all information coded into it you can convert them back to a integer or a hexadecimal and feed panda with the pixel-value.

this example shoes how a single 3d-tile is stored in 2 png images.
i hope you have a basic knowledge of the binary system cause the all numbers are converted into binary nubmbers with fitting bit-count. this allows to store lots of information without wasting stuff ( for example the rotation, since these tiles usually only have 4 different orientations 2 bits are enough… no need to use all 8 bits of a color)

as you can see you can create geometry without much restricitons, but it’s usualy a good idea to keep the edges “compatible” with some others.

well to come to the real problem: lighing. lights are a problem (already in theory as well as in praxis).
thats what you get when trying to use the usual vertex-based lighing which depends on the vertex-normals…

simplest solution is to turn off all directinal lights (… would be everything except ambient). well this is not perfect solution. using only the distance between light-source and vertex would allow limited lighting.

only real solution would be to recalculate the vertex normals during runtime, while taking neighbouring vertices into account. (not really runtime but between beeing loaded and reparented to render,maybe after beeing flattened together)
this would require some c++ code (i guess python would be a little slow for such a algorithm)
the code would have to grep all new loaded tiles, and their neighbouring tile (no matter if freshly loaded or already present), take a vertex from the modell, check if the neighbours have a vertex at the same positoin(or within a threshold) take both normals values , calculate a normal “between” the original values, set this new value for both normals.)
… well not that easy but not impossible…afterwards you have a perfect lit environment without any glitches=)
of course you could weld and unwelt these vertices, but since unwelding is not very easy and we intend to stream the world in small pieces … welll we dont want to increase the meshsize with every step :wink:

such a code would also be usefull for terrain-optimisation code since you can work with seperate parts and exchange them without let the player notice

any questions so far? :smiley:
… what? if i’m crazy? . no way…

Woah! I will definitely need some time to experiment with Panda before I can actually fully understand this. At that time, I will indeed ask more questions about this idea, that should interest a lot of developers using Panda3D. As I said, while Panda seems quite straightforward to use, I have never programmed a 3D application. I know the basics of graphics engines and techniques used in Panda 3D but I need some time to understand it all and learn to use Panda3D

The Scene Editor as it is today is a bit rusty, so the first step for me would be to rewrite it or modify it to fit my needs. Currently, what do you use to create your scenes Thomas?