|
Post by AndyJF on Sept 6, 2019 19:18:51 GMT
I'm very impressed with AGD. This is how far I've come in one week of playing around with it, it's a bit basic but I'm quite pleased with it. imgur.com/a/KO6Lz7fI quite like the way the sprite moves while jumping, I'd like to create a Manic Miner style game to begin with. One question - How do I set/change the colours of the sprites?
|
|
|
Post by alessandro on Sept 8, 2019 10:35:10 GMT
The "classical" way to change the sprite colour is to add two SPRITEINK commands at the start and at the end of the sprite code. Read more about that here. Another way, which I implemented too in the last few years, is to link the AGD code to an external routine which is placed in memory after the game code and called through an ASM 205 (i.e. CALL in Z80 Assembly) instruction. This has the advantage of avoiding the (albeit very brief) changes in sprite colour edges which can occur with the classical method and allows the sprite to pass through platform blocks without them having all the same INK colour as the value of the first SPRITEINK. Allan Turvey (Mr highrise) demonstrated it in this video; the description also contains the link to download the source code of the routine. About colours: remember that an inner bug in AGD will cause your game to display false colours under certain configurations, e.g. the ZX Vega. Luckily it can be fixed with a simple POKE instruction. More about that here.
|
|
|
Post by AndyJF on Sept 8, 2019 10:37:08 GMT
Thanks!
|
|
|
Post by AndyJF on Sept 16, 2019 17:39:34 GMT
Are there any tutorials on implementing the colour fix in 4.8?
|
|
|
Post by alessandro on Sept 16, 2019 20:32:56 GMT
In AGD 4.8, the ULA Plus is still enabled at address 32698, therefore changing the value stored at that address with a 201 (RET in Z80 Assembly) should work as well.
|
|
|
Post by AndyJF on Sept 18, 2019 17:16:08 GMT
Sorry, I'm new to all this, how would I go about doing that? I've been researching poke files but don't fully understand how they work. Thanks.
EDIT - Apparently my emulator (Speculator) doesn't have ULAplus enabled so I'm unsure how to fix the colour issue
EDIT - In my original post I meant how do I implement Allan's sprite colour fix in 4.8?
|
|
|
Post by alessandro on Sept 19, 2019 19:06:42 GMT
Spectaculator does not emulate the ULA Plus. For that, you must use SpecEmu (latest version is the so-called "Christmas Edition" released in December 2018).
To remove the call to the ULA Plus code, assuming you wish to create a single-level, standalone game, you could try the tool made by xorrox, which can be downloaded from the thread I mentioned above. I haven't used it because it is of no help to me for the reasons I indicated in my reply, but you could find it useful.
|
|
|
Post by AndyJF on Sept 19, 2019 19:37:02 GMT
Thanks. I'm not bothered about using ULAplus features. What I'm looking for is a way to fix the sprite flicker when you assign it a colour using SPRITEINK. In Mr Highrise's video he shows how to do this but he appears to be using AGD4.7. Is there a way to do this in 4.8?
|
|
|
Post by alessandro on Sept 19, 2019 20:17:43 GMT
Thanks. I'm not bothered about using ULAplus features. Neither am I, but knowing that my game shows the wrong colours under certain configurations due to a hidden, unwanted feature of AGD is of concern to me. Anyway: the colour sprite routine in AGD 4.8 is still located at address 32831, therefore it should work the same as with 4.7.
|
|
|
Post by AndyJF on Sept 20, 2019 14:37:23 GMT
Thanks, I'm new to developing on the Spectrum so it's just taking a bit of getting used to. I spent today looking at the ULAplus issues on the forum and I think I finally understand the problem and how to fix it.
|
|
|
Post by AndyJF on Sept 24, 2019 10:19:38 GMT
Sorry if I'm being dumb but could you elaborate on how to fix sprite flicker in 4.8? I've got quite a decent little game running but it would be nice to fix the sprite flickering.
|
|
|
Post by alessandro on Sept 24, 2019 14:09:50 GMT
Is this flicker of yours so severe? To be honest, it's difficult to notice, at least in my experience: see the Seto Taisho games and Doom Pit for instance, you can only see a hint of flicker, and rarely to boot. Yes the new colour routine by Allan makes sprites look even better but the old SPRITEINK technique works anyway.
Are you sure you are doing everything correctly? Could you post a sample file to run so that others could see what is going wrong?
|
|
|
Post by AndyJF on Sept 24, 2019 19:39:46 GMT
It's not that noticeable tbh, I think after your other advice I'm going to ditch 4.8 and go with AGDx
|
|