tag:blogger.com,1999:blog-9121642240025958832.post8812685412160862412..comments2024-03-28T00:14:41.762-07:00Comments on Trystan's blog: roguelike tutorial retrospectiveTrystanhttp://www.blogger.com/profile/15653418292042541807noreply@blogger.comBlogger30125tag:blogger.com,1999:blog-9121642240025958832.post-40575776930792196662021-06-27T10:00:35.377-07:002021-06-27T10:00:35.377-07:00Passing an object into another doesn't mean yo...Passing an object into another doesn't mean you copy the object and have another instance of it, it means you're creating a reference to it.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-22855160666121162502017-08-16T18:07:09.969-07:002017-08-16T18:07:09.969-07:00these tutorials are amazing! I am about halfway th...these tutorials are amazing! I am about halfway through and I'm loving it. And learning a lot. If you could add some further steps on refactoring, or adding tests, that would be super cool.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-80219996826980887722017-05-24T03:07:01.004-07:002017-05-24T03:07:01.004-07:00i couldn't think of a better place to post thi...i couldn't think of a better place to post this, but i would love the ability to add my own colors to the asciipanel, i attempted to compile my own version from source with extra colors added, yet i couldn't get it to work.Anonymoushttps://www.blogger.com/profile/00335782282358445178noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-46817309566476623322017-01-14T12:54:50.119-08:002017-01-14T12:54:50.119-08:00Those are the perfect ground realities and surely ...Those are the perfect ground realities and surely would lead students towards all those respective guides and provisions of interest which are indeed considered to be so essential. <a href="http://www.javaassignmenthelp.net/why-choosing-our-java-tutor/" rel="nofollow">tutor java</a> Eddie Swing https://www.blogger.com/profile/02010357658608129627noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-937282686036885842016-08-12T14:00:49.279-07:002016-08-12T14:00:49.279-07:00I'm at tutorial 4 and yeah, this is amazing. I...I'm at tutorial 4 and yeah, this is amazing. I started with Java about an year ago, and i thought that make a simple console game would be a good idea to improve my knowledge. <br />So thank you, because i could never imagine how to do that.Anonymoushttps://www.blogger.com/profile/15016809246618702019noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-88516259665051212202016-07-05T15:16:20.968-07:002016-07-05T15:16:20.968-07:00Hey Man, just wanted to say how great and useful a...Hey Man, just wanted to say how great and useful a tutorial this is. You have my full respect, and in my case you've completely opened the door for video game development. CheersAnonymoushttps://www.blogger.com/profile/02050424343488334953noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-41716084448434360102015-02-18T08:42:32.130-08:002015-02-18T08:42:32.130-08:00Sure! I'm glad it's useful.Sure! I'm glad it's useful.Trystanhttps://www.blogger.com/profile/15653418292042541807noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-21554332834221044812015-02-17T11:27:28.694-08:002015-02-17T11:27:28.694-08:00Hey Trystan,
thanks for your hard work and the ni...Hey Trystan,<br /><br />thanks for your hard work and the nice library. The AsciiPanel thing is the best I have been using so far. It is nice and easy and I can use almost any font-graphics I want. Is it ok for you to fork and modify it? Thanks for any reply.<br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-56583209442936090802014-08-29T13:10:21.866-07:002014-08-29T13:10:21.866-07:00I'm a bit late here, but thanks for this tutor...I'm a bit late here, but thanks for this tutorial! I haven't read all of it yet, and I had to write my own terminal emulator (yours wasn't quite what I needed, and wasn't displaying things correctly all the time), but it's easy enough to convert your tutorial to my system. Thanks again!Anonymoushttps://www.blogger.com/profile/10697019035788779037noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-49701616211398572622013-10-18T18:15:20.819-07:002013-10-18T18:15:20.819-07:00You should specify with every code block what clas...You should specify with every code block what class in belongs in. Sometimes it can be a little unclear.anubiann00bhttps://www.blogger.com/profile/02495901401994725655noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-38745367094970351122012-05-06T16:14:43.060-07:002012-05-06T16:14:43.060-07:00Do you have any tips on optimizing speed? Made my ...Do you have any tips on optimizing speed? Made my worlds depth one but multiplied the size by 9, so it has a huge map. It generates pretty quickly, but my 526 monsters which are generated slow it down to an unplayable point during gameplay. Do you have any suggestions on speeding it up?Lukasnoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-45310729093420034042012-03-05T17:09:39.250-08:002012-03-05T17:09:39.250-08:00@Areinu, Ha! That's the best bug I've ever...@Areinu, Ha! That's the best bug I've ever written.Trystanhttps://www.blogger.com/profile/15653418292042541807noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-81282719760787654872012-03-05T01:26:11.502-08:002012-03-05T01:26:11.502-08:00I'm using new AsciiPanel and it works wonders ...I'm using new AsciiPanel and it works wonders for me now. I got trough the tutorial up to magic. I'm changing a lot of stuff to my liking, and going with my own pacing. <br /><br />I found neat little bug in your code though, and it's pretty funny one :D If you get a bow and fire at yourself enough times to kill yourself you'll die... and get experience points for that. In fact enough to get level up most of the time. Leveling up will heal you up to above 0 HP before game over check has chance to see if you died. As a suicidal maniac that you are, you will be damned to wander dungeons in ghost like state for all eternity. It's so fun I might turn it into feature.Areinuhttps://www.blogger.com/profile/12910252093649799577noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-18841877648046131282012-02-08T14:40:55.099-08:002012-02-08T14:40:55.099-08:00I refreshed my cache and loaded the applet again, ...I refreshed my cache and loaded the applet again, but the flickering problem is still there, although it doesn't seem to be freezing up for me anymore.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-21549665035087775692012-02-08T09:10:45.346-08:002012-02-08T09:10:45.346-08:00Yes, I just updated that reference a few minutes a...Yes, I just updated that reference a few minutes ago.Trystanhttps://www.blogger.com/profile/15653418292042541807noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-58495508666463446372012-02-08T00:20:36.812-08:002012-02-08T00:20:36.812-08:00I actually haven't finished the tutorial yet; ...I actually haven't finished the tutorial yet; I'm using the java applet on your blog (http://trystans.blogspot.com/2011/08/nameless-roguelike-for-tutorial.html) to view the finished product before I've finished making it so I can (hopefully) get a better idea of what the result should be like. Is that one updated with the new AsciiPanel?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-4700818167742361362012-02-06T18:26:51.130-08:002012-02-06T18:26:51.130-08:00There may be a way to prevent flickering and freez...There may be a way to prevent flickering and freezing up - it just depends on why it's doing that for you. It sounds like it's doing more work redrawing than your machine can comfortably handle. I haven't gone through and updated all the zip files but have you tried getting the latest AsciiPanel and using that? https://github.com/trystan/AsciiPanel/zipball/masterTrystanhttps://www.blogger.com/profile/15653418292042541807noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-74196421275985497812012-02-05T23:46:20.793-08:002012-02-05T23:46:20.793-08:00Is there a good way to prevent the game from flick...Is there a good way to prevent the game from flickering? Also, the game display seems to freeze up when I hold down a key. I'd love to make a roguelike, but I think these two problems would seem like a hassle and detract from the game as a whole. What should I do?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-7010767430263991502012-02-05T23:11:35.256-08:002012-02-05T23:11:35.256-08:00I also switched to using shorts instead of bytes b...I also switched to using shorts instead of bytes but wasn't able to test it yet - you beat me to it toltox! I've merged your fix and will update the AsciiPanel in the downloads and applets when I can. Thanks!Trystanhttps://www.blogger.com/profile/15653418292042541807noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-20940538077931475762012-02-05T19:29:33.309-08:002012-02-05T19:29:33.309-08:00Hi,
I was running into the same issues and follo...Hi, <br /><br />I was running into the same issues and followed the link you provided. There is a recommendation to use a ShortLookupTable as a workaround, which I did in the setColors method. I put the changes online as a fork on GitHub, <br />https://github.com/toliwa/AsciiPanel/blob/master/src/asciiPanel/AsciiPanel.java<br /><br />Works now with a black background on my Linux machine without problems. <br /><br />Also, thanks a lot for these tutorials, Trystan!toltoxhttps://www.blogger.com/profile/01694521273098064628noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-15170461130887164782012-02-05T18:55:00.045-08:002012-02-05T18:55:00.045-08:00From what I've been able to find so far, the g...From what I've been able to find so far, the ghosting and odd colors are actual bugs in the Linux implementations of java. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6183251.Trystanhttps://www.blogger.com/profile/15653418292042541807noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-78793324441578790752012-02-05T18:36:01.936-08:002012-02-05T18:36:01.936-08:00@Trystan and @Areinu, I am currently having the sa...@Trystan and @Areinu, I am currently having the same ghosting of last images that were drawn, and I just implemented part 2 of the tutorial. Running Fedora Linux with Oracle Java 7u2 here.<br /><br />The parts were the Strings of the previous screen were drawn are of a slightly darker blue and the text is in grey color. I wonder why terminal.clear(); does not do its job.<br /><br />The tutorial itself it top notch and I am learning a lot through it, thank you!Mark Tellernoreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-65405839432373683772012-01-22T17:37:49.374-08:002012-01-22T17:37:49.374-08:00@warmowed, if you need to load and save more compl...@warmowed, if you need to load and save more complicated data like creatures or complex tilesets, the easiest way is to just serialize it to and from xml. It may not be as easy to read and modify and I think you have to write your classes a certain way (public getters and setters for everything, it think), but it's easy to serialize things in java.Trystanhttps://www.blogger.com/profile/15653418292042541807noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-46528160495620549962012-01-22T17:34:27.817-08:002012-01-22T17:34:27.817-08:00@warmowed, The easiest way to load a simple premad...@warmowed, The easiest way to load a simple premade map is to probably save it as a string (either as an external file or an inline string), then convert it to a char[][]. Then each char would represent a tile so you could convert that into Tile[][].<br /><br />Here's something to get started with. It's off the top of my head so it may not even compile, but it's a decent start.<br /><br />Tile[][] converToTileMap(String map){<br /> return convertToTileMap(convertToCharacterMap(map));<br />}<br /><br />char[][] convertToCharacterMap(String map){<br /> String[] lines = map.split("\n");<br /> char[][] chars = new char[lines.length][lines[0].length];<br /> <br /> for (int i = 0; i < lines.length; i++)<br /> chars[i] = lines[i].toCharArray();<br /> <br /> return chars;<br />}<br /><br />Tile[][] convertToTileMap(char[][] map){<br /> Tile[][] tiles = new TIle[map.length][map[0].length];<br /> for (int x = 0; x < map.length; x++)<br /> for (int y = 0; y < map[0].length; y++)<br /> tiles[x][y] = convertToTile(map[x][y]);<br /><br /> return tiles;<br />}<br /><br />Tile convertToTile(char character){<br /> switch (character){<br /> case '.': return Tile.FLOOR;<br /> case '#': return Tile.WALL;<br /> case '>': return Tile.STAIRS_DOWN;<br /> default: return Tile.WALL;<br /> }<br />}Trystanhttps://www.blogger.com/profile/15653418292042541807noreply@blogger.comtag:blogger.com,1999:blog-9121642240025958832.post-11614272723991257342012-01-21T22:10:39.026-08:002012-01-21T22:10:39.026-08:00Hey warmowed again i have 1 question how do you de...Hey warmowed again i have 1 question how do you define a map and like build it without a random generatorAnonymousnoreply@blogger.com