25 September 2017, 14:00 | #1 |
Prototron
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
|
Manual priority setting
I've been reading through the manual and there only seems to be two ways to set a bob's priority on the screen, both of which are done somewhat automatically.
The "bob order" way, where higher number bobs get priority by default is tidy but somewhat useless for what I'm trying to do. Priority On is great for general use depth perception, but even with it on, if two bobs have an equal Y coordinate on screen it goes back to the old "which bob has the higher number" method. Since I generally store my player images first in the bank so I can add around it, the enemy bobs always seem to overlap the player when on equal Y footing, but I'd like it the other way around. I've tried "Priority Reverse On" and it seemed to be what I was after as it makes the first set of images in the bank take priority, but unfortunately it also automatically reverses and affects how the depth is calculated by the Y coordinate and so now bobs more in the background appear in front of those more in the foreground Is there a way to manually set a bob's priority by some custom code? Two rather limited methods doesn't seem that flexible. As always many thanks! |
25 September 2017, 21:11 | #2 |
Registered User
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
|
Pick your BOB numbers carefully, the IMAGE numbers are largely irrelevant...
From the manual..... " Bob Priority It is important to understand that every Bob automatically possesses a priority of importance, and that this priority is based on the Bob's number. So a Bob carries a priority value from 0 to 63, and AMOS Professional uses this value to decide in which order Bobs are displayed and which Bobs barge their way in front of others when moving around the screen. The general rule is that a Bob with a higher priority number is displayed in front of one with a lower priority number. For example, Bob 5 would cut in front of Bob 4, but be obscured if Bob 6 crossed its path. So it is clear that this priority system should always be remembered when you number your Bobs. AMOS Professional allows changes in the priority system to suit your needs, this first system offers an alternative based not on Bob numbers, but on the position of Bobs on the screen. " Your answer is in there, but it means you may have to re-think some concepts. V1 |
26 September 2017, 14:21 | #3 |
Prototron
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
|
Ahh ok, I've been assuming it's the image number which controls priority.
In saying that, I tried re-organising priority with the bob numbers and it doesn't make any difference with the "Priority On" instruction. Still, that's good to know about the numbers. I have some custom variables linked to bob numbers using player and enemy names so I only had to change two things for it to affect the whole code, so not much of a headache there. Thanks for that! |
08 October 2017, 17:21 | #4 |
Prototron
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
|
Hey, I figured I'd post a new topic in this old thread since it's somewhat about the same thing.
In the manual it says that "Priority On" is governed by the Y coordinate, but in my game it seems to be activated somewhat by the X coordinate too. Generally it works fine, but if my player and the enemy are on an equal Y coordinate plain and if my player's X is less then the enemy's X (if the player is to the left of the enemy) then the enemy will have priority, and vice verse. This happens even if its one pixel either way. I turned Priority off to see what would happen and as expected my player took priority permanently. It's a little annoying as I have some moves set up so that it's best if the player is in front of the enemy, but I don't know why the X coordinate is getting involved at all? |
09 October 2017, 02:53 | #5 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
It makes perfect sense since that's the way the screen is drawn. From left to right, downwards.
|
09 October 2017, 16:55 | #6 |
Prototron
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
|
|
10 October 2017, 01:59 | #7 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
Just be glad that it's not the Blitz Basic "manual".
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blitter Priority - Blthog | Asman | Coders. Asm / Hardware | 3 | 12 December 2016 21:26 |
Setting RAM priority | ancalimon | support.Apps | 4 | 12 September 2014 01:56 |
Manual CPU Frequency setting not working | Scyphe | support.WinUAE | 11 | 19 July 2013 12:00 |
More settings in priority panel | Thom87 | request.UAE Wishlist | 2 | 24 January 2008 15:23 |
|
|