Skip to main content
gamedev.net
🔒 Locked

Scripting language for python game

Started by pygamer Dec 18, 2010 at 10:31 AM 4 replies 3.1k views
Original Post
pygamer
pygamer
Hi :)

Im currently developing a game in python using pygame.
I've got a basic platformer engine done, and im now working on enemies and NPCs.

I thought it would be a good idea to use scripts to control them. That way I can create new NPCs and enemies without changing the engine, and other people can make their own NPCs without knowing how the engine works.

Is this a good idea? If so, what would be a good language to use for the scripts? I tried lua, using lunatic-python, but it didnt seem to support calling functions.

Any recommendations? :)
Metsan
Metsan
Why not Python itself?
fireside7
fireside7
From my experience, which may be somewhat limited, I think it's better to use classes and extend them. It allows for much more variation, but I suppose it would be harder for a beginner. If you have a class with attack(), update(), etc, that you can override, you can call those functions from the base class container in the engine. If you make it open source and have well written code, I think a lot of people would pick it up. I've come to hate scripting myself, because it seems messy and limited. Personally, though, for a platformer, I think a visual editor to make more levels would make more sense and then just have a way to add the enemies already created.
pygamer
pygamer
I will go for classes, a lot of different enemy types and a level editor

Thanks for your help :)
Steve132
Steve132
since python is an interpreted scripting language, adding an interpreted scripting language to the engine that isn't python seems sorta silly.
Kochol
Kochol
I use a component base system for my entities so I can define my units abilities in editor.
I also have a script component for writing new abilities with script.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.