H μαγεια του Retro game programming

Wally

Retired Admin
Joined
19 Ιαν 2006
Μηνύματα
25.785
Αντιδράσεις
4.254
Πολλες φορες επεσα επανω σε προγραμματιστικες τεχνικες που χρησιμοποιηθηκαν σε 8bit games. Δεν κραταγα bookmarks οποτε πολλα τα εχω χασει. Σημερα επεσα πανω σε ενα πολυ ομορφο ποστ που αφορα κυριως το Starion και το Starquake (και ριχνει λιγη χολη στο ΜΜ και JSW)

I started just hacking games for pokes, but moved on to picking them apart to see how they worked. Some did seem to be quite a mess, but others were obviously very well structured. Starion and Starquake are the ones that stick in my mind most.
Starion's gameplay was a bit dull IMO, but the code was excellent. Aside from the full-screen countdown the vector graphics were the fastest around at the time. The line drawing was unrolled to all 8 possible directions, to be as fast as possible. The back buffer was cleared with the stack and after drawing it was copied to the display using the stack again. As expected, the vector calculations were done as fixed point with the low byte holding the fractional part. Trig used look-up tables with rotations done cummulatively rather than from scratch so visible errors crept in if not recalculated after a while. The ship data relied on most shapes being symmetrical for parallel drawing on each sides, though it didn't have to be used. All round it was the kind of things you'd expect from a Maths student/graduate. I even managed to extract enough of the whole engine to design my own shapes to rotate with the keyboard - might even still have a +D snapshot of it somewhere!

I remember Starquake for being very modular overall, so easy to hack and pick apart. Superb game too, with perfect use of colour and sound, and all running at a silky smooth 50Hz. The sprites were all drawn at the start of the interrupt, and using the stack so in-game Multiface snapshots could easily corrupt them. Interrupts were also re-enabled during their drawing, as it expected no further interrupt to occur until the next frame. Each of the scenery graphics had an 8x6 bit array for used squares, and were followed by 8 data and 1 attr byte for each used block. Room definitions just picked a graphic number and position. The bright bit was used for scenery collision detection rather than keeping track separately, with bright items being solid. If you reset the bright bit from a Multiface program (as I did) you can pass through everything! I remember extracting the sound effects routine too, which I didn't fully understand but I remember being surprisingly compact for the wide range of sounds it produced. I can't quite remember how many bytes defined each effect but I don't think it was more than about 10.

On the other side, I remember being horrified that Manic Miner and/or JSW use LDIR for moving around display data. They kept a copy of the empty room, and for each frame they would LDIR that to a working space, then add the sprites, then LDIR to the main screen. Early days I suppose, and the gameplay more than makes up for it

There were so many other great games that it's hard to know where to start listing them...

Si
EDIT

Τωρα που το θυμηθηκα βρηκα καποια links με τα κολπα του Singleton στο Lords of Midnight για να χωρεσει σε <48 kb κοντα στις 48000 τοποθεσιες (Landscaping , Data formats και αλλα)
 
Δεν διάβασα ακόμα τα κόλπα του LoM, αλλά απ'ό,τι θυμάμαι είχε ανάλυση σε παλαιότερο (αρκετά) Retro Gamer. Ενδιαφέρον, αλλά βέβαια αξίζει να σημειωθεί ότι οι '48000 τοποθεσίες' είναι ψιλομούφα...
 
"Μούφα" σαν του Elite με τους generated (αλλά τόσο διαφορετικούς μεταξύ τους!) πλανήτες. Πανέξυπνα trick για να χωρέσεις μεγάλους κόσμους σε ελάχιστο χώρο στην μνήμη.

Συγκεκριμένα πάντως, το LoM έλεγε Landscapes, που δεν είναι το ίδιο με τις τοποθεσίες. Ουσιαστικά εννοούσε ότι μπορείς να έχεις 48000 διαφορετικές "θέες", οι οποίες εξαρτώνταν από το σε ποιά κατεύθυνση κοίταζες και το τι περιείχαν τα επόμενα tiles του χάρτη στην κατεύθυνση που κοίταζες. Το παιχνίδι το είχα τερματίσει και είχα κάνει και τον χάρτη του μόνος μου. Ήταν κανονικά grid-based με τετραγωνάκια που είχαν τιμές σαν "βουνό", "δάσος", "κάστρο" κλπ κλπ

Αναρωτιέμαι αν έχω ακόμα πουθενά τον συγκεκριμένο χάρτη για να σας τον δείξω...ίσως κάνω καμμιά ανασκαφή, αν και ψιλοχλωμό το κόβω να υπάρχει ακόμα.

Για την εποχή του πάντως ήταν απίστευτο, όπως και να έχει! Από τα παιχνίδια που πραγματικά απόλαυσα στον υπέρτατο βαθμό!
 
Maddog είπε:
Συγκεκριμένα πάντως, το LoM έλεγε Landscapes, που δεν είναι το ίδιο με τις τοποθεσίες. Ουσιαστικά εννοούσε ότι μπορείς να έχεις 48000 διαφορετικές "θέες"
Πολύ-πολύ σωστή η παρατήρηση... ΟΚ, ήταν όντως πολύ έξυπνο και θρίαμβος του μικροκώδικα, αλλά ας μην τα θέλουμε όλα :)
 
Τωρα που το θυμηθηκα βρηκα καποια links με τα κολπα του Singleton στο Lords of Midnight για να χωρεσει σε <48 kb κοντα στις 48000 τοποθεσιες
Δεν ξέρω για τα 8bit παιχνίδια του Singleton, αλλά τα 16bit ήταν τουλαχιστον επικά. (Midwinter Trilogy, Starlord). Μακάρι να κυκλοφορούσαν remakes για να διορθώσουν ορισμένα προβλήματα στο interface τους. Έχουμε κανένα αρθράκι γι' αυτά το games?
 
Παιδιά δεν ξέρω αν έχει μπει αλλού στο forum, αλλά αυτό το site είναι ένας μικρός θησαυρός που θα εκτιμηθεί ιδιαίτερα από τους φίλους των home micros! Έχει 8 χορταστικές συνεντεύξεις από διάφορους developers της εποχής εκείνης. Ενδεικτικά αναφέρω τους Martin Pedersen (Hybris) και Chris Sorrell (James Pond).

Link: http://www.codetapper.com/amiga/interviews/

Καλή ανάγνωση!

ΥΓ Μην παραλείψετε να ρίξετε μια ματιά στην κατηγορία "sprite tricks", είναι εξίσου ενδιαφέρουσα!!
 
Πίσω
Μπλουζα