Python?

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
Post Reply
yugge
Posts: 1
Joined: Wed Aug 27, 2008 8:57 pm

Python?

Post by yugge »

Hey, I'm rather interested in building a uzebox, but I really stink at C, I'm just wondering if there is any plans or possibilities that Python bindings could be made? If so I would be totally over it :p
CompMan
Posts: 91
Joined: Mon Aug 25, 2008 3:48 am
Location: Kent, WA

Re: Python?

Post by CompMan »

To use Pyton you would have to find a way to use it on the AVR. I am not sure of how to do this right now.

A second option would be to convert your code to C you can find more about that here http://www.python.org/doc/faq/general/# ... r-language.

Hope this helps,
Compman
psyjax
Posts: 11
Joined: Wed Aug 27, 2008 2:06 am

Re: Python?

Post by psyjax »

I don't think python would be a good option at all! I mean, a base python VM is like ~700kb. Not to mention the fact that you don't have dynamically allocated memory on such a small CPU. It has to be plain C on the stack programming as far as I understand (am I right?)

In any case, C is a very simple language. If you are at all good with python, and understand programming fundamentals, C should not be to hard to adapt to.
Snow
Posts: 4
Joined: Tue Aug 26, 2008 9:06 pm

Re: Python?

Post by Snow »

psyjax wrote:I don't think python would be a good option at all! I mean, a base python VM is like ~700kb. Not to mention the fact that you don't have dynamically allocated memory on such a small CPU. It has to be plain C on the stack programming as far as I understand (am I right?)

In any case, C is a very simple language. If you are at all good with python, and understand programming fundamentals, C should not be to hard to adapt to.
That's correct. I find C a lot easier than Python. I'm actually working on a pyglet game with openGL at the moment and I'm going through enough headaches.
kiba
Posts: 10
Joined: Fri Aug 29, 2008 12:47 am

Re: Python?

Post by kiba »

While we're at it, why not Ruby too?

Though it is impossible like psjax said.
I run the Libregamewiki free as in freedom gaming encyclopedia.

I also have a personal game development website.
User avatar
uze6666
Site Admin
Posts: 4821
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Python?

Post by uze6666 »

To add to what's already been said,one could also program games in C++, since the AVR-GCC package supports it. But it's risky since liked most object oriented and dynamic langages, it make heavy use of the stack. On severely RAM limited system like 8-bit MCUs, its just not worth it IMHO. Even if there's Ruby/Python/etc->C converters, they will undoubtedly use tons on memory allocation, which you can't just do in 4K. The Uzebox code doesn't use a single malloc.
Post Reply