English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 15 March 2014, 08:15   #1
JPQ
Registered User

 
Join Date: Mar 2014
Location: Akaa
Posts: 38
How i can limit which bitplanes used for functions like Circle,Boxf etc ? (all graphic functions expect sprites)
and which is fastest way (i think if i use pure blitz basic maybe shapes = bobs) are faster than Boxf when i need clipping ? if i dont need such thing which is fastest way ? i dont yet even know sure but very likely Boxf even its fast is maybe too slow.
and i cannot wrote itself function with assembler which draws things what i want.

Bitplanesbitmap sounds complicated becouse i must put stuff back to display which consumes time etc.

Last edited by TCD; 15 March 2014 at 09:39. Reason: Back-to-back posts merged
JPQ is offline  
AdSense AdSense  
Old 15 March 2014, 10:03   #2
JPQ
Registered User

 
Join Date: Mar 2014
Location: Akaa
Posts: 38
Blitz basic graphical source with problem

I try made simple thing what i wrote program to test basic stuff where i add new realstuff when i get this working basic thing. i try combine 2 single bitmaps to 4 colour mode. and even maybe if Amiga power allow even 3 bitmaps to make 8 color mode.top it that i try use doublebuffering and i try draw own unique stuff all single bitmaps. its years ago when i coded and i never tired this thing before.
ps. btw i found do this anotherway if two 2 coloured bitmaps mixed to single 4 colour. easier but i want try with 3 bitmaps to 8colour... i going text this next.

NoCli
WBStartup
BLITZ

BitMap 0,320,256,2
BitMap 1,320,256,2
BitMap 2,320,256,1
BitMap 3,256,256,1
Slice 0,42,2
RGB 0,0,0,0
RGB 1,7,0,0
RGB 2,0,7,0
RGB 3,7,7,0
Repeat
Show BMAP
BMAP=1-BMAP
Use BitMap BMAP
;BitPlanesBitMap BMAP,2,1
Use BitMap 2
lasku=lasku+1
If lasku>3599 Then lasku=0
Cls 0
Circlef 160+Sin(lasku/180*Pi+Sin(lasku/90*Pi)*1)*128,128+Sin(lasku/360*Pi)*128,36,1
;Use BitMap 3
Cls 0
Circlef 160+Sin(lasku/90*Pi+Sin(lasku/180*Pi)*1)*128,128+Sin(lasku/360*Pi)*128,36,1
BitPlanesBitMap 2,BMAP,1
BitPlanesBitMap 3,BMAP,1
VWait
Until Joyb(0)=1
End
JPQ is offline  
Old 15 March 2014, 11:21   #3
JPQ
Registered User

 
Join Date: Mar 2014
Location: Akaa
Posts: 38
Now i tired this: at least fs-uae graphics shows things what i dont want and graphics also flickers very much. still very likely problem is not fs-uae. becouse all other programs what i tested works fine even impossible mission 2025 which uses dualplayfield i bet. and i also bet is more heavy for emulator...

originally i try way wich worked real amiga fine non dual playfield display.(at least when i use older AmiBlitz).
i can position odd and even bitplanes own position using ShowB,and ShowF. to get specialfx.

NoCli
WBStartup
BLITZ

BitMap 0,320,256,1
BitMap 1,320,256,1
BitMap 2,320,256,1
BitMap 3,256,256,1
Slice 0,42,$fff8

For bm=0 To 3
Use BitMap bm
Cls 0
Next
RGB 0,08,05,04
RGB 1,15,05,03
RGB 2,08,12,03
RGB 3,15,12,03
Repeat
las=las+1
If las>3599 Then lask=0
bmap=2-bmap
Use BitMap bmap
;Cls 0
Circlef 160+Sin(las/360*Pi)*127,128+Cos(las/180*Pi)*127,30,1
Use BitMap bmap+1
;Cls 0
Circlef 160+Sin(las/120*Pi)*127,128+Cos(las/360*Pi)*127,30,1
ShowB bmap
ShowF bmap+1
VWait
Until Joyb(0)=1
End
Attached Files
File Type: txt problem.txt (490 Bytes, 90 views)
JPQ is offline  
Old 19 September 2014, 11:07   #4
BippyM
Global Moderator

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 42
Posts: 8,620
Quote:
Originally Posted by JPQ View Post
las=las+1
If las>3599 Then lask=0
There seems to be a typo in the above code!

Also the following code could cause an error!

Code:
bmap=2-bmap
Use BitMap bmap
This isn't defined properly, nor is it actually changed, so in effect this will always be the same result (2)
BippyM is offline  
Old 19 September 2014, 18:56   #5
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 46
Posts: 361
Quote:
Originally Posted by bippym View Post
Also the following code could cause an error!

Code:
bmap=2-bmap
Use BitMap bmap
This isn't defined properly, nor is it actually changed, so in effect this will always be the same result (2)
Ummm, I think it will toggle between 2 and 0.
alkis is offline  
Old 19 September 2014, 23:04   #6
Lonewolf10
AMOS Extensions Developer
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 38
Posts: 1,917
Quote:
Originally Posted by alkis View Post
Ummm, I think it will toggle between 2 and 0.
Some languages do not like using the variable being calculated in the calculation itself. If Blitz doesn't complain about it (or crash!), then it should indeed toggle between 0 and 2 (or 2 and 0, whichever way you like to put it ).

(smallprint: I'm not a Blitz programmer)
Lonewolf10 is offline  
Old 11 January 2015, 22:34   #7
Cylon
Registered User

 
Join Date: Oct 2014
Location: Europe
Posts: 466
Quote:
Originally Posted by JPQ View Post
.
Bitplanesbitmap sounds complicated becouse i must put stuff back to display which consumes time etc.
I'll come back to this later, first i have to understand what you really want to get out.

I can walk you through Bitplanesbitmap (it is very easy), i'm not quite sure yet it is your solution.
Cylon is offline  
Old 11 January 2015, 22:35   #8
Cylon
Registered User

 
Join Date: Oct 2014
Location: Europe
Posts: 466
Quote:
Originally Posted by Lonewolf10 View Post
Some languages do not like using the variable being calculated in the calculation itself. If Blitz doesn't complain about it (or crash!), then it should indeed toggle between 0 and 2 (or 2 and 0, whichever way you like to put it ).

(smallprint: I'm not a Blitz programmer)
Nope. It is fine. Blitz is great, indeed!
Cylon is offline  
Old 31 January 2015, 23:06   #9
Cylon
Registered User

 
Join Date: Oct 2014
Location: Europe
Posts: 466
dunno, transparent spheres...

Do you try to create a display with two transparent spheres?
Then i think i fixed it. a little.

Code:
NoCli
WBStartup
BLITZ

DEFTYPE.w  ;never ignore speed ;-)

BitMap 0,320,256,1
BitMap 1,320,256,1
BitMap 2,320,256,1
BitMap 3,256,256,1
;Slice 0,42,$fff8
Slice0,42,2  ;2planes, no special stuff

For bm.w=0 To 3
Use BitMap bm
Cls 0
Next
RGB 0,08,05,04
RGB 1,15,05,03
RGB 2,08,12,03
RGB 3,15,12,03

;some precalcs
;make a table here for sin() and cos()!!!!

Repeat
 las.w+1
If las>3599 Then las=0

bmap.w=2-bmap

Use BitMap bmap
;cls left commented as found
;Cls 0   ;use planeclear instead!!
;never do Sin() Cos() without tables!! floats beeing cast to quick (then to word) 50 times a second (well, maybe) 
Circlef 160+Sin(las/360 *Pi)*127,128+Cos(las/180 *Pi)*127,30,1

Use BitMap bmap+1

;Cls 0
Circlef 160+Sin(las/120 *Pi)*127,128+Cos(las/360 *Pi)*127,30,1

ShowB 0  ;
ShowF 1  ; 
VWait
Until Joyb(0)=1
End
I'm not sure yet, what you really want to achieve, but this way it works a little....

When you uncomment the CLS's, then flickering appears, because the screen is not redrawn or cleared fast enough. This is happening because the calculation inside the loop takes too long, also the CLS command is too slow. You can improve it by using a bitplane clear cmd using the CPU instead.
Attached Thumbnails
Click image for larger version

Name:	eabbbprobl.png
Views:	172
Size:	13.4 KB
ID:	43085  

Last edited by Cylon; 01 February 2015 at 00:20. Reason: add more text
Cylon is offline  
Old 22 March 2015, 17:40   #10
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,058
There is a CPU bitmap clear routine in Blitz2:Examples/Blitzmode/Darts_poly.bb.
idrougge is online now  
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
Blitz basic 2 Help Havie Coders. Blitz Basic 30 08 September 2013 10:15
blitz basic petza request.Apps 11 08 April 2007 02:49
Blitz Basic 2 anyone? jobro request.Apps 12 28 November 2005 19:15
Blitz Basic StopCD32 Tony Landais Coders. General 2 08 May 2003 23:51
Blitz Basic 2 LaundroMat Retrogaming General Discussion 5 24 July 2001 09:10

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 18:49.


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