|
Post by Minilop on Nov 14, 2020 15:30:55 GMT
To celebrate the launch later today of my new game, I thought I'd do a blog/tutorial on how I rewrote my code from my first game to the new one, for horizontal moving platforms. An explanation with videos, and source code can be found here: How to implement horizontal moving platforms in MPAGD
|
|
|
Post by Packobilly on Nov 15, 2020 12:00:49 GMT
Hi! I saw this link tonight in El Spectrumero’s program. Its very interesting and quite elaborate! Can it be used freely in our developments? Thank you!
|
|
|
Post by Minilop on Nov 15, 2020 13:58:19 GMT
Hi! I saw this link tonight in El Spectrumero’s program. Its very interesting and quite elaborate! Can it be used freely in our developments? Thank you! Of course, do what you like with it. I will be doing some more tutorials, mainly for helping beginners with MPAGD (not you obviously!) I've nearly finished another one and will post it shortly.
|
|
|
Post by Packobilly on Nov 15, 2020 22:37:33 GMT
Hi! I saw this link tonight in El Spectrumero’s program. Its very interesting and quite elaborate! Can it be used freely in our developments? Thank you! Of course, do what you like with it. I will be doing some more tutorials, mainly for helping beginners with MPAGD (not you obviously!) I've nearly finished another one and will post it shortly. Im really newbie to mpagd!! Thank you so much. Expecting this e tutorials! Regards!!
|
|
|
Post by alessandro on Nov 22, 2020 10:02:55 GMT
This is interesting, I considered the idea of creating horizontally moving platforms and actually managed to do it without requiring the player to press the direction button to move with the platform, but I wasn't satisfied with the result because the movement of the player's sprite was rather jerky.
Thanks for sharing.
|
|
|
Post by Minilop on Nov 22, 2020 12:17:04 GMT
This is interesting, I considered the idea of creating horizontally moving platforms and actually managed to do it without requiring the player to press the direction button to move with the platform, but I wasn't satisfied with the result because the movement of the player's sprite was rather jerky. Thanks for sharing. Thanks Alessandro, it sounds like we must have ended up with some similar code the first time around, I'm much happier with the new method.
|
|
|
Post by david911 on May 6, 2022 19:27:11 GMT
Tried this and it just crashes the game now when i use this.
|
|
|
Post by Minilop on May 7, 2022 11:07:31 GMT
Tried this and it just crashes the game now when i use this. Hi, That's strange as I know other people have used it successfully. Which machine are you developing for? The tutorial was based on a Spectrum, if you are writing for an Amstrad I may need to tweak it a bit because of the difference in resolutions.
|
|
|
Post by david911 on May 7, 2022 15:34:02 GMT
Hi yea, its for spectrum zx. I thought it maybe something in my game, so i created a new project. still the same.
I created a new project. created the sprite for the platform added the code to the sprite 1 sprite position and set it to sprite 1 added the player but it doesnt compile,. the game starts and crashes.
I Removed the player code and it still crashes. I re add the player code back. I removed the sprite 1 moving platform code and it doesnt crash.
The resolution im using is full screen spectrum.
|
|
|
Post by Minilop on May 7, 2022 16:30:55 GMT
What error messages are you seeing in the Blue console window?
|
|
|
Post by david911 on May 7, 2022 17:48:32 GMT
AGD Compiler for ZX Spectrum version 0.7.10 (C) Jonathan Cauldwell May 2020 Sourcename: deleteme.agd ELSE without IF on line 295: ELSE ; if the player and platform are not colliding any more ENDIF without IF on line 302: ENDIF Unrecognised instruction on line 317: ENDIFEVENT SPRITETYPE2 Missing ENDIF on line 320:
Output: deleteme.asm 1 file(s) copied. 1 file(s) copied. leader.txt deleteme.asm trailer.txt 1 file(s) copied. SjASMPlus Z80 Cross-Assembler v1.07 RC8 (build 06-11-2008) Pass 1 complete (0 errors) Pass 2 complete (0 errors) agdcode.asm(266): error: Label not found: xxxxxx agdcode.asm(3497): error: Label not found: evnt02 Pass 3 complete Errors: 2, warnings: 0, compiled: 4457 lines, work time: 0.047 seconds 1 file(s) copied.
|
|
|
Post by Minilop on May 7, 2022 19:54:19 GMT
Hi David
Can you try the code below in your platform sprite event (in this example I am using sprite type 1), there's a couple of fixes.
Also, in your error message above, see the part that says: Unrecognised instruction on line 317:
ENDIFEVENT SPRITETYPE2
that means you did not do a new line (hit enter) after the last line of code of sprite type 1. Always make sure you have a new blank line at the end of all your events.
code removed, there's a better version later in this thread
Can you try the code in your platform event.
|
|
|
Post by dettol on May 8, 2022 7:21:44 GMT
Hi, I have been having an issue with moving platforms and it was always jumpy. I added this code but for me it is still jumpy, but in your examples it looks fantastic. When the moving platform comes across and I jump on it I seem to bounce all the way along.
or... is this just what is normal behaviour?
|
|
|
Post by Minilop on May 8, 2022 8:30:44 GMT
Hi, I have been having an issue with moving platforms and it was always jumpy. I added this code but for me it is still jumpy, but in your examples it looks fantastic. When the moving platform comes across and I jump on it I seem to bounce all the way along. or... is this just what is normal behaviour? I'm not sure without seeing your full scripts what might be causing this, I've just tested it again and it seems to be fine. I'd be happy to take a look at your code if it helps.
|
|
|
Post by david911 on May 9, 2022 10:07:30 GMT
Thankyou for your tutorials, they are so needed, an excellent , EXCELLENT help guide. Hi, i had an issue with that too, and that above code fixed it for me so thankyou so much. One question.
i also noticed, i want able to just from one moving platform to another, only from the wallblock, CAN THIS BE ADJUSTED? for example, if i fall from a great height, i go right through the platform.
|
|