• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
cbreiny

Full-Scale RPG in Python using Pygame

4 posts in this topic

For the last 6 months I've been planning a full-scale 2D rpg. The ideas are great and I have people that are going to help me with sound and art. I'm doing all the programming though because that's my hobby and I love it. I recently started working on it and have come accross some performance issues. I've gone over the small ammount of code I have, and it's very efficient. I decided the problem is the API that i'm using. I'm writting the game in Python using the Pygame library for input and rendering. But Pygame is based off of SDL and is software (not hardware) accelerated. So I'm assuming for such a large and full-scale project, that I should use an API that is hardware accelerated. What are some of your suggestions or ideas? Am I using the wrong language/API? Thanks in advance.

** EDIT **
I forgot to add that I have been doing game programming for almost 3 years now. I'm not claiming to be anything special but I'm not a newbie. I also have experience in Java and C/C++. I've done some basic stuff with SDL and SFML. And I am most definitely willing to learn something new so that wouldn't be an issue. Time is not a big deal for this project, its just a hobby of mine. But I would like to do it the right way. Edited by breinygames
0

Share this post


Link to post
Share on other sites
You can write a full scale anything in any language. PyGame and SDL are more than up to the task.

If you are having performance issues, run your game through a profiler and see where the problem areas are.
0

Share this post


Link to post
Share on other sites
[quote name='Daaark' timestamp='1343447828' post='4963854']
You can write a full scale anything in any language. PyGame and SDL are more than up to the task.

If you are having performance issues, run your game through a profiler and see where the problem areas are.
[/quote]

I've done that, everything runs really smoothly other than drawing each individual 'tile' to the screen. I have a giant world, but the program only draws the tiles it needs to on the screen depending on where the 'camera' is. So its never drawing tiles that are off the screen. The screen size is 800x640 with 32x32 tiles. So every frame it is drawing 500 tiles to the screen. I'm not exactly sure how to get around this... It's a tile-based RPG. How can I make it run faster then? Edited by breinygames
0

Share this post


Link to post
Share on other sites
1) Use a profiler so you know what is actually causing you to slow down. No one can guess what is slowing you down.
2) [b]IF[/b] your rendering actually is at fault, try some other methods, such as dirty rectangles.
3) Post your rendering code, and your game loop. But I can't help much there, I barely know any python.
0

Share this post


Link to post
Share on other sites
You're correct that PyGame doesn't take advantage of any hardware acceleration, and this can be an issue if you're drawing a lot of objects - it'll be an absolute performance killer if any rotation is involved.

Profiling for bottlenecks and implementing more efficient drawing methods as suggested are a good idea that's worth pursuing, but in this particular case it's well known that PyGame can be a cause of performance concerns: you might investigate writing your own OpenGL drawing code, or using PySFML (which uses hardware acceleration) as possible alternatives.

You certainly don't need to abandon your choice of Python.
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0