Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need an advice

0 views
Skip to first unread message

X-Dimension Dragon

unread,
Jan 23, 2004, 8:02:54 AM1/23/04
to
Hello!

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

Björn Bergström

unread,
Jan 23, 2004, 8:19:17 AM1/23/04
to
"X-Dimension Dragon" <ragn...@hotmail.com> skrev i meddelandet
news:165933e3.04012...@posting.google.com...

> Hello!
>
> 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.
>


This has been discussed before. Use google groups and search for java curses
in r.g.r.dev. (Probably broken) link below:

http://groups.google.com/groups?hl=sv&lr=&ie=ISO-8859-1&safe=off&q=java+curses&btnG=Google-s%F6kning&meta=group%3Drec.games.roguelike.development

> 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)


Raghar

unread,
Feb 4, 2004, 6:45:58 PM2/4/04
to
ragn...@hotmail.com (X-Dimension Dragon) wrote in
news:165933e3.04012...@posting.google.com:


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?

0 new messages