English Amiga Board


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

 
 
Thread Tools
Old 22 December 2015, 22:23   #1
volvo_0ne
Registered User

 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 315
Painting/Filling....

I'm playing with a level designer for a project I set myself (in AmosPro), but I was wondering if there is any way to speed up the Paint command, as it is incredibly slooooow.

I'd rather not go down the road of "bolt ons" tho, I want to try keep it pure.

Does anyone have any ideas on how to pep the PAINT up a little please?

TIA
V1
volvo_0ne is offline  
Old 23 December 2015, 12:58   #2
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,638
Just a wild thought: Do it on a two-colour screen.
idrougge is offline  
Old 23 December 2015, 13:34   #3
Michael
A1260T/PPC/BV/SCSI/NET

Michael's Avatar
 
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 643
Why are you using paint command in level design ?!
Michael is offline  
Old 23 December 2015, 14:12   #4
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,638
I use it in my level editor to fill a portion of the screen with blocks so that you don't have to place 200 identical blocks manually. It goes something like this:
Code:
Procedure FYLL[X,Y,NEWTILE]
   ' Get tile to replace
   Gr Writing 1
   Bob Off : Wait Vbl 
   TILE=MAP(X,Y)
   
   ' Clear screen and draw all blocks except the chosen one as colour 0
   Cls 1 : Ink 0
   For Y=0 To 31
      For X=0 To 39
         If MAP(X,Y)<>TILE Then Bar(X*8)-1,(Y*8)-1 To(X*8)+9,(Y*8)+9
      Next X
   Next Y
   
   ' Flood fill with colour 4 at mouse coordinates
   Ink 4 : Wait Vbl 
   X1=X Screen(X Mouse) : Y1=Y Screen(Y Mouse)
   Paint X1/8*8+3,Y1/8*8+3
   
   ' Check for colour 4, translate to map coordinates and put in selected tile in map array
   For Y=0 To 31
      For X=0 To 39
         If Point(X*8+3,Y*8+3)=4 Then MAP(X,Y)=NEWTILE
      Next X
   Next Y
End Proc

Last edited by idrougge; 23 December 2015 at 14:22.
idrougge is offline  
Old 23 December 2015, 14:17   #5
ReadOnlyCat
Code Kitten

 
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 47
Posts: 1,088
I guess this means that your editor creates bitmaps rather than tilemaps?
ReadOnlyCat is offline  
Old 23 December 2015, 14:20   #6
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,638
Mine creates tilemaps. I just thought it was easier to borrow AMOS's flood fill function than writing a slower, more primitive one myself.
idrougge is offline  
Old 23 December 2015, 14:33   #7
Retro1234
Bo Bo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 3,988
I have a map of A217
Retro1234 is offline  
Old 23 December 2015, 22:05   #8
volvo_0ne
Registered User

 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 315
Quote:
Originally Posted by idrougge View Post
I use it in my level editor to fill a portion of the screen with blocks so that you don't have to place 200 identical blocks manually. It goes something like this:
Ah!

That gave me a great idea.....

I'll simply use Bar to fill most of large areas as it is much faster, then use paint to fill the remaining bits (if the shape isn't too complex)

Thanks for that
volvo_0ne is offline  
Old 23 December 2015, 22:11   #9
volvo_0ne
Registered User

 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 315
Quote:
Originally Posted by Michael View Post
Why are you using paint command in level design ?!
See my posts on this page.....

http://eab.abime.net/showthread.php?t=80534

esp post #20

which will hopefully explain.
volvo_0ne is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU Filling vs. Blitter Filling Routine victim Coders. General 18 26 January 2014 02:15
Painting keys (liquid plastic) nixxjsteve Hardware mods 4 18 January 2011 22:10
a painting program that let you change the palette per scanline Michael Parent request.Apps 1 26 October 2009 22:09
Case painting tips JonSick support.Hardware 7 31 May 2009 00:34
Painting your Amiga in 10 easy steps. Mick_AKA Hardware mods 37 01 February 2008 14:31

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 00:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.06937 seconds with 15 queries