Searching the best language/way to program games in 3D

How do /you/ make 3D games on the Pandora?

  • GLBasic

    Votes: 0 0.0%
  • BennuGD (is it possible at all?)

    Votes: 0 0.0%

  • Total voters
    9

Granitehead

Advanced Member
Joined
Oct 16, 2009
Messages
3,011
Well, when I try to write something in C, sooner or later I always get stuck because of some C related problem. Not even using OpenGL (ES), just some stupid, probably small, mistake which I can't find. Often the errors which gcc displays are completely useless (to me).


So I'm searching for a language where I don't have to focus on the language as strong, but more on the logic problems. Because the latter is fun, I hate the first.


So I looked at GLBasic, but the IDE is only available on Windows and doesn't work in wine. So installed it in a virtual machine, but found out I didn't like GLBasic. If there is really nothing else I might try it with it though. A big minus is also that I can't test the 3D functions without buying it.


PyGame is very slow on the Pandora, I've heard, so I didn't try it. Can someone tell me /how/ slow it is? I need 3D, but I don't need /really/ fancy graphics.


Today I've also looked at BennuGD, but it seems there is no built in 3D possibility? And the 3D module(s) would probably not work on the Pandora? Also a lot of documentation is Spanish (I should really learn this language too ^^), so I don't understand it. How fast is BennuGD?


Are there other languages I should look at?
 
Mmh, what error messages are "useless"? Never had such...
The most recent one is "invalid type for array subscript". Searched for it on the net and it and the people who got it did all different things wrong and no one the same thing as me. Also searched for some list where all the error messages gcc prints are explained, couldn't find one either (yeah, some which have 10 or 20 error messages, but nothing about mine or with hundreds of error messages).


Tried solving it by just trying different approaches, changed the types it probably complains about, and so on. Didn't help.


And I hate having to ask in a forum all the time.
 
So just this time: post the source :)


Maybe you should learn the language first before you write poems.
 
So just this time: post the source :)


Maybe you should learn the language first before you write poems.
This is what I'm talking about: What I want is actually not learning the language but thinking about how to implement something, that's what I like about programming.


It's a mess, a lot of code is just temporarily there, until I have written the real functions, it's always embarrassing to show the shit I write,you probably don't want to look at it, but here it is anyway: http://t4b.me/not_joomla/blocks.zip


Oh and I know it wouldn't run on the Pandora, I made this before I got it. Before adding anything to the OpenGL stuff I would change it to OpenGL ES.
 
I think the problem is that you declared texture and texture2 as GLuint, but you are treating them as arrays. Try taking the square brackets off where it's complaining (Line 96 and 99?). (I haven't gotten it to compile yet, but I think I just need to figure out what flags need to be set).


And don't worry about what your code looks like. I have some of my source posted on sourceforge, and there is some real shit code there. But it's more than most people can do.


There was one time I was working on my game, and it would bug out for (apparently) no reason. I changed the order of the members in the class, and everything started working. WTF?


P.S. (Directed at the community) Am I the only one who has their SDL headers in a separate directory?
 
Last edited by a moderator:
PyGame is very slow on the Pandora, I've heard, so I didn't try it. Can someone tell me /how/ slow it is? I need 3D, but I don't need /really/ fancy graphics.
Pygame doesn't do 3D at all; it's essentially just bindings to SDL, and SDL doesn't do 3D. Fortunately, this means that speed problems endemic to Pygame don't necessarily apply to 3D renderers.


As a fan of Python, I've been looking at 3D engines to use on Pandora. The most straightforward way is to use OpenGL ES directly. GLES is on the todo list for PyOpenGL, but isn't available yet. A Pandora wrapper was released some time ago, but if there are problems with that, it's not too difficult to use ctypes to access the functions you need.


I think I'll try to use Panda3D myself. It claims ease-of-use, and should run on GLES, I think. But without a Pandora, I haven't been able to try it. PySoy also looks pretty good, but it's in a state of heavy development, so it might not be a good idea to use older versions of it. The Python wrapper for Ogre might also be good if anyone can get Ogre working on Pandora (I've heard it's been difficult so far).


In conclusion, 3D is doable in Python, but there isn't yet any solution that I can guarantee will work well.
 
Last edited by a moderator:
C++ + OpenGL ES, context through SDL or if I/someone get(s) it to run well, QtOpenGL. If Irrlicht were to work faster I'd probably use it.
 
PyGame is very slow on the Pandora, I've heard, so I didn't try it. Can someone tell me /how/ slow it is? I need 3D, but I don't need /really/ fancy graphics.
Pygame doesn't do 3D at all; it's essentially just bindings to SDL, and SDL doesn't do 3D. Fortunately, this means that speed problems endemic to Pygame don't necessarily apply to 3D renderers.


As a fan of Python, I've been looking at 3D engines to use on Pandora. The most straightforward way is to use OpenGL ES directly. GLES is on the todo list for PyOpenGL, but isn't available yet. A Pandora wrapper was released some time ago, but if there are problems with that, it's not too difficult to use ctypes to access the functions you need.


I think I'll try to use Panda3D myself. It claims ease-of-use, and should run on GLES, I think. But without a Pandora, I haven't been able to try it. PySoy also looks pretty good, but it's in a state of heavy development, so it might not be a good idea to use older versions of it. The Python wrapper for Ogre might also be good if anyone can get Ogre working on Pandora (I've heard it's been difficult so far).


In conclusion, 3D is doable in Python, but there isn't yet any solution that I can guarantee will work well.
Ah, I thought it would because "mcedit" (a minecraft map editor) always calls it's window pygame for a few seconds while starting and this is definitely 3D.


I'll look the links, seem interesting. :)


@Gerix: That was it! They /are/ actually arrays which are defined in another source file, but of course I also need to declare them as arrays in this source file. That's why I hate to post my problems to a forum: After they are solved they always look that easy and stupid, but actually I searched for it for hours and couldn't find it.


It doesn't work how I want it to, but that's an other problem.
 
Last edited by a moderator:
But you wont come around that kind of problems just by using another language. GLBasic didn't even warn me, okay thats some time ago now, as I used an array with more dimensions than it had. Result was a Windows runtime error, not a compiler error.
 
Last edited by a moderator:
Indeed, in every language you have to learn, when you have to use an array - and when you shouldn't.


And I give you an advise: Ask! Ask as often as possible, that is the fastest and easiest way to learn how to develop.


Of course, you could just google you error-messages without code context, too, but you saw, that this will not help most times. ;)


I chose "other" in this poll, because I do the 3D-Stuff for myself with a software renderer, so it works e.g. on the gp2x, too. But I don't think, that this is a good way for you. It's a lot about matrices, fixed point mathematics and a bit ARM assembler... :rolleyes:


greetings, Ziz
 
Indeed, in every language you have to learn, when you have to use an array - and when you shouldn't.
But in no other languages I define an array in one source file, use it correctly in another, but it doesn't work because I forgot to declare it correctly in the second source file. ;-)


And when I ask too much someone always tells me to stop asking dumb questions and use Google...


And, yeah, if something needs too much maths I can't do it because I haven't had it in school. I really need to buy some good book to learn some maths myself.
 
Last edited by a moderator:
But in no other languages I define an array in one source file, use it correctly in another, but it doesn't work because I forgot to declare it correctly in the second source file. ;-)

There is something said about globals. Just don't use them.


Again, you shouldn't start with 3d before you know the language you want to program in. The mathematics... Well, to understand what a vector is isn't that hard. You are german? There are tons of informations about the rest on youtube: http://www.j3l7h.de/videos.html
 
Some places assume that you have a certain level of knowledge.


I think if you started a "Newbie programmer's questions" thread on these forums, you - and anybody else who had questions - would get reasonable and patient answers. Maybe if the question had been answered a couple times already they'd refer you to the original thread, but this community seems pretty friendly.


Heck, make it 3 stickied threads - development environment, 2d gaming, and 3d gaming newb questions with the most common resources / answers in the first post.


I've also had some luck in the beginners C++ channel on IRC, as opposed to the "regular" C++ IRC channel where they expect you to have more experience.


Cheers, and good luck!
 
Learn from the code. This, right here, is a fully-functioning C++-based OpenGL ES application, which you can build *on your Pandora* and learn from, a great deal:


http://w1xer.at/pandora/


It has everything you need to get started with 3D programming on the Pandora, in C++. Read the code, study it well, gain an understanding of the component modules and how they work, and you can move on from there. It really is a well-written demonstration of OpenGLES-based 3D in C++ .. and it works *great* on the Pandora ..
 
There was one time I was working on my game, and it would bug out for (apparently) no reason. I changed the order of the members in the class, and everything started working. WTF?
Almost certainly memory corruption. Moving the members means different (non-fatal) ones were being corrupted.

Indeed, in every language you have to learn, when you have to use an array - and when you shouldn't.
But in no other languages I define an array in one source file, use it correctly in another, but it doesn't work because I forgot to declare it correctly in the second source file. ;-)
Sorry, haven't looked at the source, but you declare variables in header files (if other source files need to know about them) and define them (only) in the source file. The variable only appears in the header and source. Following that you shouldn't hit this kind of problem.

All languages have these kind of things and you'll make silly mistakes in all them at least once. I've been programming for 20 odd years, mostly C and C++. I use Java from time to time and I still make stupid mistakes, but C/C++, never, well...almost ;)
 
Last edited by a moderator:
But in no other languages I define an array in one source file, use it correctly in another, but it doesn't work because I forgot to declare it correctly in the second source file. ;-)

There is something said about globals. Just don't use them.


Again, you shouldn't start with 3d before you know the language you want to program in. The mathematics... Well, to understand what a vector is isn't that hard. You are german? There are tons of informations about the rest on youtube: http://www.j3l7h.de/videos.html
I at least believe I know the basics of C, I just always make some stupid mistakes which I can't find. I only wanted to use these globals for testing, next time I'll directly give this stuff as arguments to the function which needs it.


I'm not German (look at my location, to your left), but I understand the language.

Learn from the code. This, right here, is a fully-functioning C++-based OpenGL ES application, which you can build *on your Pandora* and learn from, a great deal:


http://w1xer.at/pandora/


It has everything you need to get started with 3D programming on the Pandora, in C++. Read the code, study it well, gain an understanding of the component modules and how they work, and you can move on from there. It really is a well-written demonstration of OpenGLES-based 3D in C++ .. and it works *great* on the Pandora ..
I'll look at this, but I don't know C++ at all, so...
 
Last edited by a moderator:
Back
Top