|
Post by AndyJF on Sept 19, 2019 16:42:42 GMT
Is there a way to change the colours of objects? I want to use a system of coloured keys in my game but I'm not sure how to do this. Thanks.
|
|
|
Post by alessandro on Sept 19, 2019 18:38:16 GMT
Objects take the attributes of the block they are placed upon. There is a way to let objects glow, i.e. cycle between colours; A. Turvey wrote a small routine for it, which I employed in Sophia and Sophia II. With some tweaking it could be modified to let every object be displayed in the same colour. What you cannot do, to my knowledge, is what you ask: assigning a different colour to each object. That is, unless you put them on a specifically coloured block at game start. But this also means that should the player character drop the object, it will take the attribute of the block where he/she/it will put it.
You could however design keys of different shapes. E.g. in Sophia and Sophia II (level 1 and 2 only) doors disappear when the eponymous character is carrying an amulet of the same shape displayed on each door - a square, a triangle and a circle.
|
|
|
Post by AndyJF on Sept 19, 2019 19:20:02 GMT
Thanks, the shape idea might be the way to go.
|
|
|
Post by Jonathan Cauldwell on Sept 20, 2019 17:45:01 GMT
As Alessandro says, AGD doesn't allow you to assign individual colours to objects. That is only possible in MPAGD.
|
|
|
Post by AndyJF on Sept 20, 2019 18:41:09 GMT
I found a workaround -
I used the ink trick described above and since each colour key will always be in the same place on the map (and can't be dropped by the player), I can hardcode replacing the coloured blank squares with white ink blank squares when the key is picked up. This only works with the adventure speciality but I can live with that.
EDIT - I'm still fairly new to all this, should I really be using MPAGD in place of 4.8? I only plan on making Spectrum games.
|
|
|
Post by highrise on Sept 21, 2019 11:53:30 GMT
There is a new patch coming shortly for AGDx which supports object colouring.
|
|
|
Post by highrise on Sept 21, 2019 15:59:39 GMT
Here is a beta of the patch. It requires AGDx as you need to shift the memory up (easy to do). This patch only needs about 50 bytes so is quite economical. www.dropbox.com/s/y5iiumkch2dzogx/ColouredObjects.zipIt's not fuily tested so let me know how you get on. Instructions are included.
|
|
|
Post by AndyJF on Nov 11, 2019 17:53:51 GMT
I followed the instructions in version Ja on an existing project but I couldn't get it to work.
|
|
|
Post by Packobilly on Mar 23, 2020 8:53:54 GMT
Here is a beta of the patch. It requires AGDx as you need to shift the memory up (easy to do). This patch only needs about 50 bytes so is quite economical. www.dropbox.com/s/y5iiumkch2dzogx/ColouredObjects.zipIt's not fuily tested so let me know how you get on. Instructions are included. Hi! I have doubts about how to run this patch. Once sprite memory is adjusted and pointers disabled, how do I open and select the poke file? Loading binary data? (I guess not, well it's not .bin) Or through the debugger? Fuse for iMac only has these options to handle pokes: - Pokes Finder. - Pokes/Cheats. None of them allow me to load the .pok Thanks!
|
|
|
Post by alessandro on Mar 23, 2020 14:34:24 GMT
Hola Packobilly,
if Fuse on the iMac works as the Windows port (not sure of it to be honest), it can open and employ .POK files very simply.
When you have your code in memory, just open the .POK file with File > Open... A window will appear. Select the POKEs you wish to apply by clicking on their relative boxes, then press OK.
|
|
|
Post by Packobilly on Mar 24, 2020 15:08:30 GMT
Oh, my head! So, thats the way!! Now it works fine. Thank you once again, Alessandro.
Thank goodness you have patience...
|
|