Ant attack map in usable format?

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

  • What do you mean with usable?

    BTW, you have maps on infoseek and the tipshop.
    I was there, too
    An' you know what they said?
    Well, some of it was true!
  • Zup wrote: »
    What do you mean with usable?

    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.
  • What's wrong with using the game binary? It's in a very simple format.
    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);
    			}	
    		}
    	}	
    
    }
    
  • Thanks a lot for that code, I'll give it a try. (Just need to find antattac.sna now! It's all txz and taps these days...).
  • Did you need an imaged map as well (maybe not?) The one by El Elfo Oscuro on Pavel's site is excellent:

    https://maps.speccy.cz/map.php?id=AntAttack&sort=4&part=1&ath=

  • Thanks @spider, I think I've seen that one, but I need a digital format I can read in.

    @John Elliot: will your program work on a .Z80 file of AA?
    Thanked by 1spider
  • No - if your emulator can't save in .SNA directly, use SPCONV to convert from .Z80 to .SNA.
  • Bloody hell, it only went and worked! I had to get the Fuse utils since SPConv doesn't want to run on Windows 10, and I also had to rewrite John's code in Java since I only have C++ in Visual Studio and have no idea what I'm doing and it came up with loads of errors. But after all that, I got this:-

    fSbekqz.png

    @JohnElliott thanks for your help.
  • Wow, I love that!!!
    I wanna tell you a story 'bout a woman I know...
  • Ooo, that looks nice !!
    So far, so meh :)
  • Thanks for your kind words. Shouldn't be long now before theres something releasable.
  • I'm not sure why the C didn't build in Visual Studio, because that's what I wrote it in. But as long as it worked for you all's well.
  • Very impressive !
  • edited November 2018
    I'm not sure why the C didn't build in Visual Studio, because that's what I wrote it in. But as long as it worked for you all's well.

    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:-

    Post edited by SteveSmith on
  • SteveSmith wrote: »
    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.

    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!).
  • RobeeeJay wrote: »
    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.
  • edited November 2018
    Just seen this on FB

    NDndyOA.jpg

    Just downloaded and played it, it's very old. 2006.
    Post edited by rich_chandler on
    I wanna tell you a story 'bout a woman I know...
  • In a similar vein, I don't suppose anyone has the Gauntlet maps in digital format, or a program that can decode them from the .sna? :)
Sign In or Register to comment.