[ann] Kaduria 0.4.6

G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

New version with some bug fixes (and new bugs) and couple of new
features. It took one day to hack this together to a package..:)

http://koti.mbnet.fi/paulkp/kaduria/
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

ABCGi wrote:
> Thanks...

For what?:)
I'm planning some kind of task(s) for the player to give something
to do.. along with level themes. I just have a problem with multiple
stairs system. How to construct the tree of levels... Level themes are
exciting, because the engine can create very different looking levels.
I've been stomping around for too long in the basic level type myself,
so it's nice to have more level types.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

Krice wrote:
> New version with some bug fixes (and new bugs) and couple of new
> features. It took one day to hack this together to a package..:)
>
> http://koti.mbnet.fi/paulkp/kaduria/

Thanks...

--
ABCGi ---- (abcgi@yahoo.com) ---- http://codemonkey.sunsite.dk
..Hajo's H-World - RogueLike/RPG Engine SourceForge Project...
.......Downloads - https://sourceforge.net/projects/h-world...
............Home - http://h-world.simugraph.com...............
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

The game looks great. I acknowledge
that it's an alpha release, but I'll
mention the things that would have
me playing like it was a beta:

- Fewer items. I like the abundance
of stuff on the ground, but too much
of it is magical or useful, like
amulets and swords.

- In my preliminary play, I'm not sure
I encountered any enemies or NPC's.

- More standard roguelike controls.
I don't mean yuhjklbn controls, just
things like "?" bringing a help menu
up and ">" taking me downstairs. I
couldn't find the in-game keybindings.

I only mention these things because
I like the game, and want to play
more of it. If you could even hack
it together to be a random Omega-style
romp (at least temporarily), it would
be great fun.

What's on your to-do list? What is
your time-table and what are your
projections for Kaduria?

Respectfully,
Bryce McQuern
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

bamcquern@yahoo.com wrote:
> - Fewer items.

There will be less items. It's now more like test, because items
from almost all item types are always created.

> - In my preliminary play, I'm not sure
> I encountered any enemies or NPC's.

There should be monsters around. They usually just don't move..

> things like "?" bringing a help menu

Well, it does. Guess I have to get rid of shift+K which shows
the keyboard commands. It's in the manual.txt, but people don't
read it:)

> and ">" taking me downstairs.

This is also true. But it seems that the keyboard routine of SDL
is fooled by different keyboards. In my finnish keyboard those
commands work. I don't know yet how to fix that...

> What's on your to-do list?

AI, combat and level themes, among some others..

> What is your time-table and what are your
> projections for Kaduria?

Well, in these ten years I have learned not to think any time
tables:) But the development has recently been definetly faster
than ever, because I'm now much better programmer than I was
couple of years ago.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

Krice wrote:

> bamcquern@yahoo.com wrote:
>> and ">" taking me downstairs.
>
> This is also true. But it seems that the keyboard routine of SDL
> is fooled by different keyboards. In my finnish keyboard those
> commands work. I don't know yet how to fix that...

I see coming yet another game with broken international keyboard handling
while using SDL :) I swear the "examples" you can find in the user comments
on the SDL documentation must be some kind of curse for us non english
users !

Use SDL_EnableUnicode( 1 ); to enable unicode translation and use the
unicode field of the SDL_keysym struct you get with the keyboard event for
all keys which return a valid symbol. The scancode field should never be
used because it's very hardware specific and the sym field is unreliable
for all keys except maybe F1-F12, arrow keys and letter keys where it's the
only way to go. If you do some user editable keyboard configuration, you
can use the sym field in a reliable way because all users should be able to
redefine the missing keys then.

Remember, is some keyboard, there is no SDLK_0-SDLK_9 keys, in some other
keyboard it's the SDLK_GREATER which doesn't exist ...
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

Christophe Cavalaria wrote:
> Krice wrote:
>
> > bamcquern@yahoo.com wrote:
> >> and ">" taking me downstairs.
> >
> > This is also true. But it seems that the keyboard routine of SDL
> > is fooled by different keyboards. In my finnish keyboard those
> > commands work. I don't know yet how to fix that...
>
> I see coming yet another game with broken international keyboard handling
> while using SDL :) I swear the "examples" you can find in the user comments
> on the SDL documentation must be some kind of curse for us non english
> users !
>
> Use SDL_EnableUnicode( 1 ); to enable unicode translation and use the
> unicode field of the SDL_keysym struct you get with the keyboard event for
> all keys which return a valid symbol. The scancode field should never be
> used because it's very hardware specific and the sym field is unreliable
> for all keys except maybe F1-F12, arrow keys and letter keys where it's the
> only way to go. If you do some user editable keyboard configuration, you
> can use the sym field in a reliable way because all users should be able to
> redefine the missing keys then.
>
> Remember, is some keyboard, there is no SDLK_0-SDLK_9 keys, in some other
> keyboard it's the SDLK_GREATER which doesn't exist ...

Yes, the curse of SDL's keyboard handling...

I think I finally fixed it up with You Only Live Once (If anyone still
has keyboard troubles with the SDL version, please let me know!).

Please note that you still need to look at the scancode to catch
numberpad keys. Windows XP has an annoying habit of not setting the
unicode values for SDLK_KP*, requiring you to parse them manually.

The relevant code that I use is:

int
gfxsdl_cookkey(int unicode, int sdlkey)
{
if (unicode && unicode < 128)
return unicode;

switch (sdlkey)
{
// Insert several curses here... This isn't necessary
// anywhere except WIndows XP it seems...
case SDLK_KP0:
return '0';
case SDLK_KP1:
return '1';
case SDLK_KP2:
return '2';
case SDLK_KP3:
return '3';
case SDLK_KP4:
return '4';
case SDLK_KP5:
return '5';
case SDLK_KP6:
return '6';
case SDLK_KP7:
return '7';
case SDLK_KP8:
return '8';
case SDLK_KP9:
return '9';
case SDLK_UP:
return GFX_KEYUP;
case SDLK_DOWN:
return GFX_KEYDOWN;
case SDLK_LEFT:
return GFX_KEYLEFT;
case SDLK_RIGHT:
return GFX_KEYRIGHT;
}
return 0;
}

void
gfxsdl_pollEvents()
{
SDL_Event event;

while (SDL_PollEvent(&event))
{
switch (event.type)
{
case SDL_KEYDOWN:
// For now, ignore arrow keys..
int key;

key = gfxsdl_cookkey(event.key.keysym.unicode,
event.key.keysym.
sym);
gfxsdl_putKey(key);
// Set the pusher.
glbKeyPusher = key;
glbKeyPushTime = gfxsdl_getframecount() +
KEY_REPEAT_INITIAL;
break;

case SDL_KEYUP:
// Stop the pusher.
glbKeyPusher = 0;
break;

case SDL_QUIT:
SDL_Quit();
exit(0);
break;
}
}

// Note that we handle key repeat here, not in the actual timer
loop!
// This way if our processing freezes, the key repeating also
// freezes.
{
int frame;

frame = gfxsdl_getframecount();
if (glbKeyPusher)
{
if (frame >= glbKeyPushTime)
{
gfxsdl_putKey(glbKeyPusher);
glbKeyPushTime = frame + KEY_REPEAT_AFTER;
}
}
}
}

I dump the keypresses onto a queue after I cook them, and the normal
getKey() function will grab from that queue.
--
Jeff Lait
(POWDER: http://www.zincland.com/powder)
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

Christophe Cavalaria wrote:
> Use SDL_EnableUnicode( 1 ); to enable unicode translation and use the
> unicode field of the SDL_keysym struct you get with the keyboard event for
> all keys which return a valid symbol.

Unicode returns some keys like '>' and '<' properly, but there are
problems.. Like when I press ctrl+p it returns 16(?) as unicode, so
I can't handle that with keymod ctrl (+p). When I press p it
returns p (112) and shift+p returns P of course. Why ctrl changes that?
Btw, I have taken out ctrl, shift and alt keys inside the keyboard
routine so they don't return as keycodes, just as key modifiers.

> and letter keys where it's the only way to go.

Why? What is wrong with unicode returning letter keys?

> Remember, is some keyboard, there is no SDLK_0-SDLK_9 keys, in some
> other keyboard it's the SDLK_GREATER which doesn't exist ...

There is no separate key for SDLK_GREATER in finnish keyboard, both
keys '<' and '>' are in the same key, located next to left shift.
So pressing shift+'<' gives '>':)

Jeff's source code seems to be a bit complex. I wonder is there
easier way to do this... All I want is get some valid keycodes
out from the SDL event loop, which just returns keycodes and
then waits for another key press.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

>They should range from 0 to 255.

It depends. My keyboard has the euro sign, and its giving
me all kinds of head aches when testing.

T.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

Simon Richard Clarkstone wrote:
> I am not certain what is wrong with this, it seems correct to me. The
> point of the control key (historically, and hence on any terminal
> emulator) is to send control codes (ASCII chars 0 to 31).

Yes, I noticed that ctrl+a is 1, ctrl+b is 2 etc. so there is a
certain consistency in that.. and ctrl+p is 16. It's actually the
only command where ctrl is involved, because I wanted to maintain
some similarity to Nethack (show last messages). Shift+m also
shows the message buffer, but I think just m could be fine.

Now the keyboard routine is fixed and should work.. I'm also
writing in-game document for using keys and UI in general, which
is reachable from F1 and ? keys.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

Krice wrote:
> Unicode returns some keys like '>' and '<' properly, but there are
> problems.. Like when I press ctrl+p it returns 16(?) as unicode, so
> I can't handle that with keymod ctrl (+p). When I press p it
> returns p (112) and shift+p returns P of course. Why ctrl changes that?
> Btw, I have taken out ctrl, shift and alt keys inside the keyboard
> routine so they don't return as keycodes, just as key modifiers.
I am not certain what is wrong with this, it seems correct to me. The
point of the control key (historically, and hence on any terminal
emulator) is to send control codes (ASCII chars 0 to 31). If a
keystroke without control would send character c, then with control it
will send character (c&31) i.e. the bottom five bits. Alt is a bit more
complicated, but (on UNIX at least), you can persuade curses to convert
between to 27,c convention (Esc followed by the character) and the c|128
convention (turns on the top bit of the byte). Note that there is (in
normal terminals) no difference between ctrl+letter and
ctrl+shift+letter, and many other characters are regarded the same when
with control. Find the ASCII codes of the characters for details. The
actual effect is that the used can actually type any of the 256
characters into your program without much difficulty; even the
ctrl-alt-codes are not too fiddly.

To be certain (I do not know much about modern Windows terminals) I
recommend that you write a testing program which outputs the code of
every character that you type into it until you hit 'q', then type every
key combination that you can think of into it and document which
character code each produces. They should range from 0 to 255.

--
Simon Richard Clarkstone: s.r.cl?rkst?n?@durham.ac.uk/s?m?n.cl?rkst?n?@
hotmail.com ### "I have a spelling chequer / it came with my PC /
it plainly marks for my revue / Mistake's I cannot sea" ...
by: John Brophy (at: http://www.cfwf.ca/farmj/fjjun96/)
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

Krice a écrit :
> Christophe Cavalaria wrote:
>
>>Use SDL_EnableUnicode( 1 ); to enable unicode translation and use the
>>unicode field of the SDL_keysym struct you get with the keyboard event for
>>all keys which return a valid symbol.
>
>
> Unicode returns some keys like '>' and '<' properly, but there are
> problems.. Like when I press ctrl+p it returns 16(?) as unicode, so
> I can't handle that with keymod ctrl (+p). When I press p it
> returns p (112) and shift+p returns P of course. Why ctrl changes that?
> Btw, I have taken out ctrl, shift and alt keys inside the keyboard
> routine so they don't return as keycodes, just as key modifiers.

Pressing p return p(112), SHIFT+p return P(80), why would CTRL+p return
the same thing as one of the first two cases ? :)

Anyway, in that case the solution you are looking for is easy enouth :
all keyboards have a P key and so you can use SDLK_P to check for the
CTRL+P event.

>>and letter keys where it's the only way to go.
>
>
> Why? What is wrong with unicode returning letter keys?
>
>
>>Remember, is some keyboard, there is no SDLK_0-SDLK_9 keys, in some
>>other keyboard it's the SDLK_GREATER which doesn't exist ...
>
>
> There is no separate key for SDLK_GREATER in finnish keyboard, both
> keys '<' and '>' are in the same key, located next to left shift.
> So pressing shift+'<' gives '>':)
>
> Jeff's source code seems to be a bit complex. I wonder is there
> easier way to do this... All I want is get some valid keycodes
> out from the SDL event loop, which just returns keycodes and
> then waits for another key press.
>