Turbo Laser Lynx Posted October 14, 2020 Share Posted October 14, 2020 (edited) Hi guys! What could be the best way to get Tiled maps to 7800basic with palettes- and retaining pokechar- capability? I'm just asking so I don't go re-inventing the wheel unnecessarily if someone already has got an easy/smart way of doing it. Plotmapfile is easy to use and draws everything in one call with pallettes and all, but even if I memcpy the map to ram I can't use pokechar afterwards to pick up stuff (coins or fruits etc). I guess I could use sprites for collectables, but that seems a bit wasteful. Then I got this idea that perhaps I could copy the map into "regular data" and loop through it and plot every char individually. But then I realised that I can't do _My_Data[variable] in a loop, so I can't use the loop increment variable (and I'm not sure if plotchars is viable anyway as an alternative to plot the whole tilemap tile by tile either). So my solution is now to incmapfile my tmx file, then memcpy it to ram, and after that use plotmap commands to get the correct palette on everything. Now I can also use pokechar to pick up stuff, and everything is working fine. The only issue is that it's a lot of slow work to sit and manually count tiles, calculate x positions and put in parameters into plotmap commands. As a next step I was going to write some program in C that would spit out a string of plotmap statements from the Tiled array map data, but perhaps someone already has made such a script and wants to share? : > Or perhaps I'm complicating things in my mind and missing something obvious / some much easier solution? Edited October 14, 2020 by Turbo Laser Lynx Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted October 14, 2020 Share Posted October 14, 2020 5 hours ago, Turbo Laser Lynx said: if I memcpy the map to ram I can't use pokechar afterwards to pick up stuff I believe you can, I do something similar to this in EXO to determine collisions with between the "front" of the playfield while ignoring the "deep background" tiles. I also use pokechar to RAM to animate a few things from tiles like the little tv screens in EXO. I might be wrong but I don't see any reason why you couldn't use tiles for collectables. [edit] - I'm also using Tiled for all of my screens. 2 Quote Link to comment Share on other sites More sharing options...
Turbo Laser Lynx Posted October 15, 2020 Author Share Posted October 15, 2020 (edited) Woohoo I got it working! Thanks Muddy! Now I realised why it didn't work earlier. I was doing: dim tilemap = $2200 incmapfile gfx/myplotmapfile.tmx memcpy tilemap myplotmapfile 240 plotmapfile gfx/myplotmapfile.tmx myplotmapfile 0 0 20 12 Although I should've been doing: dim tilemap = $2200 incmapfile gfx/myplotmapfile.tmx memcpy tilemap myplotmapfile 240 plotmapfile gfx/myplotmapfile.tmx tilemap 0 0 20 12 Oh, the joys of programming! I was probably trying to solve this for a week or two and I got a ridiculous bug earlier too with the platform collission that probably took 3-4 evenings to solve! Well, great feeling to have the basics of a simple static room platformer down now, done in a good/"standard" way. Edited October 15, 2020 by Turbo Laser Lynx Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted October 15, 2020 Share Posted October 15, 2020 good stuff You are quite right, the syntax is that you use to plotmapfile has to reference the file and the location in memory where you memcopy'd it to. If you are using a bankswitching scheme - the nice thing with this approach is that you can plotmap from a different bank and go back to the bank where the actual tiles are stored to draw the screen, meaning you don't have to try to cram all of your maps into one bank. 1 Quote Link to comment Share on other sites More sharing options...
Lillapojkenpåön Posted October 17, 2020 Share Posted October 17, 2020 Instead of changing stuff in the tilemap in RAM, is it possible to have the tileset in ram and change tiles there, I think some NES games does that? 1 Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted October 17, 2020 Share Posted October 17, 2020 You sure can. 6 Quote Link to comment Share on other sites More sharing options...
Lillapojkenpåön Posted October 17, 2020 Share Posted October 17, 2020 Thanks, where can I find atascii.png so I can compile the shifty demo? Quote Link to comment Share on other sites More sharing options...
+Karl G Posted October 17, 2020 Share Posted October 17, 2020 25 minutes ago, Lillapojkenpåön said: Thanks, where can I find atascii.png so I can compile the shifty demo? Take a look in the samples that come with 7800basic. The helloworld sample, for example, has it. Quote Link to comment Share on other sites More sharing options...
Lillapojkenpåön Posted October 18, 2020 Share Posted October 18, 2020 19 hours ago, Karl G said: Take a look in the samples that come with 7800basic. The helloworld sample, for example, has it. Do the samples come with atari dev studio to? I can't find them Quote Link to comment Share on other sites More sharing options...
+Karl G Posted October 18, 2020 Share Posted October 18, 2020 1 hour ago, Lillapojkenpåön said: Do the samples come with atari dev studio to? I can't find them I'm not sure since it's a bit difficult to figure out where ADS installs these things. I'd just download the standalone 7800basic and get the samples from there. Quote Link to comment Share on other sites More sharing options...
+mksmith Posted October 18, 2020 Share Posted October 18, 2020 3 hours ago, Lillapojkenpåön said: Do the samples come with atari dev studio to? I can't find them To minimise the installation I currently remove them. I'm thinking whether I might be a good idea to add a sample viewer which could (probably copy them to a chosen location as required) provide some access for users... I'll add that to my list. 1 Quote Link to comment Share on other sites More sharing options...
saxmeister Posted February 23, 2022 Share Posted February 23, 2022 (edited) @mksmith I know this is an older thread, but could we think about having a standard directory with the atascii font(s) in the repo? I'm thinking examples of the complete Atari ASCII, alphachars only, numbers only, etc. in one place with a README file that would explain the different options and how to use? I would gladly write up the details and even compile them, if it helps. Anything to give back to this group and help you guys out. Edited February 23, 2022 by saxmeister Quote Link to comment Share on other sites More sharing options...
+mksmith Posted February 23, 2022 Share Posted February 23, 2022 4 hours ago, saxmeister said: @mksmith I know this is an older thread, but could we think about having a standard directory with the atascii font(s) in the repo? I'm thinking examples of the complete Atari ASCII, alphachars only, numbers only, etc. in one place with a README file that would explain the different options and how to use? I would gladly write up the details and even compile them, if it helps. Anything to give back to this group and help you guys out. I'd love to write a sidebar or window in VSCode to allow proper access to the examples so people can get easy access and/or create a project from them. Just need a little bit of time to do that but I need to get back into ADS very soon to clean up a few things so will do then. 3 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.