24 August 2017, 11:23 | #1 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Advanced enemy paths and connected sprites on old hardware
TL;DR : How were these things made back then?
Hi! In a game I'm currently making, I made a sea monster with tentacles built up of several sprites. I'm using GameMaker Studio and the available tools to create paths helped a lot. On old hardware (like the Amiga), this wouldn't be as easy. I have done some research on how these things could have been made, and these are some ideas:
Examples of this are some of the bosses in R-Type, the snakes in First Samurai and the enemy flying patterns in Galaga. The snake in R-Type has a quite advanced moving pattern, flying into and out of holes, so positioning needs to be exact. From the looks of it, it either moves in a straight line or an arc (@ 3:30 in the video): [ Show youtube player ] It would be great to hear your thoughts on techniques used to create these things, maybe you even have direct experience and have done something similar on the Amiga! Examples: [ Show youtube player ] (@ 2:05 in the video) [ Show youtube player ] (@ 20:35 in the video) Last edited by MickGyver; 24 August 2017 at 11:31. |
24 August 2017, 12:23 | #2 |
Registered User
Join Date: Jun 2016
Location: UK
Posts: 428
|
In R-Type I think it is all just lookup tables with the coordinates predefined. Same in Galaga, but with the ability to specify an offset and mirroring etc.
For First Samurai it looks like they use a simple spline algorithm. You can do them pretty efficiently in assembler with integer maths and some lookup tables. An even simpler option is to have every object in the chain move slowly towards a straight line between the base and the anchor, which with movement will create nice curves. |
24 August 2017, 12:29 | #3 | |
BiO-sanitation Battalion
Join Date: Jun 2017
Location: Scotland
Posts: 151
|
Quote:
What has puzzled me for a while is stuff like the tentacle type things coming out of the Huge-Brain-With-Eyeball boss at the end of the first level of Salamander that follow you around the screen. Very mysterious. Possibly some of this trigonometry witchcraft, of which you speak? B Last edited by Old_Bob; 25 August 2017 at 23:37. |
|
24 August 2017, 17:00 | #4 |
Registered User
Join Date: Jun 2016
Location: UK
Posts: 428
|
If you look at Galaga is seems that the enemies are programmed with a simple Logo like language. "Move x+1, y-2, repeat 25 times" kind of thing. That way only the changes in direction need to be stored.
At the time they would likely have been hand coded by the programmers, as I doubt there were any prototyping tools available. |
24 August 2017, 23:30 | #5 |
pixels
Join Date: May 2014
Location: Australia
Age: 52
Posts: 476
|
Hi Witchmaster, you may be able to use software like this. https://phaser.io/tutorials/coding-tips-008
coders here will be able to say if this tool or others like it are useful. Good thread as it will be one of our issues for next Amiga game. |
25 August 2017, 07:26 | #6 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Thanks so far @zero, @Old_Bob and @invent, I appreciate the input. I like that simple idea of moving the sprites towards a line between the base and anchor.
About that Salamander boss, yeah, the arms are slowly changing direction towards the player. The video below shows the MSX version and by the looks of it, the parts of the boss are not updated every frame to ease up the work for the processor. [ Show youtube player ] (@ 5:44 in the video) @invent, that tools seems useful, I was working all yesterday on something similar for GameMaker. Good tutorial also btw. |
25 August 2017, 15:11 | #7 | |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,645
|
Quote:
I'm thinking of a Turrican boss or something, maybe. But can't quite place it. Interesting thread all round! Looking forward to learn more. |
|
06 December 2017, 05:51 | #8 | |
Knight Of The Kingdom
Join Date: Feb 2016
Location: It's a bald world!
Posts: 179
|
Quote:
Code:
;================================================== ;Data ;Byte 1 = NmeXVelocity ;Byte 2 = NmeYVelocity ;Byte 3 = NmeMovementPatternTimer ;================================================== MansaLogicTable: 06:871A:FE 02 05 ;Move x-2, y+2, repeat 5 times 06:871D:FE 02 05 ;Move x-2, y+2, repeat 5 times 06:8720:FE FE 05 ;Move x-2, y-2, repeat 5 times 06:8723:FE FE 85 ;Move x-2, y-2, repeat 5 times ,Reset Marker ;================================================== LeagoLogicTable: 06:8CE6:FE 00 0A ;Move x-2, y+0, repeat 10 times 06:8CE9:FE 03 0A ;Move x-2, y+3, repeat 10 times 06:8CEC:FE 05 0A ;Move x-2, y+5, repeat 10 times 06:8CEF:FE 09 0A ;Move x-2, y+9, repeat 10 times 06:8CF2:FE 05 0A ;Move x-2, y+5, repeat 10 times 06:8CF5:FE 03 0A ;Move x-2, y+3, repeat 10 times 06:8CF8:FE 00 0A ;Move x-2, y+0, repeat 10 times 06:8CFB:FE FD 0A ;Move x-2, y-3, repeat 10 times 06:8CFE:FE FB 0A ;Move x-2, y-5, repeat 10 times 06:8D01:FE F7 0A ;Move x-2, y-9, repeat 10 times 06:8D04:FE FB 0A ;Move x-2, y-5, repeat 10 times 06:8D07:FE FD 8A ;Move x-2, y-3, repeat 10 times ,Reset Marker Sorry for replying to an old thread but maybe someone would be interested in this. Last edited by OmegaMax; 06 December 2017 at 06:22. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
vbcc multiple include paths | krustur | Coders. C/C++ | 2 | 20 October 2014 23:46 |
relative paths do not apply to new files | thomas | support.WinUAE | 1 | 13 August 2013 19:10 |
Relative paths (WAS: Has anybody ever gotten Shiftrix to work?) | rsn8887 | support.WinUAE | 9 | 27 August 2010 06:56 |
Relative paths | Toni Wilen | request.UAE Wishlist | 0 | 16 August 2009 16:06 |
paths | OSH | support.WinUAE | 3 | 07 January 2009 12:31 |
|
|