Search found 92 matches
- Wed Jul 14, 2021 2:05 am
- Forum: Programming
- Topic: Any good examples of 3D vector programming?
- Replies: 134
- Views: 6914
Re: Any good examples of 3D vector programming?
A z-buffer parallelises trivially and has a simple O(1) data structure so it’s a great choice for hardware, but even then it’s rarely implemented naively. There are both hierarchical and deferred implementations in use today. The main problem with span buffers is that you’re either keeping a linear ...
- Tue Jul 13, 2021 4:44 pm
- Forum: Programming
- Topic: Any good examples of 3D vector programming?
- Replies: 134
- Views: 6914
Re: Any good examples of 3D vector programming?
Does anybody know about a fast assembler algorithm for erasing a quad polygon and a triangle (filling with 0)? Everything I found was only for filling an empty triangle etc., but I need to erase it with all possible lines inside. So, a complete fill? The classic serial approach for convex polygons ...
- Mon Jun 28, 2021 10:14 pm
- Forum: Programming
- Topic: Any good examples of 3D vector programming?
- Replies: 134
- Views: 6914
Re: Any good examples of 3D vector programming?
I can offer you my effort for the Sam Coupé as something of an example that's broadly similar to how you'd go about things on a Spectrum, but I'm not sure about good . The biggest misstep is in the approach taken to line clipping, I think — I'm doing full plane arithmetic when I should have just us...
- Thu Jun 17, 2021 2:38 pm
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
restricted yourself to a 128kb machine for 4x8, you could do full colour by writing to the attributes only. How were you planning on achieving 8x4 pixel precision with your colour-setting function on a 128K machine? The attributes are still 8x8. I was at error — I neglected to think about multiway ...
- Thu Jun 17, 2021 2:31 pm
- Forum: Programming
- Topic: Any good examples of 3D vector programming?
- Replies: 134
- Views: 6914
Re: Any good examples of 3D vector programming?
Ugh, with hindsight I neglected to go into sufficient detail on that multiplication-by-table thing. It's this: (x+y)^2 = x^2 + y^2 + 2xy (x-y)^2 = x^2 + y^2 - 2xy => (x+y)^2 - (x-y)^2 = 4xy Therefore to get x*y you just need a lookup table of f(x) = (x^2)/4; look up f(x+y) and f(x-y) and then get th...
- Wed Jun 16, 2021 10:59 pm
- Forum: Programming
- Topic: Any good examples of 3D vector programming?
- Replies: 134
- Views: 6914
Re: Any good examples of 3D vector programming?
Cool. Then starting tips, in a disorganised fashion: To transform points you'll end up applying a matrix to a point. If you were restricting yourself to Battlezone — everything on a plane, rotating around a single axis — then you might store each object's 3d state as a position and an angle. You can...
- Wed Jun 16, 2021 9:03 pm
- Forum: Programming
- Topic: Any good examples of 3D vector programming?
- Replies: 134
- Views: 6914
Re: Any good examples of 3D vector programming?
Thank you, I'll look at it. It looks a bit complicated, but it's probably just because I've never made vector graphics. I should probably take just some bits from it and make a little test. Yeah, sorry — it started off relatively simple and then in my naivety I think I made some bad choices in purs...
- Wed Jun 16, 2021 8:54 pm
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
Thing is, your 128K routine either has less than half of the running time it had before while the CPU manages the multicolour effect, or you need to write your routine so that it runs in EXACTLY 912 CPU-clock-tick time-slices with no flexibility, and avoids writing to the attribute memory during 12...
- Wed Jun 16, 2021 8:01 pm
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
In case anyone missed it last time around, you CAN do this in colour on a Spectrum - you just need to double the vertical attribute resolution, that's all! :mrgreen: I had a quick think about this with the way that my code works, and here's a neat thing: if you either used 8x16-sized steps, or rest...
- Wed Jun 16, 2021 7:54 pm
- Forum: Programming
- Topic: Any good examples of 3D vector programming?
- Replies: 134
- Views: 6914
Re: Any good examples of 3D vector programming?
I can offer you my effort for the Sam Coupé as something of an example that's broadly similar to how you'd go about things on a Spectrum, but I'm not sure about good . The biggest misstep is in the approach taken to line clipping, I think — I'm doing full plane arithmetic when I should have just use...
- Mon Jun 14, 2021 8:24 pm
- Forum: Announcements
- Topic: Kung Fu Master
- Replies: 31
- Views: 1820
Re: Kung Fu Master
In all fairness, the Kung Fu Master port is a lot better than its sort-of sequel Vigilante.
Though, yeah, dropping the music might have been advisable.
Though, yeah, dropping the music might have been advisable.
- Mon Jun 14, 2021 8:18 pm
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
Slightly off topic but strongly related to the artistic techniques employed, I wanted to add this little study me and a friend did to better understand the graphics generation in isometric landscapes. Well, it's in spanish but it tries to explain graphically; in fact it helped a lot to advance an i...
- Wed Jun 02, 2021 4:43 pm
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
Have to admit, I'm impressed it runs at the speed it does. I assumed it'd be buried in too many decisions to have even the frame rate it has achieved. That's certainly an acceptable refresh rate for a game, though it doesn't necessarily demonstrate it's any quicker than brute-force over-drawing. Ag...
- Sat May 29, 2021 9:59 pm
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
One quick, quite-possibly final update on this: I've implemented the update-the-edges logic described above for a substantial frame rate. We're now talking about 13fps or so full-screen. To me this now feels quite zippy, but I have been staring at the slower versions for a couple of weeks on the way...
- Fri May 28, 2021 9:14 pm
- Forum: Hardware
- Topic: Gotek for the Speccy?
- Replies: 17
- Views: 691
Re: Gotek for the Speccy?
Will that work with a Gotek? It looks like an actual Disk Drive interface, like the ones from back in the day. It apparently uses the regular Shugart drive interface, so it should. EDIT: oh, better than that — somebody asked exactly your question in the comments at the bottom: Will this work with a...
- Wed May 26, 2021 6:55 pm
- Forum: Sinclair Miscellaneous
- Topic: New magazine Our Sinclair
- Replies: 32
- Views: 1339
Re: New magazine Our Sinclair
Pure Sinclair? More Sinclair?
- Wed May 26, 2021 2:26 am
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
Too late again for an edit; I think I've managed to tidy up the code to the point where it, umm, 'accurately represents my abilities'. So: this is the corresponding Github.
- Tue May 25, 2021 6:48 pm
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
So do you think there's more room for speed improvements? Unambiguously large room for improvement; I'm probably spending at least 300 cycles or so on determining the two triangles that go into any individual diamond, and I'm currently doing that 808 times per frame in the fullscreen version if my ...
- Tue May 25, 2021 3:21 pm
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
Yes, but to avoid anybody else drawing an improper conclusion: I've reprocessed the map from its original 16kb to a different 16kb; it takes up exactly the same footprint as it did before, and has exactly the same quantity of information — it's still a single bit per cube, and all cubes are stored....
- Tue May 25, 2021 2:28 pm
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
[quote=Tommo In Ant Attack the square at (x, y, z) is represented by bit z stored in the map at (x, y). In my code that square is instead represented by bit z at (x+z, y+z). So the full 3d map is present and easy to lookup, and rendering proceeds from that, but I've basically got the rows establish...
- Tue May 25, 2021 12:56 pm
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
- Tue May 25, 2021 4:24 am
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
I'll try, I'll possibly fail, I'll report. I wanted a quantifiable standard but I guess I'll just cross my fingers that the goalposts don't move. Being a suboptimal person, I've implemented a really suboptimal version of the algorithm discussed above. Specifically, it: fully recalculates the triang...
- Tue May 18, 2021 2:22 am
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
You posted your C function, not 'pseudo-code'. Read this post . Is it true or is it false to say that I've posted pseudocode? See also the step-by-step instructions in this post . I count up to five levels of nested conditions inside your main loop for each 'cell' of your renderer. Which part of th...
- Mon May 17, 2021 8:23 pm
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
My Z80 skills are meagre, so I hope you'll accept something that is sufficiently fast to prove that a more competent programmer could do a more competent job. So what you're saying is, your knowledge of the Spectrum is meagre, but you still think you know better than everyone on a dedicated Spectru...
- Mon May 17, 2021 5:39 pm
- Forum: Programming
- Topic: How is a 3D game like Ant Attack implemented?
- Replies: 69
- Views: 7921
Re: How is a 3D game like Ant Attack implemented?
I don't know how to state this any more clearly: the different with Ant Attack, and only Ant Attack, and not all those other isometric titles, and only Ant Attack, and Zombie Zombie is: no in-game elements ever occupy more than one block ; I distinguished the level from the sprites because then: th...