Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: instruction CLIP  (Read 5932 times)

0 Members and 2 Guests are viewing this topic.

Sergiusz L.

  • Guest
instruction CLIP
« on: October 24, 2006, 08:59:46 PM »

Hi..

I got a double buffered screen 224x144 pixels (32 colors)
I want to leave both margins (16 pixels width each one)
How to use 'CLIP' ?
Will it speed up graphics or speed down ?

For example:

Screen open ..
Double buffer
clip  16,0 to 208,144
..
(will it be limited on logic and physic ?)

or should write:

screen open
double buffer
autoback 0
clip  16,0 to 208,144
autoback 2
clip  16,0 to 208,144
..

If I will display bob in Autoback 2 mode on margin will the part of bob disappear ?
Logged

Sidewinder

  • Forum Mod
  • A600
  • *****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • http://www.liquido2.com/
Re: instruction CLIP
« Reply #1 on: October 24, 2006, 10:00:21 PM »

Actually, in my tests I've found that graphics operations (like line, plot, circle, etc.) actually speed up when a clip area is defined.  I don't know if Bobs are also clipped, but I don't think they would be.  I'll have to run a test.  You may also want to check out the Limit Bob command.
Logged
- Sidewinder

Sergiusz L.

  • Guest
Re: instruction CLIP
« Reply #2 on: October 25, 2006, 01:01:19 AM »

Well I've done a few tests...

In Autoback 0 mode the CLIP increases a little speed of drawing bob's (by PASTE BOB) when the part of bobs are drawing on restricted area out of CLIP zone(this part of bob is cutting or something like that).
So when the bigger part of bobs is drawing on restricted area I can draw more bobs in the same time.
Speed is not changing when I'm putting whole bob into marked area by CLIP.

I've noticed that in Autoback 2 nothing changed (with or without CLIP).
But I still don't know how it will behave when I will use
Autoback 0 and 2 and bobs and sprites... ect..

Maybe someone will be know.. :-x
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: instruction CLIP
« Reply #3 on: October 27, 2006, 01:50:50 AM »

If you want to make serious use of BOBs, use Autoback 0.  You can usually get better speed than if Amos does the updating for you.

If you use sprites heavily they will be fast no matter how you do them since they are updated in the Amiga chipset itself.  Just remember not to stack more than 4 16-color sprites horizontally from each other and not to use sprites numbered 0 through 7 (since that disables the sprite multiplexing in the copper thus reducing you to 4 16-color sprites for the whole screen).

As for the clipping region, it is usually better to clip to the visible area of the screen.  If you want a scrollable screen you should make the screen bigger than the visible area since the chipset can scroll background data a lot faster than the blitter can plot it.  Just don't make it so big you run out of Chip RAM.  Usually in an RPG you use a tile-mapped display and use Paste Icon for your tiles instead of Paste Bob since opaque blits are faster than transparent blits.  (I think the source code to Dithell's Wonderland that came with AmosPro shows how to make a tile-mapped display that only requires 2 display widths+1 tile width and 2 display heigts + 1 tile height to make a display that will scroll indefinitely in any direction.)

Another trick for speeding up Bobs is to set the planes-pick register using the planes field of the Set Bob command so that it only plots bitplanes that are actually used.  (Useful for plotting graphics without much color depth such as a pointer with only 4 colors.)

I wouldn't recommend messing with the bitplane masks in the mask parameter of the Set Bob command unless you want to do some fancy shadow/shading effects with a spread palette.

This should be enough to get you started on your project, I hope.  Just post back here if you need more information.
Logged

Sergiusz L.

  • Guest
Re: instruction CLIP
« Reply #4 on: October 28, 2006, 01:48:25 AM »

Thanks for suggestion Samurai !
I didn't know that Icons may be mirrored by Hrev() function.
I've done some tests and realized thet icons are much better for tilsets then bobs and they can be mirrored
(It's very important to me because I want to run this game on 0.5Mb Chip ram and 0,5Mb slow, so I have only about 450Kb chip ram to use right ?)
I will not use any scrolls and planes field.
I want to draw graphics of objects something like in "Knightmare"
http://eab.abime.net/showthread.php?t=21923
(walls, floor, buttons ect..)

Well about a sprites...I don't know much about sprites so I will do some test first. But earlier I must write a "display movement" procedures.


---
so see you soon  :-)
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: instruction CLIP
« Reply #5 on: October 29, 2006, 10:34:27 PM »

Oh, a field of depth plotting engine.  I used to work with them on the C64.  And yeah, Paste Icon is lots faster than Paste Bob.

Be sure to post back here to let us know how you are doing.
Logged

James

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 14
    • http://www.nextdoornetworking.com
Re: instruction CLIP
« Reply #6 on: January 31, 2007, 04:41:50 PM »

Hello SamuraiCrow,

Have you made any RPGs in AMOS? Is there one that is a good reference/example for others to expand upon?

I have not seen many AMOS programs save the ones on the Professional Disks.

After my wargame is finished, I'm gunna start on. Do you recommend one that I can play and see how it progresses?

Thanks,

Sandlizard
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: instruction CLIP
« Reply #7 on: February 01, 2007, 10:20:37 PM »

I've never made a role-playing game in Amos.  My current gaming goal is to port an artillery war game written in AmosPro to the next-generation Amiga platforms using Mattathias.  It's slow-going on the Mattathias front but here's a link to the game I want to port:

Frontal Assault
Logged
Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022