|
Post by Packobilly on Jul 29, 2020 18:39:24 GMT
Hi all of you!
The following question arises...
Is it possible to place the same object on different screens, instead of having to duplicate it? I suppose it would be interesting in terms of memory consumption, right?
Thanks, and cheers!!
|
|
|
Post by Minilop on Jul 29, 2020 19:16:18 GMT
That really depends on what you want to do with it. Technically, yes, you could use
IF SCREEN = 1 PUT X Y O ; X & Y FOR THE COORDS AND O BEING THE OBJECT NUMBER ENDIF
and so on for other screens where you want the object to be available.
Of course, it will depend on what you want the object to 'do' when the player collects it. If it's just adding a bonus, or a power-up then this should be fine. But if you want it to be an item that they can use i.e. by using IF GOT {object number} then every time you PUT it the player will no longer have it.
From a memory point of view I'm not sure there would be much benefit to just duplicating the object, since you're going to need to write some lines of code for all that putting versus the 40 or so bytes for a new Object. Your mileage may vary!
|
|
|
Post by Packobilly on Jul 29, 2020 19:51:33 GMT
That is it! The PUT command; I don't know how I could forget it. (I need to go through the manual again...) Anyway, I will have to evaluate both options. Thank you for your answer, Minilop, It has been a great help!
|
|