tag:blogger.com,1999:blog-9121642240025958832.post4950834496539056646..comments2024-03-29T07:03:17.896-07:00Comments on Trystan's blog: roguelike tutorial 02: input, output, modes, and screensTrystanhttp://www.blogger.com/profile/15653418292042541807noreply@blogger.comBlogger30125tag:blogger.com,1999:blog-9121642240025958832.post-24882818436036452352017-05-06T09:45:51.371-07:002017-05-06T09:45:51.371-07:00Im getting an input == null in my ApplicationMain ...Im getting an input == null in my ApplicationMain and I have no idea why. It seems to be happening when I instantiate the ApplicationMain in the main method.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-62073932237166012232016-12-11T22:43:04.389-08:002016-12-11T22:43:04.389-08:00It has been pretty necessary for the students to f...It has been pretty necessary for the students to follow out all those concerning piece guides which are indeed said to be of utmost importance and guides. developer portfolio websitehttp://www.portfoliowebsite.biz/how-to-design-your-web-developer-portfolio-websites-to-get-hired/noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-49431339339927902402016-11-16T09:58:14.583-08:002016-11-16T09:58:14.583-08:00LoseScreen and WinScreen need to extend PlayScreen...LoseScreen and WinScreen need to extend PlayScreen and PlayScreen needs to extend StartScreen<br />public class PlayScreen extends StartScreen implements Screen<br />public class WinScreen extends PlayScreen implements Screen<br />public class LoseScreen extends PlayScreen implements ScreenAnonymoushttps://www.blogger.com/profile/00765814101617683488noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-43584407004318235772016-08-28T06:18:42.750-07:002016-08-28T06:18:42.750-07:00This comment has been removed by the author.Luke101https://www.blogger.com/profile/12310985619542968881noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-10424301047870786122016-08-28T06:18:28.501-07:002016-08-28T06:18:28.501-07:00First, thank you very much for the tutorial. Unfor...First, thank you very much for the tutorial. Unfortunately, when adding all the files to Eclipse, I see the following errors:<br />Incompatible conditional operand types PlayScreen and LoseScreen LoseScreen.java line 14<br />Incompatible conditional operand types PlayScreen and StartScreen StartScreen.java line 13<br />Incompatible conditional operand types PlayScreen and WinScreen WinScreen.java line 13<br /><br />Despite a longish time used to search for a solution, I haven't found one. Could anyone give me a hint? The project compiles but only shows the initial screen, spewing the above error after a key is pressed.<br /><br />Luke101https://www.blogger.com/profile/12310985619542968881noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-77287389364354689392016-04-22T08:35:15.608-07:002016-04-22T08:35:15.608-07:00Nevermind.
Forgot to 'implments KeyListener&#...Nevermind. <br />Forgot to 'implments KeyListener'...Skarutshttps://www.blogger.com/profile/11838805619563798740noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-76695361570122357922016-04-22T02:51:42.647-07:002016-04-22T02:51:42.647-07:00Problem: I get an error saying
"ApplicationM...Problem: I get an error saying <br />"ApplicationMain cannot be converted to KeyListener()" <br />on the line of <br />"addKeyListener(this)".<br /><br />(I'm compiling through the command line and the little arrow points at the 'this' keyword)<br /><br />I know the code is old and I'm using the most recent jdk 1.8.something.91. I was googling around but couldn't find anything I understood clearly. I'm not new to programming, but I don't know java APIs, so I'm kind of clueless on how to fix that, while keeping the same functionalities intact...<br /><br />Would you or anyone else happen to know how to fix it?<br />Thanks in advance.Skarutshttps://www.blogger.com/profile/11838805619563798740noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-31941961845388472922015-04-25T12:32:14.710-07:002015-04-25T12:32:14.710-07:00I had the same issue. My main application worked f...I had the same issue. My main application worked fine, but the applet wouldn't take keyboard commands until I placed that line. I have no clue why it does that though, I'd love to know.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-41483358514168612072015-04-23T03:02:34.514-07:002015-04-23T03:02:34.514-07:00Hi,
my Applet don't want to take KeyEvent. I ...Hi,<br /><br />my Applet don't want to take KeyEvent. I have add setFocusable(true); in my AppletMain() and now it works. But someone can tell me why i need to add this line. In the source of this blog, there is no setFocusable(true);? ...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-48407570454264430812014-04-16T23:22:41.109-07:002014-04-16T23:22:41.109-07:00Picking up Java to start a new project and ran acr...Picking up Java to start a new project and ran across your tutorial. Having tinkered with roguelike development in the past this is turning out to be a fun introduction to the language. Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-90713646498985200072014-02-05T14:20:48.416-08:002014-02-05T14:20:48.416-08:00Hi,
first of all: thank you for the great tutoria...Hi,<br /><br />first of all: thank you for the great tutorial, really enjoying it so far. I'm a Web developer and write quite a lot of PHP and JavaScript but I still prefer Java's syntax over everything else even though I only learned a little bit of Java in university.<br /><br />So, I've encountered the same problem as Matt and Jelmo had: the asciiPanel.jar you've linked to at the top of the first article (the one on GitHub) seems to be different from the one you've included in the code zips you provide at the end of each article. The one from GitHub doesn't clear the terminal, it just lays the screens over one another (you can see through them).<br /><br />The asciiPanel.jar from the code zips does redraw the screen correctly, however, it seems to be very slow in comparison. While the one from GitHub changes screens without any noticeable delay (using the code from the second part here), the one from the code zips takes about 0.5 - 1 seconds before the screen changes. I'm on a highest-spec MacBook Retina 15" which is quite the beast (for a Mac) so I don't think this is because of slow hardware. Although, Java tends to be slower on OS X than Windows/Linux iirc...<br /><br />Anyway, just wanted to tell you so you can look into that if you'd like to. Thanks again for the great tutorial! :)Michael S.noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-35790857095574164442013-10-18T17:06:22.791-07:002013-10-18T17:06:22.791-07:00I've just started this and I love it already. ...I've just started this and I love it already. Thanks a ton!anubiann00bhttps://www.blogger.com/profile/02495901401994725655noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-31888318471151699322013-06-16T19:18:35.062-07:002013-06-16T19:18:35.062-07:00Excellent tutorial! I'm a beginner Java coder ...Excellent tutorial! I'm a beginner Java coder and I'm interested in making a roguelike but what I was looking for were the basic structures of how a game should be made and what not to do when making a game. I love how you made clear how to build the basic beginnings here. I'm definitely bookmarking this. Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-14141734083541989332013-05-20T21:55:04.489-07:002013-05-20T21:55:04.489-07:00I'm not sure whats causing that. I'd guess...I'm not sure whats causing that. I'd guess that either the jar isn't in the classpath or you're missing the import statement for it.Trystanhttps://www.blogger.com/profile/15653418292042541807noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-65011201222614229782013-05-19T22:24:07.210-07:002013-05-19T22:24:07.210-07:00Hello! I just started looking at these, and I have...Hello! I just started looking at these, and I have a quick question:<br /><br />in Eclipse I put the AsciiPanel.jar into a source folder called lib.<br />After that I set the build path and whatnot, but, even though it seems to work everywhere else,<br />in this class, I get the bug "screen cannot be resolved". Any way to fix this?Anonymoushttps://www.blogger.com/profile/11209235846210402561noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-60346315819740592482013-01-03T11:57:41.987-08:002013-01-03T11:57:41.987-08:00Hi,
as a new year resolution I'm following th...Hi, <br />as a new year resolution I'm following the tutorial and converting the code to Scala.<br />I had exactly the same problem with the screen not been redrawn correctly. I checked the downloaded Java source and it works perfectly. <br />I solved the issue by replacing the asciiPanel.jar I had downloaded from the direct link in the first part of the tutorial with the one found in the downloaded sources. So I guess there is a problem with the jar linked here: https://github.com/downloads/trystan/AsciiPanel/asciiPanel.jar<br /><br />Thank you for this great tutorial.Jelmohttps://www.blogger.com/profile/11416820567381437229noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-62535506731006420172013-01-02T10:37:47.378-08:002013-01-02T10:37:47.378-08:00I don't know. I downloaded the source to use d...I don't know. I downloaded the source to use directly and that works fine. Thanksngpr your response!<br />Matthttps://www.blogger.com/profile/15104648570180584808noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-51421525102510685772013-01-02T10:34:48.301-08:002013-01-02T10:34:48.301-08:00I'm guessing repaint isn't calling termina...I'm guessing repaint isn't calling terminal.clear().Trystanhttps://www.blogger.com/profile/15653418292042541807noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-39179132005927238192013-01-02T09:34:16.454-08:002013-01-02T09:34:16.454-08:00Hey!
So I love the framework you have provided. H...Hey!<br /><br />So I love the framework you have provided. However, I am having a few issues. The screen is not being redrawn and only writing over, and not all of the symbols are showing up as they should. I have both typed the code myself and downloaded yours and it still is not working. Am I doing something wrong? or could it be different since I am on ubuntu?Matthttps://www.blogger.com/profile/15104648570180584808noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-61824290223892156802012-11-15T18:04:46.114-08:002012-11-15T18:04:46.114-08:00Thanks Seismos!
I've been happy with the scre...Thanks Seismos!<br /><br />I've been happy with the screen interface too. One variation I did on a recent project of mine was to use a screen stack. User input goes straight to the topmost screen and when it's time to draw, each screen is drawn from the bottom of the stack to the top. enterScreen puts a new screen on the top of the stack, exitScreen pops the topmost screen off the stack and switchScreen pops then pushes a new screen. This way individual screens don't have to keep track of the previous screen for drawing and returning to.Trystanhttps://www.blogger.com/profile/15653418292042541807noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-59255582576151431442012-11-15T16:08:27.546-08:002012-11-15T16:08:27.546-08:00Hi Trystan,
I know this tutorial of yours has bee...Hi Trystan,<br /><br />I know this tutorial of yours has been around for quite some time, but I finally had some free time and decided to give my own project another attempt. I come from a classic VB background, and recently switched to VB.NET, and although there is QUITE a lot to learn, especially when going down a more OO route, I'm kind of awestruck by everything .NET has to offer. I think this will be fun, albeit somewhat challenging!<br /><br />Anyways, I was struggling for weeks coming up with a framework for dealing with game states, and after digesting everything here in this article for [ugh... has it really been...] 4 days, I have borrowed your idea of using a "screen" interface to handle the different gamestates that will be needed for my project. Maybe I'm just ignorant for the time being, but this implementation of yours really seems like a good idea to me (that is, after knowing what the heck is really going on)! I couldn't quite work out how Java handles input, but I was still able to adapt the concept to my own project rather easily (I'm using a console for input/output, by the way).<br /><br />So yeah, thank you for the pretty cool stuff here, even though I'm a bit late. You might expect some more praise as I work my way further throughout your tutorial. :)Seismoshttps://www.blogger.com/profile/05170484025652699820noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-64764519059540947262012-05-25T03:42:45.369-07:002012-05-25T03:42:45.369-07:00Nevermind, I put a semicolon after the method decl...Nevermind, I put a semicolon after the method declaration.Shadehttps://www.blogger.com/profile/17494774232577637208noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-43152911064156489582012-05-25T03:26:44.622-07:002012-05-25T03:26:44.622-07:00Am I the only one getting yelled at by netbeans ab...Am I the only one getting yelled at by netbeans about StartScreen.displayOutput not being abstract, and something about @override?Shadehttps://www.blogger.com/profile/17494774232577637208noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-64516717424503243682012-04-29T09:38:24.706-07:002012-04-29T09:38:24.706-07:00Thank you so much for this tutorial. I have clawin...Thank you so much for this tutorial. I have clawing my eyes out looking for a proper roguelike tutorial. <br /><br />The only resources I found in my search:<br /><br />-I found a partial 3 page one written in C++ that uses a depricatd library, and it only got as far as making a static map. The author stopped writing after that ...<br /><br />-I also found the libtcod library, and their tutorial is for Python...a language which i refuse to learn. I really can't stand it's whitespace style and indention rules. That and its all interpreter based... I haven't used one of those since Qbasic back in 1990..and I don't plan on going back. They do have c/c++ bindings but there documentation/community refrences is offline as their server crashed and the author straight up said, well I have it , but It wasn't profitable for me to host so your sh#t out of luck... Frnakly I am not going to use a lib when they can't even put their 3 years worth of docs and community writing back up.<br /><br />- The only thing close to this was a C++ tutorial called : "Terror in a Ascii Dungoen", it was awesome but I can't get the complete tutorial as it was written back in the early 2000s, and the site is now offline...uggh...<br /><br />SO again, thank you so much for this. I took java for 3 years in college but went on to work for a website company that does a crm suite. Never had a need for java since but its all coming back to me. Again thanks for this!!!MidnightShadehttps://www.blogger.com/profile/03150508161825243961noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-69495758085410536092012-02-08T13:17:22.854-08:002012-02-08T13:17:22.854-08:00This comment has been removed by the author.Dryboneshttps://www.blogger.com/profile/00711703571519783954noreply@blogger.com