Full Colour Ant Attack Landscape Editor 'Pants Attack'

Show us what you're working on, (preferably with screenshots).
Post Reply
User avatar
Joefish
Rick Dangerous
Posts: 2054
Joined: Tue Nov 14, 2017 10:26 am

Full Colour Ant Attack Landscape Editor 'Pants Attack'

Post by Joefish »

Presenting Pants Attack.
Because it's a bit pants really.

Everyone else is writing an Ant Attack renderer so why can't I? :lol:

This one uses a simple multicolour function to double the vertical attribute resolution, then fills the screen with alternate triangular wedges.
Then you only need set the attributes to draw any isometric blocks you want.

You can pan the view around with QAOP (there's nothing initially to see except the starting structure I've built in the centre of the map).
Bring up an edit cursor with E and then move it with WSUI. Press 0-7 to add columns. See the other controls shown on screen to draw anything more complex. Save off the top 16K of RAM to preserve your map forever! Why not share your creations?

Full source code is available, if someone wants to make more of it. What's there is pretty inefficient and full of duplication. I may revisit it in future and add sprites so you can run around and climb on the landscape, but for now, you can do whatever you want with it. There's a 48K version and a 128K version, for the multicolour timing. The 128K version should be OK on both +2s and +2As, although it may glitch a bit occasionally in the top-right corner.

http://railtron.com/files/spectrum/Pants_Attack.zip

Image

Someone could add it to the Speccy archive, if you want... Completely free code and source...
User avatar
Woodster
Drutt
Posts: 48
Joined: Mon Nov 13, 2017 12:17 pm

Re: Full Colour Ant Attack Landscape Editor 'Pants Attack'

Post by Woodster »

That's a quite brilliant take on the rendering actually!
User avatar
Joefish
Rick Dangerous
Posts: 2054
Joined: Tue Nov 14, 2017 10:26 am

Re: Full Colour Ant Attack Landscape Editor 'Pants Attack'

Post by Joefish »

I noticed Snodgits did scrolling isometric graphics in colour, but that scrolled two characters left/right for every one up/down, to avoid the complications of needing three colours in one character square. I've wondered for a while about using double vertical attributes in isometric graphics, but only recently realised I could pre-draw the triangular edges.

They work a bit like the black and white squares on a chessboard; because the sloping edges trace around the grid in diagonals, it means the opposite slope can fit in in the in-between squares forming the opposite diagonal grid. All pre-drawn in pixels and just needing their attributes setting, like Knot in 3D.
Last edited by Joefish on Sun Feb 09, 2020 3:15 pm, edited 1 time in total.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2641
Joined: Mon Nov 13, 2017 3:16 pm

Re: Full Colour Ant Attack Landscape Editor 'Pants Attack'

Post by Ast A. Moore »

Wow. Mighty impressive. Don’t have the time to look at the source, but a centering button would be nice. I just QAOPed the whole thing out into oblivion and can’t bring it back. :lol: (And the fact that I’ve never, ever used the bloody QAOP keys on the Speccy doesn’t help either.)
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
Joefish
Rick Dangerous
Posts: 2054
Joined: Tue Nov 14, 2017 10:26 am

Re: Full Colour Ant Attack Landscape Editor 'Pants Attack'

Post by Joefish »

This is the character grid without the multicolour, so you can see the pre-drawn slope edges:

Image

Was anyone else ever given isometric triangle paper to draw on in CDT class?
Last edited by Joefish on Sun Feb 09, 2020 1:50 pm, edited 1 time in total.
User avatar
Joefish
Rick Dangerous
Posts: 2054
Joined: Tue Nov 14, 2017 10:26 am

Re: Full Colour Ant Attack Landscape Editor 'Pants Attack'

Post by Joefish »

Ast A. Moore wrote: Sun Feb 09, 2020 1:33 pm Wow. Mighty impressive. Don’t have the time to look at the source, but a centering button would be nice. I just QAOPed the whole thing out into oblivion and can’t bring it back. :lol: (And the fact that I’ve never, ever used the bloody QAOP keys on the Speccy doesn’t help either.)
Those are the hazards of wandering an unknown landscape! :mrgreen:
As you scroll, you could press E and 1 to leave a trail of breadcrumbs...
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2641
Joined: Mon Nov 13, 2017 3:16 pm

Re: Full Colour Ant Attack Landscape Editor 'Pants Attack'

Post by Ast A. Moore »

Joefish wrote: Sun Feb 09, 2020 1:38 pm As you scroll, you could press E and 1 to leave a trail of breadcrumbs...
Too late for that, I’m afraid. I’m never getting back home . . . :(
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
Joefish
Rick Dangerous
Posts: 2054
Joined: Tue Nov 14, 2017 10:26 am

Re: Full Colour Ant Attack Landscape Editor 'Pants Attack'

Post by Joefish »

Ast A. Moore wrote: Sun Feb 09, 2020 1:41 pm
Joefish wrote: Sun Feb 09, 2020 1:38 pm As you scroll, you could press E and 1 to leave a trail of breadcrumbs...
Too late for that, I’m afraid. I’m never getting back home . . . :(
With the code still running, apply POKEs:
POKE 48903,126
POKE 48904,126

That'll put the view back in the middle of the map.
Post Reply