ANSI console game - in Java!
h
OrionSmith

I didn't think this was possible until a week ago, and now here I am showing off a game that is really a way to demonstrate more interesting ANSI console output tricks in Java.

Really what this means to me is that I can now do more interesting projects with my AP Computer Science students, since our district has Chromebooks and we need to do all our work in online environments. I know, Swing is also an option. But I think we can all agree that the Swing implementation is not a great place to learn to code, with its long load times and challenging feedback mechanisms. Plus Swing programs are often much larger than console programs, making them harder to use in the classroom.

Thank you Repl.it for using a shell environment capable of ANSI and raw character input mode. Enjoy the game, and I'd love to work with anyone that wants to create a simple Repl.it-compatible, single-file ANSI helper system to use with future projects. (Or if anyone can show me how to use existing solutions like JANSI in jar form, that'd be great too.)

You are viewing a single comment. View All
OrionSmith

@AllAwesome497 Thanks for the jar file tip, I didn't know that. I use 7-Zip also.

So I peeked into the JAR file for the JANSI system and, unsurprisingly, found .class bytecode files instead of .java source files. I don't think repl.it supports .class files in JDK projects at this time. I suppose I could always download the original source, but the JANSI project also uses a bunch of other libraries stored as bytecode. Would I then have to decompile or otherwise track down source for all those? If you have a simpler solution by all means let me know, but what I'm suggesting is that making my own version was really just starting to look like less work...