Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old September 5, 2010, 18:36   #31
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
I'm just using a generic interface for the UI library, so you could write one with any library you want in theory, and just plug it in and it works. The core PyAngband does't care about what's outside it.
Sirridan is offline   Reply With Quote
Old September 5, 2010, 19:04   #32
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,867
Derakon is on a distinguished road
Generally speaking, I'd recommend OpenGL just because it will make it far easier to play with different display modes. The default mode, of course, would just be 2D textured quads of letters, but e.g. ISOAngband could start by rotating everything 90 and moving the camera, and you could do a first-person Angband by taking that and putting the camera on the player. You could also play with transparency for floor stacks, terrain (variant territory, presumably), and so on. You could also do a higher-resolution 'M' map with OpenGL than you could with curses, since the effective smallest pixel size in curses is one character. And of course you can start getting fancier with graphics if you really want to. Particle-based spell effects would look nicely incongruous next to the ASCII...

Curses is designed for faking graphics in a terminal. As soon as you want to do anything else, you can't use curses any more.
Derakon is offline   Reply With Quote
Old September 5, 2010, 22:04   #33
Netbrian
Adept
 
Join Date: Jun 2009
Posts: 141
Netbrian is on a distinguished road
If a Python port of Angband (with gameplay more or less the same as vanilla) was completed, would there be a chance of this version becoming the mainline vanilla version instead of the C version? It seems like it'd be rather unrewarding to have both versions developed and updated in parallel.
Netbrian is offline   Reply With Quote
Old September 5, 2010, 22:30   #34
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Quote:
Originally Posted by Netbrian View Post
If a Python port of Angband (with gameplay more or less the same as vanilla) was completed, would there be a chance of this version becoming the mainline vanilla version instead of the C version? It seems like it'd be rather unrewarding to have both versions developed and updated in parallel.
That would honestly be nice, especially if it was my attempt that was worked on and then became new V, however even if not, I still want to do it for the heck of it. Also it would be really easy to do the variant I've been thinking of with.

In any case, I don't think C vanilla will ever die, it's easier to keep going on some kinds of devices like phones and such, although as power increases (and the fact most of them run linux...) running python on them isn't a big stretch.

Sorry if my post is badly written, I'm quite tired.
Sirridan is offline   Reply With Quote
Old September 6, 2010, 11:39   #35
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
It's way too early to tell. If the PyAngband port diverges in some critical gameplay areas, because its devteam think those are improvements, then it's unlikely to end up superceding V. If it's absolutely identical to V in gameplay, then IMO it could end up being the new V if Takk (and all the variant maintainers!) are happy with that. But first we have to get there.

If we really wanted the ultimate platform-independent port, we should really look again at java. *Everything* runs java - even dishwashers and fridges nowadays. (Ok that might be a bit of a stretch, but let's not pretend that porting to Python is to increase usability across platforms ...)
Magnate is offline   Reply With Quote
Old September 6, 2010, 17:30   #36
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,367
AnonymousHero is on a distinguished road
Quote:
Originally Posted by Magnate View Post
If we really wanted the ultimate platform-independent port, we should really look again at java. *Everything* runs java - even dishwashers and fridges nowadays. (Ok that might be a bit of a stretch, but let's not pretend that porting to Python is to increase usability across platforms ...)
There's also the whole static type checking vs. dynamic type checking thing... when you have a code base as large as Angband with no easy way to write complete unit tests, my hunch is that it'd be way too easy to introduce serious bugs caused by making trivial mistakes (like incorrect spelling of a variable, etc.).

(Not that static type checking doesn't come with its own overhead, but....)
AnonymousHero is offline   Reply With Quote
Old September 6, 2010, 21:22   #37
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by AnonymousHero View Post
There's also the whole static type checking vs. dynamic type checking thing... when you have a code base as large as Angband with no easy way to write complete unit tests, my hunch is that it'd be way too easy to introduce serious bugs caused by making trivial mistakes (like incorrect spelling of a variable, etc.).

(Not that static type checking doesn't come with its own overhead, but....)
Ah ... someone on #angband-dev has written some unit tests .... I'm overdue checking them out ... http://github.com/elly/angband
Magnate is offline   Reply With Quote
Old October 9, 2010, 23:18   #38
Therem Harth
Knight
 
Therem Harth's Avatar
 
Join Date: Jan 2008
Location: New England winter
Posts: 919
Therem Harth is on a distinguished road
Hmm...

I was thinking of porting OAngband to procedural Python and Tkinter, but as you guys point out it would still be a procedural mess with tons of global variables; so no real advantage gained, plus the disadvantage of more runtime bugs.

I guess I could try an object oriented rewrite... I'm very much a design newbie though, so I have trouble figuring out exactly what I should make an object. Player and monsters and items obviously, but what about spells? Should each terrain feature be an object? Or would that be unnecessary and grossly inefficient?

(Can you tell I'm looking for coding projects? )

Edit: I do kind of feel at any rate that non-crucial applications - especially games such as Angband - shouldn't be written in low-level languages. Too much room for buffer overflows and other stupid bugs. Could be a reflection of my inexperience with C/C++ though.
Therem Harth is offline   Reply With Quote
Old October 9, 2010, 23:41   #39
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,367
AnonymousHero is on a distinguished road
"Object Oriented" isn't actually a solution to any real problem. (And I say this as a professional Java developer. We're force to use objects for everything.)

The thing to realise is that you want the right abstractions rather than shoehorning yourself into any particular paradigm, be it imperative or logic programming or pure functional.

The one thing I would argue is that immutability is the king of debuggable and testable programs. (See Haskell and QuickCheck.)

(Slightly drunk as I write this, so... appropriate dosage of salt.)
AnonymousHero is offline   Reply With Quote
Old October 10, 2010, 00:29   #40
Therem Harth
Knight
 
Therem Harth's Avatar
 
Join Date: Jan 2008
Location: New England winter
Posts: 919
Therem Harth is on a distinguished road
Hmm... I had been under the impression that the chief benefit of OOP was making things easier on developers, by forcing the code to be organized in an at least somewhat sensible fashion. I guess that's not necessarily the case?

(I don't see why a Java codebase couldn't be messy and disorganized, but it seems to me it would take a lot more laziness to do that than to write a messy and disorganized codebase in C. Or does that have more to do with C being lower level?)
Therem Harth is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New ego-weapon/armour proposal: (Light) Nightmarjoo Vanilla 24 May 20, 2010 22:08


All times are GMT +1. The time now is 16:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.