English Amiga Board Advanced enemy paths and connected sprites on old hardware
 User Name Remember Me? Password
 Register Amiga FAQ Rules & Help Members List  /  Moderators List Today's Posts Mark Forums Read

 24 August 2017, 11:23 #1 MickGyver Registered User   Join Date: Oct 2008 Location: Finland Posts: 246 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: Arrays with relative x and y coordinates that directly sets the position of an object, or work as waypoints that the object moves between. Lookup tables or approximation functions for trigonometric functions. 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 zero Registered User   Join Date: Jun 2016 Location: UK Posts: 162 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
Old_Bob
BiO-sanitation Battalion

Join Date: Jun 2017
Location: Scotland
Posts: 34
Quote:
 Originally Posted by witchmaster 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: Arrays with relative x and y coordinates that directly sets the position of an object, or work as waypoints that the object moves between. Lookup tables or approximation functions for trigonometric functions.
For something like the big snake in R-Type, or the attack patterns in Galaga, I'd think a simple array would be both the easiest to program, and the fastest to execute. You have to blow a bunch of memory, of course, but there's no time consuming calculations to be done and if everything behaves the same way, every time, i'm thinking it would be the best method.

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 zero Registered User   Join Date: Jun 2016 Location: UK Posts: 162 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 invent pixels   Join Date: May 2014 Location: Australia Age: 47 Posts: 180 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 MickGyver Registered User   Join Date: Oct 2008 Location: Finland Posts: 246 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
Akira
Registered User

Join Date: May 2001
Location: New York
Posts: 19,265
Quote:
 Originally Posted by Old_Bob 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 trigonometry witchcraft, of which you speak?
Wasn't there an Amiga game that did something similar?
I'm thinking of a Turrican boss or something, maybe. But can't quite place it.

06 December 2017, 05:51   #8
OmegaMax
Knight Of The Kingdom

Join Date: Feb 2016
Location: Mordroc's Castle
Posts: 130
Quote:
 Originally Posted by zero 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.
This is from Section Z,Capcom nes game.

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)

 Similar Threads Thread Thread Starter Forum Replies Last Post krustur Coders. C/C++ 2 20 October 2014 23:46 thomas support.WinUAE 1 13 August 2013 19:10 rsn8887 support.WinUAE 9 27 August 2010 06:56 Toni Wilen request.UAE Wishlist 0 16 August 2009 16:06 OSH support.WinUAE 3 07 January 2009 12:31

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home News Main     Amiga scene     Retrogaming General Discussion     Nostalgia & memories Support     New to Emulation or Amiga scene         Member Introductions     support.WinUAE     support.WinFellow     support.OtherUAE     support.FS-UAE     support.Hardware         Hardware mods         Hardware pics     support.Games     support.Demos     support.Apps     support.Amiga Forever     support.Amix     support.Other Requests     request.UAE Wishlist     request.Old Rare Games     request.Demos     request.Apps     request.Modules     request.Music     request.Other     Looking for a game name ?     Games images which need to be WHDified abime.net - Hall Of Light     HOL news     HOL suggestions and feedback     HOL data problems     HOL contributions abime.net - Amiga Magazine Rack     AMR news     AMR suggestions and feedback     AMR data problems     AMR contributions abime.net - Home Projects     project.Amiga Lore     project.EAB     project.IRC     project.Mods Jukebox     project.Wiki abime.net - Hosted Projects     project.aGTW     project.APoV     project.ClassicWB     project.Jambo!     project.Green Amiga Alien GUIDES     project.Maptapper     project.Sprites     project.WinUAE - Kaillera Other Projects     project.Amiga Demo DVD     project.Amiga Game Factory     project.CARE     project.EAB File Server     project.CD32 Conversion     project.Game Cover Art         GCA.Feedback and Suggestions         GCA.Work in Progress         GCA.Cover Requests         GCA.Usefull Programs         GCA.Helpdesk     project.KGLoad     project.MAGE     project.Missing Full Shareware Games     project.SPS (was CAPS)     project.TOSEC (amiga only)     project.WHDLoad         project.Killergorilla's WHD packs Misc     Amiga websites reviews     MarketPlace         Swapshop     Collections     EAB's competition Coders     Coders. General         Coders. Releases         Coders. Tutorials     Coders. Asm / Hardware     Coders. System         Coders. Scripting         Coders. Nextgen     Coders. Language         Coders. C/C++         Coders. AMOS         Coders. Blitz Basic Off Topic     OT - General     OT - Technical     OT - Entertainment     OT - Sports     OT - Gaming

All times are GMT +2. The time now is 13:49.

 -- EAB3 skin ---- EAB2 skin ---- Mobile skin Archive - Top