Ant attack map in usable format?
in Games
Does anyone have the map from Ant Attack in any kind of format (apart from the format called "the game binary"). I've rewritten the game using a voxel engine, and the only bit left is to actually create the proper city. If someone has the map, it would save me loads of time. Also, Splat? Thanks!
Comments
BTW, you have maps on infoseek and the tipshop.
An' you know what they said?
Well, some of it was true!
I meant "digital" format that I can read into my program (sorry, I should have put that). Ideally pseudo-CSV, but I should be able to decode most formats.
This C program will extract the map to a text file:
#include <stdio.h> #include <stdlib.h> unsigned char map[16384]; int main(void) { FILE *fp = fopen("antattac.sna", "rb"); int x,y,z; if (!fp) { perror("antattac.sna"); return 1; } fseek(fp, 0xC000 - 0x3FE5, SEEK_SET); fread(map, 1, 16384, fp); fclose(fp); for (z = 0; z < 8; z++) { unsigned char mask = (0x01 << z); for (y = 0; y < 128; y++) { for (x = 0; x < 128; x++) { if (map[y*128+x] & mask) putchar('#'); else putchar('-'); } putchar('\n'); } printf("--\n"); } }Or this will produce a CSV file listing the x,y,z coordinates of every block:
#include <stdio.h> #include <stdlib.h> unsigned char map[16384]; int main(void) { FILE *fp = fopen("antattac.sna", "rb"); int x,y,z; if (!fp) { perror("antattac.sna"); return 1; } fseek(fp, 0xC000 - 0x3FE5, SEEK_SET); fread(map, 1, 16384, fp); fclose(fp); for (z = 0; z < 8; z++) { unsigned char mask = (0x01 << z); for (y = 0; y < 128; y++) { for (x = 0; x < 128; x++) { if (map[y*128+x] & mask) printf("%d,%d,%d\n", x, y, z); } } } }https://maps.speccy.cz/map.php?id=AntAttack&sort=4&part=1&ath=
@John Elliot: will your program work on a .Z80 file of AA?
@JohnElliott thanks for your help.
Your code was fine and just what I needed, it was just my setup I think. It came up with messages like "'fopen': This function or variable may be unsafe. Consider using fopen_s instead.", but doing that just led to more errors, and it was quicker for me to convert it. I'm no expert in C at all.
Here's a short vid the game:-
You may have just had warnings as errors turned on.
The video is cool, and just made me want a VR version of Ant Attack (to go along with my imaginary VR version of The Sentinel!).
That would be great. I'm recreating other Speccy games (you might have seen the other arcade machines at the start of the video). The Sentinal is on my list, I just need to find the 3D models for it. The Sentinal would be ideal for VR since you could do it all without controls.
Just downloaded and played it, it's very old. 2006.