CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 115 users online: 7 members, 81 guests and 27 bots.
Members: Ashbad, DHerls, flyingfisch, geekboy1011, Spyro543, Tari.
Bots: Spinn3r (1), MSN/Bing (2), Magpie Crawler (4), VoilaBot (1), Googlebot (18), MSN/Bing (1).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
Author Message
willrandship


Expert


Joined: 06 Jul 2010
Posts: 558
Location: Between Venus and Mars

Posted: 14 Jul 2012 10:38:35 pm    Post subject: ERF - The Extensible RPG Framework

The ERF is a project I'm doing for the Raspberry Pi summer programming contest.

I'll be using this topic for progress reports and stuff, as well as a reference document. The official rules don't say anything about source code, so I might put that here too. (you know, a link to a repo or something)

So...here's some of the things I plan to implement.

-A unified class system for managing battle stats of players and monsters. This way a player could use any character with defined stats as either a player or a monster.

-An event system where the events are customized python code segments, probably going to be functions in a designated file or section of a file in the framework. This would have everything from animations to spell effects inside, and functions can reference each other. Very modular.

-A data management structure for managing inventories (multiple or singular) of either unlimited or arbitrarily limited capacity.

-A Sound system that allows smooth blending between different background music tracks while playing an arbitrary number of effect files.

-And others.

I don't think I'll include any preferred graphical interface as part of the standard framework, since it's intended to work for anything from ASCII to SDL to OpenGL, or any other display method. Plus, it would take a LOT of time to set up an OpenGL method, especially since I don't know OpenGL, and frankly don't know SDL all that well.
_________________
Hmm...what to put here....


Last edited by willrandship on 28 Jul 2012 12:38:24 pm; edited 1 time in total
Back to top
willrandship


Expert


Joined: 06 Jul 2010
Posts: 558
Location: Between Venus and Mars

Posted: 18 Jul 2012 11:57:42 pm    Post subject:

So, now that it's been a few days, a progress report.

I have a map storage system working. It keeps the map in a pseudo-binary file format. There can be up to 256 different tiles. Length and width are determined by the first 8 bytes, which are two ASCII integers interpreted by the interpreter. This makes reading maps in a hex editor really easy.

I've set up a basic character class as part of the map module. They have the capability of having a set speech from a file, and to automatically create a set of monsters to fight. It's intended that monsters and NPCs share the same class. The map system itself needs to be rewritten, to work with the new map tiling system (I was going to make on using lists, but the new way is far more storage-friendly)

There's also a module called battle, which allows for invoking the battle engine, and contains the classes for participants in said battle. The player's fighters and the enemies are stored in the same format, for flexibility. The engine itself isn't written yet, but the class for storing battle participants is.

One of my end goals is for the end framework to require absolutely no imports of other modules, including os and sys. So far, that's working out just fine.
_________________
Hmm...what to put here....
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55751
Location: Earth, Sol, Milky Way

Posted: 19 Jul 2012 06:49:05 am    Post subject:

I guess this is implemented in Python, based on that last sentence of your most recent post. Why would you want to avoid needing to import sys and os? That seems like an unnecessary restriction on yourself to me. Other than that, this sounds like a nifty plan, and I hope you see it through. When you say "set speech", I presume we're talking about a text string rather than an audio file? Although I noticed that (!) you mentioned a Sound system, which is cool.
_________________


Back to top
willrandship


Expert


Joined: 06 Jul 2010
Posts: 558
Location: Between Venus and Mars

Posted: 28 Jul 2012 12:02:37 pm    Post subject:

I'm actually not avoiding sys, I just haven't needed it yet. As for OS, the commands vary from windows to linux enough to make cross-compatibility an issue.

Currently, I'm trying to figure out a decent way to get keyboard input without using ncurses (unix-only, or mingw dependent) SDL (Graphically dependent) or OpenGL (Do I need to say anything?)

I'm planning, after it's done, to release it in an "option" style, such that it would have an SDL version, a curses version, etc. but I want one that would run on literally anything that can run the full python interpreter. The sound system would be one of these.

Oh and yes, with the speech bit I was referring to text.

By the way, I got the mapper's partial display routine to work. I'm planning on making the map display work as follows:

*Map tiles are stored in a list of strings.
*Said list is turned into a single string with newlines every frame. This is the part where only a certain X and Y range is taken, so from here on the map is only the local view.
*Said string has any objects on the map (people, monsters, items, etc.) applied. I'm debating about having speech being displayed on the map, so it would go here too.
*Said string is messed with however the programmer wants to mess with it. Razz
*String is displayed.
_________________
Hmm...what to put here....
Back to top
willrandship


Expert


Joined: 06 Jul 2010
Posts: 558
Location: Between Venus and Mars

Posted: 02 Aug 2012 11:09:32 pm    Post subject:

By the way, I got really excited when I found PyPy, a JIT-style rewrite of the python interpreter. An average of 5.7x faster is pretty awesome!

Anyways, up next is the inventory system. I think I'll have the items totally separate from everything else, and contained in a class. That way, it's easy to make some small changes for multiple inventories, ie for multiple party members, or for shops, etc. I think I'll have gold be part of that too, so expect Elder Scrolls style shops by default.
_________________
Hmm...what to put here....
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55751
Location: Earth, Sol, Milky Way

Posted: 03 Aug 2012 10:28:36 am    Post subject:

willrandship wrote:
I'm actually not avoiding sys, I just haven't needed it yet. As for OS, the commands vary from windows to linux enough to make cross-compatibility an issue.
That's the whole point of the OS module, to abstract away OS-dependent features. Smile I guess if you need to call out to external programs, though, it gets much more complicated.
Quote:
By the way, I got really excited when I found PyPy, a JIT-style rewrite of the python interpreter. An average of 5.7x faster is pretty awesome!
Great! Although I had thought that Python already did bytecode compilation.
_________________


Back to top
Tari


Systems Integrator


Joined: 03 Jul 2006
Posts: 2112
Location: Always-winter, Michigan

Posted: 03 Aug 2012 11:55:49 am    Post subject:

Quote:
By the way, I got really excited when I found PyPy, a JIT-style rewrite of the python interpreter. An average of 5.7x faster is pretty awesome!
Great! Although I had thought that Python already did bytecode compilation.[/quote]CPython compiles to bytecode, which is then interpreted. PyPy is a true JIT.

The implementation of PyPy is rather interesting, since the interpreter itself is written in a statically-typed subset of Python that they've dubbed rPython. rPython can be translated to C, Java bytecode or .NET CIL. With some bonus annotations in the interpreter source code, it generates a JIT for the interpreted Python code automatically.
_________________


Ask questions the smart way · タリ
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.028416 seconds.