... and 3rd group who can analyze, annotate and comment sources as bare disassembly is just useful as source files but not for understanding of what is executed here and there.
Laser squad a.i.
Re: Laser squad a.i.
I've been disassembling Laser Squad recently with Spectrum Analyser. I'm still in the early days but I've already figured a few things out. Using the new Lua feature I've written a real-time map viewer that shows you the entire map while the game is running. It's quite cool because you can see the CPU controlled player moving around in the hidden movement phase.
I took a gif of me playing it here. Bit of a boring gameplay example though.
![Image](https://i.postimg.cc/5XMy6Mzn/ls3.gif)
The analysis files are here:
https://github.com/TheGoodDoktor/Spectr ... aser_squad
(This is my disassembly but not my repo. I'm not the author of the Spectrum Analyser tool. That's the TheGoodDoktor)
Let me know if anybody wants to muck around with it themselves and I can help you get it working.
I'll let you know if I figure out how the enemy AI works.
![Cool 8-)](./images/smilies/icon_cool.gif)
I took a gif of me playing it here. Bit of a boring gameplay example though.
![Image](https://i.postimg.cc/5XMy6Mzn/ls3.gif)
The analysis files are here:
https://github.com/TheGoodDoktor/Spectr ... aser_squad
(This is my disassembly but not my repo. I'm not the author of the Spectrum Analyser tool. That's the TheGoodDoktor)
Let me know if anybody wants to muck around with it themselves and I can help you get it working.
I'll let you know if I figure out how the enemy AI works.
Re: Laser squad a.i.
I saw this a little while ago - great work! I'm currently midway through merging two Chaos skoolkit disassemblies - I found your style very readable and it's influenced what i'm doing - thanksArlorean wrote: ↑Mon Oct 16, 2023 10:53 am
It is slow going but I'm trying to get a better understanding of how the chance to hit and damage mechanics worked. There are a lot of data tables for weapons, units and map elements that aren't formatted anywhere currently but I'll try to add a data dump tool to format these at some point. I've not looked into SkoolKit but the Spectrum Analyser tool says it does export to that format as well.
![Smile :)](./images/smilies/icon_e_smile.gif)
I tried the skool file export on your SpectrumAnalyser progress - skool2* failed at a duplicate label, then at another error i didn't have enough time to debug. I'm guessing skoolfile support is still a work in progress, but it's really close and I'm and looking forward to cross-compatibility opening up yet more ways for people to understand, appreciate and tinker with old games.
That looks so neat! I really love the ability to watch the hidden movement phases - SpectrumAnalyser looks to have so many powerful ways to explore and tweak the code - excited to see how that development progresses.crabfists wrote: ↑Mon Jan 22, 2024 6:19 pm I've been disassembling Laser Squad recently with Spectrum Analyser. I'm still in the early days but I've already figured a few things out. Using the new Lua feature I've written a real-time map viewer that shows you the entire map while the game is running. It's quite cool because you can see the CPU controlled player moving around in the hidden movement phase.![]()
I took a gif of me playing it here. Bit of a boring gameplay example though.
The analysis files are here:
https://github.com/TheGoodDoktor/Spectr ... aser_squad
(This is my disassembly but not my repo. I'm not the author of the Spectrum Analyser tool. That's the TheGoodDoktor)
Let me know if anybody wants to muck around with it themselves and I can help you get it working.
I'll let you know if I figure out how the enemy AI works.
I still haven't had much time beyond merging to hunt down the things i'm curious about - and how much similarity/shared code exists between the Gollop games. Directions in Chaos are indexed q-w-e-d-c-x-z-a (FFFF,00FF,01FF,0100...etc) - if you see data strings like that about, then it may be using a similar mechanism for the pre-programmed paths.
Re: Laser squad a.i.
Thanks for the feedback on that. It's the first time I've seriously disassembled anything to reverse engineer it. Some bits were easier than I thought, like screen and keyboard updates, but other bit were very obscure where flags were being written to random bytes in memory and I wasn't sure why.lexi wrote: ↑Thu Jan 25, 2024 10:07 pm
I saw this a little while ago - great work! I'm currently midway through merging two Chaos skoolkit disassemblies - I found your style very readable and it's influenced what i'm doing - thanks
I tried the skool file export on your SpectrumAnalyser progress - skool2* failed at a duplicate label, then at another error i didn't have enough time to debug. I'm guessing skoolfile support is still a work in progress, but it's really close and I'm and looking forward to cross-compatibility opening up yet more ways for people to understand, appreciate and tinker with old games.
I couldn't get it to generate the skoolfile either. It's a shame because I think it would be useful to format the data tables, map layout, and sprites, in a more readable way.
One great takeaway for me was the idea of moving a cursor around for the player and then using the same cursor movement for the AI. I used that approach on a game jam we just did and it was really easy to switch it from two player to one player with AI. We did the whole (dumb) AI code in less than 5 hours. Thanks Julian Gollop for teaching me how to program a Unity game in C# by reverse engineering your Z80 code from the 80's!
Re: Laser squad a.i.
Thanks! When I got the viewer working it was a nice surprise to see the AI players moving around. Made me wonder if they could see them moving in development?lexi wrote: ↑Thu Jan 25, 2024 10:07 pm That looks so neat! I really love the ability to watch the hidden movement phases - SpectrumAnalyser looks to have so many powerful ways to explore and tweak the code - excited to see how that development progresses.
I still haven't had much time beyond merging to hunt down the things i'm curious about - and how much similarity/shared code exists between the Gollop games. Directions in Chaos are indexed q-w-e-d-c-x-z-a (FFFF,00FF,01FF,0100...etc) - if you see data strings like that about, then it may be using a similar mechanism for the pre-programmed paths.
Thanks for the tips on AI direction data. I'll keep an eye out for those.
I didn't realise the skool file exporter was broken. I thought it was working. If you could report the issue that would be amazing.
https://github.com/TheGoodDoktor/8BitAnalysers/issues
@lexi and @Arlorean You should come and join us on the Spectrum Analyser Discord server. There is a section where we can talk about Laser Squad.
![Geek :geek:](./images/smilies/icon_e_geek.gif)
https://discord.gg/VQ3m6W4ZRu
Re: Laser squad a.i.
How about the a.i. for Lords of chaos? (Just kidding guys)
It seems like advances are being made. Wouldn't mind knowing how the a.i. makes decisions. But I think the consensus was it was custom code per scenario and pretty dumb .
I.e. the dalek thing that you see down the corridor to the right when you first enter the house. That's probably just told to stand there and take shots at you down the long corridor.
But anyway, still would like to know what you guys uncover.
It seems like advances are being made. Wouldn't mind knowing how the a.i. makes decisions. But I think the consensus was it was custom code per scenario and pretty dumb .
I.e. the dalek thing that you see down the corridor to the right when you first enter the house. That's probably just told to stand there and take shots at you down the long corridor.
But anyway, still would like to know what you guys uncover.
Re: Laser squad a.i.
This is something I've been meaning to do for some time. I'll get familiar with Spectrum Analyser then get stuck in and give you a hand. I might need to complete a couple of tutorials on how to use github as well.Arlorean wrote: ↑Mon Oct 16, 2023 10:53 am I made start on disassembling the original single player Rebelstar game using the Spectrum Analyser tool.
The current progress is in this GitHub repository:
https://github.com/Arlorean/Rebelstar
It is slow going but I'm trying to get a better understanding of how the chance to hit and damage mechanics worked. There are a lot of data tables for weapons, units and map elements that aren't formatted anywhere currently but I'll try to add a data dump tool to format these at some point. I've not looked into SkoolKit but the Spectrum Analyser tool says it does export to that format as well.
Re: Laser squad a.i.
Please add skoolkit export to github repository. Native Spectrum Analyser file Analysis.json is totally human UNreadable. And it is not better case when I try to readd diff of Analysis.json commits. Totally unreadable.
Please mention which versions / releases you disassemble in github commits too. Or attach snapshot files if possible. There are at least 3 releases of Laser Squad in ZXDB now. They are surely slightly different. To feel a bit more fun... each Laser Squad scenario differs at addresses B621-FFFF because level data is loaded there. I gues your disassembly is scenario 1.
It is hard to guess sometimes what game exactly is disassembled (Batman). It may probably Batman 3D by Ocean or it may be Batman: The Caped Crusader or Batman: The Movie.
Re: Laser squad a.i.
@marenja
Thanks for the feedback. I created a new repository with snapshots included. Let me know if it's not clear how to get it up and running.
https://github.com/Colourclash/LaserSquad
I will try to create a skool file if I get the chance.
Don't try to read the analysis.json file. It's not meant to be human readable.
Thanks for the feedback. I created a new repository with snapshots included. Let me know if it's not clear how to get it up and running.
https://github.com/Colourclash/LaserSquad
I will try to create a skool file if I get the chance.
Don't try to read the analysis.json file. It's not meant to be human readable.
Re: Laser squad a.i.
I had a glance into project. It is already loadable and running but i have several problems with Spectrum Analyser.
I have no idea about the way to add multiline comments. I haven't found such option in the mouse popup menu or the program main menu. I can add only single line comments that are placed after asm instructions. But multiline comments are some other sort of object. They are placed from start of line and are edited in the editbox labeled as "comment text" - see lower red frame in the screenshot. I can change text after "comment text" was created.
![Image](https://i.postimg.cc/bdjcD69B/span-desktop.png)
LUA scripts are inactive. There is no tab for "game viewers" at all. See upper red frame. I have already tried to drag-&-drop those files above emulator window but without any success. Do I need to install LUA separately from Spectrum Analyzer?
It does not save project sometimes. It is better to say saving project does not have any effect and reports no error. This dangerous situation gives you a habbit to save often, close the project and reopen it - at least not many changes will be lost.
The key B formats numbers in binary form %01010101 but it is a single direction result and there is no option to format back into the hex form.