New User + Questions regarding 2.5d

Greetings to the Panda3D forum followers!

I’m a small-time indie-developer who has been using the FlatRedBall game engine for the last few years.
Although I am very pleased with the FRB engine I’ve started looking at other engines because of my need for Mac & Linux support.

As I know that the Panda3D engine is one of the best in the biz nowadays I’m thinking of moving to it, but I’m wondering if it’s not too much of an overkill for my next game.

Let me explain: My next game will be a 2.5d side-scroller - meaning that the characters and gameplay will be 2d but the game objects and background will be 3d - this will be mainly for the look of the game and not for the gameplay (The FRB game engine is perfect for such a project, as it supports 2d sprites in a 3d environment but, like I said, the cross-platform thing is a problem for me).

I’m wondering how easy it will be to create such a game using Panda3D? (can I use 2d objects within a 3d world? Can I do this without x files and 3d models (I have little to no experience in that field)? Have any such games been written in the past using Ogre3D?

Aside from that I have one other questions (which is derived directly from the fact that I have almost no experience in cross-platforming):
To create a game for several platforms (specifically Windows, Mac, Linux & IPhone) can I use the same source code or do I need to rewrite the code with for each targeted OS? (Also: Can I compile each one on Windows, or do I need to find the same OS for each seperate compilation?)

Thanks in advance, I really value your answers,
Ogga

welcome to panda3d.

while panda has no direct support for sprites (those are really an ancient hardware relict) it is of course capable of drawing 2d-elements.
there are cardmaker class, billboard effects etc.
several people made simmilar thing, you might find it on the forum if you search for retro game or so.

you dont need x-files. it’s not panda’s native format anyway. if it’s just drawing 2d-images you can simply use the cardmaker class to display your images.
crossplatformness is no issue with panda. especially with the upcomming version 1.7.0. you simply code your application in python. tell the package service to create a game-package. and anyone with a panda3d-runtime installed can run it, no matter if win/mac/linux no matter if fix installed or running in browser plugin.

i guess the loff of pixel-based collision might be the biggest step to take ,comming from a 2d-engine.

how should we know :wink: this is panda3d :smiley:

all in all. yes panda is capable of doing all that, additionally it comes with many usefull features, such as support for sound, input and networking. so it comes with batteries included :slight_smile: and…once you know how to use panda, you can create games really fast. i created puzzle games in 6 hours literally. a week for a mini-game is nothing unusual.

Hi, and welcome to the Panda3D forums!

I’m gonna assume that you meant “Panda3D” and the “Ogre3D” was an unintentional mistake when you copied the post from the Ogre3D forums :wink:
A very good example of a 2.5D game in Panda3D is ZeroByte’s interactive portfolio:
discourse.panda3d.org/viewtopic.php?t=6024

In theory, the code you write will be platform-independent (given that you don’t go out of your way to actually use platform-dependent things).
The upcoming 1.7.0 version of Panda3D will provide a system that will make you able to easily package your applications for any platform, without having to distribute your source code.
So indeed, you can compile your source on one platform, and the resulting compiled game will be able to run on any platform.
We also have iPhone support on the CVS trunk since a couple of months ago. :slight_smile:

Take a look at rComplex discourse.panda3d.org/viewtopic.php?t=7732

It’s a 2d platform game in a 3d-ish environment (made by a two man crew in 8 days :open_mouth: )

Hi there,
Thanks for all the quick responses.
I apologize for the Ogre slip-up. I was also thinking of using Ogre3d (but decided against it as I want a complete game engine).
It seems to me that Panda3d should suit me just fine.
Some further questions:

  1. In what situations does the engine use directx and in what situations does it use OpenGL?
  2. What do I need to include in my setup package? (From what I saw just vcredist files and panda specific dlls. Is that all? How large does it get?)
  3. I am very proficient in C++, but have 0 knowledge in Python. Will that be an issue? Am I losing something by not using Python? (can I?)

Thanks,
Ogga

1if you tell it to use dx, it will use dx, if you tell it to use ogl it will use ogl.
if it cant find one of them it will fallback on the one you specified as fallback. you can also use softwarerendering.
2. panda’s packing system will do that job for you. the new packing system produces significanntly smaller files. but i dont know any numbers.
3. it’s not an real issue if you know c++. thougt most of the documentation is for python. and most users use python. aside from that you only use a few convenience classes written in python. nothing serious.

If you use C++ rather than Python, you lose one of the points you discussed in your first post: platform-independence. A compiled Python application will work on any operating system, while a compiled C++ application will only work on the combination of the operating system and architecture you’re compiling it on.

hahah! nice try. I guess they’re both the best in the biz. But seriously, pyOgre is way behind… I love this forum. It’s full of monks; they all know the way, but don’t advertise or brag.

For animating sprites with cards, I would just run a task that checks the character’s state, and change out textures every couple of frames.

I have a couple of questions: First, is anyone working on a way to have tasks run less than every frame? Also, for having multiple cards on a plane, how do you prevent zFighting?

ambyra: the domethodlater task: http://www.panda3d.org/manual/index.php/Tasks
for zfighting. simply dont put them all in one plane. move them slightly out of the plane (very small values will do). there are other ways to do so but that usualy is the easiest.

Thank you all for your answers.
From your replies some new questions ave risen:

  1. How can I create 2d animations? Will I have to change the texture manually in each frame (if I use cards)?
  2. I understand that the Python framework (if this is the correct term) is installed with the game’s setup. I also saw that the package setup will be reduced in Panda 1.7. What package size should I expect? (ballpark figure).
  3. I figure I can’t do without the Python FW, even though I’m working in C++. Right?

Thanks again,
Ogga

Yes - take a look at the Texture Swapping sample programs, they demonstrate how to achieve that.

That depends on the size of your assets. In 1.7.0, the Panda3D runtime is less than 700 kb, which is almost nothing so it depends on your app.
If you want your pack your app so that it is self-contained (that it won’t require an internet connection to run), add 15 to 20 MB for the Panda3D libraries.
That’s all assuming you use Python. If you use C++, you’ll probably link the Panda3D libraries into your application. Dunno how big that will be without Python wrappers, but expect somewhere in the 5 MB - 30 MB range overhead.

If you use C++, you can of course omit everything related to Python, including the Python framework. Panda provides a libp3pystub library that shadows the Python library but doesn’t actually provide any implementation for the functions, so you could just link into that.

Unless you plan to distribute using the new packaging system and/or browser plugin, which currently requires at least some bit of Python to get the application started. But if you’re using C++ and you just want to compile down to your own .exe and distribute that, there’s no reason to involve Python at all.

Of course, we come back to that platform-independent thing again. Python is an easy way to achieve platform independence; if you wish to use C++ and distribute a compiled executable, you will have to compile it separately (and distribute a separate binary) for each platform you wish to support.

David

Thanks for the great answers, guys.
I’m a tad confused.
I thought at first that the Panda infrastructure is based on Python.
Let me just see that I got it right now.
I understand that:
There are 2 ways of working with Panda3d. One is with Python which uses the Python infrastructure. The second is with C++ which uses a C++ infrastructure (with no Python at all). This infrastructure has the same functionalities that the Python one has.
If I use C++ then my setup will only include my binaries and the Panda3d C++ binaries (no Python engine, dx setup or anything else).
For different platform I can use (more or less) the same code but I have to compile it on the same platform OS.
Whew… Did I get it right?

Ogga

That sounds about right, yes (except for a minor point: Panda offers a bit more convenience classes for the Python developer. You lose them when you program in C++. This is not hard to get around though.)

On the other hand if you program in Python, your program is platform-independent. And there is more documentation for using Panda3D with Python. :slight_smile: