Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old May 28, 2015, 12:40   #11
tumbleweed
Adept
 
tumbleweed's Avatar
 
Join Date: May 2015
Posts: 112
tumbleweed is on a distinguished road
Quote:
Wilderness
A plugin API and/or scripting support that allows you to add custom generators without touching game internals. D:

And speaking of D:,
Quote:
Originally Posted by Nick View Post
2.Work on simplified and touch command interfaces
<SNIP>
4. Write front ends that don't use the text UI
<SNIP>
9. Write a proper API for the core, rather than just having the UI calling core functions
D:
tumbleweed is offline   Reply With Quote
Old May 28, 2015, 12:50   #12
debo
Veteran
 
debo's Avatar
 
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 2,344
debo is on a distinguished road
Quote:
Originally Posted by Antoine View Post
Hmmm what could we be missing

A.
Yesssssssssssssss
__________________
Glaurung, Father of the Dragons says, 'You cannot avoid the ballyhack.'
debo is offline   Reply With Quote
Old May 28, 2015, 23:19   #13
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 53
Posts: 7,173
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by tumbleweed View Post
And speaking of D:,

D:
I think some (probably mostly true) context may be needed here.

Originally Angband was a game for terminal screens, with stuff just written straight to the screen as needed.

Then when porting it to different platforms became a thing, underlying terminal code was written to handle all this writing, and a bunch of files called main-win.c, main-dos.c, etc were written to translate that to the host operating system.

That made it very difficult to do things like tiles, for example - having tiles that can go over multiple rows and columns in your "terminal" which refreshes line by line is a recipe for lots of visual artefacts.

So takkaria came up with the brilliant idea of separating the UI - including everything to do with writing to the screen - completely from the core (ie what was happening in the game world). This has been one of the big changes attempted in 4.0, and it's really only half done. A big chunk of the code has been carved out and deemed UI - that's the stuff I'm calling the text UI, and it includes all the main-xxx.c front ends (and their ancillary files) for various platforms. The half that is done is that the game core no longer calls anything in the UI, so one could write a completely new UI without affecting how the core game works. But it would be nice to have a situation where the UI was better separated, and asked for info from the core and got it back rather than just observing it directly by looking at core internals.

And if you're at all interested in doing any of this, the devteam would be delighted - the community has kept this game going for 20+ years, and we'd like to keep it that way.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old May 30, 2015, 12:46   #14
Cold_Heart
Adept
 
Cold_Heart's Avatar
 
Join Date: Mar 2012
Posts: 141
Cold_Heart is on a distinguished road
RE: what could we be missing

A web frontend, of course - angband in a browser.

[click to play]

On a more serious note, updating the variants to 4.0 seems like a great idea - poschengband has many annoying ui bugs etc that are fixed in vanilla...
Cold_Heart is offline   Reply With Quote
Old May 31, 2015, 00:39   #15
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,365
AnonymousHero is on a distinguished road
Quote:
Originally Posted by Nick View Post
And if you're at all interested in doing any of this, the devteam would be delighted - the community has kept this game going for 20+ years, and we'd like to keep it that way.
Soooooo tempted to try to "port" my Qt frontend from T2 to Angband... My main obstactle (in T2) was macros/keymaps. (Well, that and the rather large amount of assumed-to-be-blocking calls to/from "struct term" functions.) Is the UI code independent from keymaps in 4.x? Does the engine code still do "blocking" calls to the UI and/or vice versa?
AnonymousHero is offline   Reply With Quote
Old May 31, 2015, 00:45   #16
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 53
Posts: 7,173
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by AnonymousHero View Post
Soooooo tempted to try to "port" my Qt frontend from T2 to Angband... My main obstactle (in T2) was macros/keymaps. (Well, that and the rather large amount of assumed-to-be-blocking calls to/from "struct term" functions.) Is the UI code independent from keymaps in 4.x? Does the engine code still do "blocking" calls to the UI and/or vice versa?
Keymaps and the term code are now considered part of the UI, so you could do as you please with them.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old May 31, 2015, 00:52   #17
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,365
AnonymousHero is on a distinguished road
Quote:
Originally Posted by Nick View Post
Keymaps and the term code are now considered part of the UI, so you could do as you please with them.
That's good news... but what about the blocking calls? Is it possible for the game engine to block indefintely and/or call back into the UI code?
AnonymousHero is offline   Reply With Quote
Old May 31, 2015, 01:03   #18
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 53
Posts: 7,173
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by AnonymousHero View Post
That's good news... but what about the blocking calls? Is it possible for the game engine to block indefintely and/or call back into the UI code?
Stuff has moved around a lot. The UI now runs the game, as follows:
Code:
/**
 * Play Angband
 */
void play_game(bool new_game)
{
	/* Load a savefile or birth a character, or both */
	start_game(new_game);

	/* Get commands from the user, then process the game world until the
	 * command queue is empty and a new player command is needed */
	while (!player->is_dead && player->upkeep->playing) {
		cmd_get_hook(CMD_GAME);
		run_game_loop();
	}

	/* Close game on death or quitting */
	close_game();
}
So run_game_loop() just does all the game stuff until the player gets to command again. I'm not sure if that helps - it's probably best to just start reading code
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old May 31, 2015, 01:22   #19
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,365
AnonymousHero is on a distinguished road
Quote:
Originally Posted by Nick View Post
Stuff has moved around a lot. The UI now runs the game, as follows:
Code:
/**
 * Play Angband
 */
void play_game(bool new_game)
{
	/* Load a savefile or birth a character, or both */
	start_game(new_game);

	/* Get commands from the user, then process the game world until the
	 * command queue is empty and a new player command is needed */
	while (!player->is_dead && player->upkeep->playing) {
		cmd_get_hook(CMD_GAME);
		run_game_loop();
	}

	/* Close game on death or quitting */
	close_game();
}
So run_game_loop() just does all the game stuff until the player gets to command again. I'm not sure if that helps - it's probably best to just start reading code
That gives me... dangerous ideas. I think I'll have a proper look at the code tomorrow. (No promises, &c. )

EDIT: Thanks, btw.
AnonymousHero 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
Future of Angband development Timo Pietilš Development 95 December 28, 2011 17:07
Blengband - 3D angband in development jplur Variants 69 June 16, 2010 02:24
Angband development process TJS Vanilla 4 June 14, 2010 22:53
Crafting-focused Angband mod under development Optimality Variants 49 November 25, 2009 01:06
Angband/65 development log PaulBlay Development 0 April 16, 2009 18:55


All times are GMT +1. The time now is 20:10.


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