![]() |
#1 |
Knight
Join Date: May 2009
Posts: 560
![]() |
A proposal... (python)
A couple of folks here seem to show interest in having Angband written in python; I myself am one of them. So why not do it? I think if we get enough people, we can get it working.
I'd say start by making the AngbandBase in python first, then moving to porting over the logic. I know it's quite a few thousand lines of code (100k+ right?) but the conversion should knock it down quite a bit. Anyone interested? |
![]() |
![]() |
![]() |
#2 |
Prophet
Join Date: Dec 2009
Posts: 9,022
![]() |
Much as I would love to see Angband in Python, I have far too many projects in the air right now to commit to helping out.
Also, to do it properly, you'd need to do more than just a straight port. Angband is a procedural program that was written ~25 years ago; ideally a modern port of it would change the design into something more object-oriented without significantly changing the gameplay. Such a redesign would require the help of someone who has a good understanding of the overall program, though. |
![]() |
![]() |
![]() |
#3 |
Veteran
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 1,023
![]() |
Maybe it's a stupid idea, but I'd like to bring it up for discussion, too.
There are several methods to interface python with C; it could be a possibility to do the porting gradually, starting from small parts of the code which would benefit more from the scripting (e.g. spells and effects). This would make it easier to test and playtest, since the code would be usable from the early stages. It would also feel more like an evolution rather than a completely different project/fork. I know that scripting has been introduced in the past with LUA and then dropped, but I am not familiar with the reasons that led to its elimination. What were its drawbacks? |
![]() |
![]() |
![]() |
#4 | |
Angband Devteam member
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 42
Posts: 1,516
![]() |
Quote:
Once you start redesigning things you're going to get bogged down into discussions about which legacy design choices were "bugs" and which were "important game features". If I were going to do it I would make it as close a port as possible. That would mean: 1. structs become classes with no methods (initially) 2. keep all the global variables 3. remove the memory allocation code but keep the string processing/formatting code 4. keep the current "term" design 5. keep the current savefile and edit file structures Once you get the working (or maybe "if") then you can start refactoring code to be more modern. This plan loses a lot of the appeal of a Python port, which is probably why I haven't done it ![]() |
|
![]() |
![]() |
![]() |
#5 | |
Swordsman
Join Date: Jul 2008
Posts: 308
![]() |
Quote:
I think it would be best to attempt a project like this by not looking at the Angband code at all, or at least infrequently. |
|
![]() |
![]() |
![]() |
#6 |
Angband Devteam member
|
Hmmm. As someone with a good understanding of the code and the game, but without the skill or the time to play a major part in the python coding, I'm ideally positioned to act as the aforementioned consultant to this project!
Seriously, I agree that this project should stick as closely as possible to the current V until a working port is running, before getting into major gameplay changes. OTOH I'm quite happy to take full advantage of Python in terms of redesigning how the code works - e.g. taking another look at what's read in from text files and how (elly on IRC has done a lot of work on this, with a more modern edit file syntax). One thing I think would need to be agreed at the outset: we're writing it for Linux, and thus postponing any and all port-specific issues. (Yes, ideally it should Just Work on any Python platform, but I think it would save energy and retain focus if we were not distracted by issues on non-Linux platforms.) Once it works on Linux, people can put effort into making it work on other OSs. (Oh, and I totally agree with the idea of starting from AngbandBase, as well.) So, who's actually up for this? |
![]() |
![]() |
![]() |
#7 | |
Swordsman
Join Date: Apr 2007
Posts: 441
![]() |
Quote:
__________________
One Ring to rule them all. One Ring to bind them.
One Ring to bring them all and in the darkness interrupt the movie. |
|
![]() |
![]() |
![]() |
#8 |
Prophet
Join Date: Dec 2009
Posts: 9,022
![]() |
To be quite honest I think the best way to deal with this would be to make a new roguelike from the ground up that strives to be similar to Angband and isn't afraid to steal content wholesale. Attempting to port a large established C codebase to Python would be a huge amount of work, and it'd be difficult to get motivated if you knew you weren't going to reap the rewards of that port for a long while.
|
![]() |
![]() |
![]() |
#9 | |
Angband Devteam member
|
Quote:
Besides, there are enough other people interested in AngbandBase that that might be fixed independently ... |
|
![]() |
![]() |
![]() |
#10 | |
Scout
Join Date: May 2010
Posts: 43
![]() |
Quote:
I think in either case motivation might be an issue -- As Derkon states, a gradual port delays the time when we can reap the benefits of Python, but starting from the ground up will also take a long time. |
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
New ego-weapon/armour proposal: (Light) | Nightmarjoo | Vanilla | 24 | May 20, 2010 22:08 |