blainelocklair Posted December 11, 2018 Author Share Posted December 11, 2018 Well, darn. I moved the room_avail(y)=0 code into the loop, and it blocked the game startup procedure from initializing. Nothing but a frozen black screen. Any idea why this is happening? We've gotta be close on figuriing this out. Thanks!Blaine Quote Link to comment Share on other sites More sharing options...
carlsson Posted December 11, 2018 Share Posted December 11, 2018 Hm, peculiar. Try this small program, it allocates the numbers 0-9 randomly. random_assign.bas Perhaps I'll have a little time tonight so I could look at your program in larger scale, including the question about animation but I can't make promises. Quote Link to comment Share on other sites More sharing options...
blainelocklair Posted December 11, 2018 Author Share Posted December 11, 2018 I think we've got it! It is doing exactly what it is supposed to do, and it adds a tremendous replayability to the game to have the rooms randomized. Thank you! I'd be so grateful to have your help with that animation for the player. It's the only thing in the game that needs to be animated. If you'd like for me to send over the entire code file and accompanying files, I can PM them to you for your consideration. I think that sometimes trying to copy the code from AA, as Nanochess once mentioned, can cause hiccups in the code file. Once I moved it from your text file to mine, it worked immediately. Thanks!Blaine 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted December 11, 2018 Share Posted December 11, 2018 You're on a Mac, right? I wonder if that makes life more diffcult, as I tend to be able to copy and paste code from the forum into my editor (Emacs) and compile without any strange things happening. Yet if there are spurious characters in the input file, shouldn't the compiler bail out instead of ignoring those? Quote Link to comment Share on other sites More sharing options...
blainelocklair Posted December 11, 2018 Author Share Posted December 11, 2018 You're right: I'm on a Mac. MacBook Pro Retina 15", Mid-2015, 2.5 GHz i7, 16GB RAM, 512GB SSD, 2GB dedicated video RAM. Not a spec post as much as just noting this stuff in case it makes a difference in how the code is copied or compiled. You know, the one thing that makes dealing with errors more difficult with the Mac TextEdit is not being able to see the line numbers. If I want to count to a line number, I have to manually hit the down arrow the appropriate number of times to get to the right line number. Not difficult, but time-consuming. Maybe there's a better way. Anyway, back on track I go. I'm still a noob, and wouldn't know if the assembler would catch the spurious characters. I think it would, though, because I copied some code from AA before and it wouldn't compile. Small sample size of one, but it's a start. Thanks again for helping me along the journey. If you'd like to see the code file for the animation routine, just let me know and I'll PM it to you. It's the last function of the program that needs to be added to make it polished for a test release. Thanks!Blaine Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted December 11, 2018 Share Posted December 11, 2018 You're on a Mac, right? I wonder if that makes life more diffcult, as I tend to be able to copy and paste code from the forum into my editor (Emacs) and compile without any strange things happening. Yet if there are spurious characters in the input file, shouldn't the compiler bail out instead of ignoring those? I think IntyBASIC should ignore or clear up spurious white-space from the input stream. Non-breaking spaces, tabs, bad or wrongly-formatted news-lines (e.g., \r or \n\r), form-feeds, vertical tabs, etc. all should be stripped and coalesced as a token boundary before processing. The problem is not that it ignores it, but that it skips it, causing lines to blend into each other without boundaries. There are plenty of good code editors for the Mac. Check out BBEdit or its little brother, TextWrangler. There is also Sublime. I personally use TextMate. dZ. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted December 11, 2018 Share Posted December 11, 2018 TextEdit has a hidden ability to go to a line number, simply hit Cmd+L Quote Link to comment Share on other sites More sharing options...
blainelocklair Posted December 11, 2018 Author Share Posted December 11, 2018 Thanks, Nanochess! That is quite helpful. dZ, I will take a look at those editors for Mac. Might make life easier throughout this process. Much appreciated! Blaine Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted December 12, 2018 Share Posted December 12, 2018 (edited) Thanks, Nanochess! That is quite helpful. dZ, I will take a look at those editors for Mac. Might make life easier throughout this process. Much appreciated! Blaine TextMate costs $60.00, BBEdit costs $49.99, and Sublime costs $80. They are a bit pricey, but it's because they are full-featured code editors with built-in support for external toolchains. TextWrangler was free but it is now discontinued. They rolled it into the full-feautred BBEdit as a "Free" mode, which you can use nag-free after the original 30 day trial of the "complete" editor. Mind you, I use TextWrangler (now BBEdit "Free" mode) and it is perfectly adequate for code editing. It has syntax-highlighting, macros, projects, code-folding, keyword searching, line-numbers, etc. For your IntyBASIC forays, it'll be much better than using TextEdit. I wouldn't recommend you pay for the big guns unless you really, really, really want to and have a need for their features. Don't get me wrong, I use TextMate (and Sublime is supposed to be something that started by fans of TextMate who wanted to make it even more powerful), and they have many power-user features for software development, but if all you want to do is dabble with IntyBASIC, then that's just overkill. Whichever editor you pick, let us know. I can then help you integrate it with the IntyBASIC SDK so that you can run the tools from the editor directly. That's always nice. -dZ. Edited December 12, 2018 by DZ-Jay Quote Link to comment Share on other sites More sharing options...
blainelocklair Posted December 12, 2018 Author Share Posted December 12, 2018 Hi dZ! I downloaded BBEdit. I will install it and look at it today. Still trying to sort out that animated sprite thing in the game2.bas file. I just need to animate the player sprite at this point and I think I'll have a playable game to show to some devs for input, for those interested. I've tried pasting the code from the "Running Man" thread into the game2.bas but I can't make it work. It's my lack of knowledge, not the code's fault. I'd be willing to send the entire code set over to anyone that can take a look at it and figure out how to animate the player. It'd be turn-key ready at that point, which would be very cool. I have an LTO Flash! Cart now, so I can test on both Inty I and Inty II hardware and not just emulation now also. Thanks!Blaine Quote Link to comment Share on other sites More sharing options...
First Spear Posted January 6, 2019 Share Posted January 6, 2019 FWIW, Visual Studio Code on Windows is really really good, so the Mac version might also be for you. I am using the Windows version to code IntyBASIC, warning myself off of UltraEdit. https://code.visualstudio.com/download Something about dZ’s earlier mention of “magic numbers”. Please take a look at constants.bas, a lot of “magic numbers” are set as Constants, so your code will be much more readable to you in 2 months after you get away from coding. HTH, enjoy! Quote Link to comment Share on other sites More sharing options...
+cmadruga Posted January 8, 2019 Share Posted January 8, 2019 Hi dZ! I downloaded BBEdit. I will install it and look at it today. Still trying to sort out that animated sprite thing in the game2.bas file. I just need to animate the player sprite at this point and I think I'll have a playable game to show to some devs for input, for those interested. I've tried pasting the code from the "Running Man" thread into the game2.bas but I can't make it work. It's my lack of knowledge, not the code's fault. I'd be willing to send the entire code set over to anyone that can take a look at it and figure out how to animate the player. It'd be turn-key ready at that point, which would be very cool. I have an LTO Flash! Cart now, so I can test on both Inty I and Inty II hardware and not just emulation now also. Thanks! Blaine Hello Blaine I took at shot at animating your player sprite to give you an idea of how I would approach it. I'm learning as well, so this may not be the most elegant way to do it. Hope it helps. game2anim.bas Quote Link to comment Share on other sites More sharing options...
blainelocklair Posted January 8, 2019 Author Share Posted January 8, 2019 Hi cmadruga! Thanks for sharing your bas file for this. I'll look at it tonight. I had to reformat my Mac yesterday, so I'm in limbo at the moment as dZ is working on an updated version of the IntyBASIC SDK for MacOS. I'm being patient as the SDK is a much better solution for Mac users than doing a hard install from scratch. Once I'm up and running again, I'll compile it and see how it looks. Thanks so much for your contribution! Blaine Quote Link to comment Share on other sites More sharing options...
PlanetJanus Posted May 28, 2019 Share Posted May 28, 2019 Thanks for all of this. This is great info! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.