I'm now programming a roguelike using Java, I am half the way in the
main game engine, but I am having a little trouble in the IO side.
I have been using Swing for the output, as the game uses console type
output, i have made a pseudo console using an extended JPanel that
stores a char [][] and uses its data to draw in the backbuffer, and
then updates, the problem is that it is too damn slow!, I don't know
what to do, as i'm stuck in this and would like to work it another way
or in another platform.
On the other side, I have also tried to do the keyboard IO via
keyListeners and it is ok, but I would like to know if there are any
other solutions.
Thanks,
Santiago Zapata
This has been discussed before. Use google groups and search for java curses
in r.g.r.dev. (Probably broken) link below:
> On the other side, I have also tried to do the keyboard IO via
> keyListeners and it is ok, but I would like to know if there are any
> other solutions.
Can't help you there I'm afraid. But do you really want something other than
event driven code?
> Thanks,
>
> Santiago Zapata
--
Björn Bergström
L:C++ E+ T- R+ P+ D-- G+ F:V RL-- RLA++
W:F Q+++ AI++ GFX+ !SFX RN+++ PO+ Hp- Re+ S++
Roguelike Development (http://roguelikedevelopment.org)
You'd use Graphics2D. Create array of BufferedImages. Draw them on the
screen as titles. You are done.
Don't forget to disable the automatic redraw.
Keyboard pooling?