So I’m just finishing up a Java 2 class, and I need a project to work on until classes start back up. I’m wanting to make a rogue like game using ascii graphics, but I have a few questions about how to proceed.
I’ve some other postings and guides on this, but none of them quite addressed my questions. I’m planning on using a two dimensional array of chars to create/edit the grid, but my biggest concern is how to output it. I can come up with a few ways to do it, but so far my ideas area really inefficient or cumbersome to work with. (like using jTextFields for each char, using a GridLayout, or just creating separate strings for each row and editing them the chars are changed. These ways would work, but I’m pretty sure there’s a better way of doing it.
So, to put it simply, I need a way to output a 2 dimensional array of chars as a grid, in such a way that the output would redraw anytime one of the chars is changed.
Edit: forgot to mention, that I was to do this without any extra packages. I know that asciiPanel can solve all of this issues, but for now I want to do everything myself from the ground up. Oh, and I’d prefer to not use Java2d or even really any graphics object. I’m really trying to do all of this just as text output (probably in a jFrame).