English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. AMOS

 
 
Thread Tools
Old 25 September 2017, 15:00   #1
Brick Nash
Registered User

Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 192
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!
Brick Nash is offline  
AdSense AdSense  
Old 25 September 2017, 22:11   #2
volvo_0ne
Registered User

 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 248
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
volvo_0ne is offline  
Old 26 September 2017, 15:21   #3
Brick Nash
Registered User

Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 192
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!
Brick Nash is offline  
Old 08 October 2017, 18:21   #4
Brick Nash
Registered User

Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 192
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?
Brick Nash is offline  
Old 09 October 2017, 03:53   #5
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,070
It makes perfect sense since that's the way the screen is drawn. From left to right, downwards.
idrougge is offline  
Old 09 October 2017, 17:55   #6
Brick Nash
Registered User

Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 192
Quote:
Originally Posted by idrougge View Post
It makes perfect sense since that's the way the screen is drawn. From left to right, downwards.
Ok fair enough, but it doesn't mention that anywhere in the manual and it does affect to a small extent what's happening on screen.
Brick Nash is offline  
Old 10 October 2017, 02:59   #7
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,070
Just be glad that it's not the Blitz Basic "manual".
idrougge is offline  
AdSense AdSense  
 


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 22:26
Setting RAM priority ancalimon support.Apps 4 12 September 2014 02:56
Manual CPU Frequency setting not working Scyphe support.WinUAE 11 19 July 2013 13:00
More settings in priority panel Thom87 request.UAE Wishlist 2 24 January 2008 16:23

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:06.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.14070 seconds with 12 queries