English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 01 July 2011, 21:32   #41
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Yeah, I realise - like I said, I already have an assembler implementation working.
pmc is offline  
Old 02 July 2011, 00:41   #42
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
Cheers guys. Been really helpful seeing the asm implementation in action and understanding how it works. Will start to write my own shortly, have some interesting ideas on how to twist stuff up. But well see.
h0ffman is online now  
Old 02 July 2011, 05:41   #43
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
Here's a challenge, perhaps impossible! Who knows...

Can anyone create a version with greater than 4 faces that runs in a frame on a 68000? This javascript version has 15 sides and imho looks very slick!
Codetapper is offline  
Old 02 July 2011, 08:07   #44
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
Saying things like that round here can seriously eat up peoples free time
h0ffman is online now  
Old 02 July 2011, 12:43   #45
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by Codetapper View Post
Here's a challenge, perhaps impossible! Who knows...

Can anyone create a version with greater than 4 faces that runs in a frame on a 68000? This javascript version has 15 sides and imho looks very slick!

Definitely possible and not that much of a challenge. Check the attachment, I made a twister with 8 segments, red part of the screen: raster time still left (on 68000 of course)!

The trick is, of course, to draw the twister as quickly as possible. Hint: The copper is your friend, you'll need a big copperlist.
Attached Thumbnails
Click image for larger version

Name:	twist8.png
Views:	575
Size:	3.8 KB
ID:	28985  
StingRay is offline  
Old 02 July 2011, 17:38   #46
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
My guess is you pre draw then set the bitplane pointers every line?

Hmmm. I'm not so sure now?
h0ffman is online now  
Old 03 July 2011, 22:18   #47
korruptor
TDI
 
korruptor's Avatar
 
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
That's how I did it. I actually assumed all the textured ones I'd seen had been done that way.
korruptor is offline  
Old 05 July 2011, 13:06   #48
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
I've been doing some maths on this, if you wanted to do a full logo in 5 bitplanes, you would need to multiple the number of lines by the number of lines in your logo too.... Would take a LOT of memory!
h0ffman is online now  
Old 05 July 2011, 13:55   #49
korruptor
TDI
 
korruptor's Avatar
 
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
Probably want to do Sting's texture map suggestion if you're doing a logo.

I've only done the noddy tube stuff.
korruptor is offline  
Old 05 July 2011, 14:10   #50
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
Still thinking that on a 68000, that would be touch...... pre-calc different width sizes of the logo, then blit those onto the screen.... hmmmmm....
h0ffman is online now  
Old 05 July 2011, 17:46   #51
korruptor
TDI
 
korruptor's Avatar
 
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
Yeah, that's interesting, you could pre-calc the texture offsets for each line width. No idea how expensive the blit /copy from there would be.

Can you do anything with the copper / scroll registers per line, to get something similar? Not played with that much.
korruptor is offline  
Old 05 July 2011, 17:54   #52
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Quote:
Originally Posted by korruptor View Post
Can you do anything with the copper / scroll registers per line, to get something similar? Not played with that much.
Something along those lines may be possible, if some (or all) of the graphics had been predrawn.
I have never attempted a twisting effect yet... next on my list is to try some 3D objects. I already have some code to use for inspiraton

I used the copper to re-set the hardware scroll register (BPLCON1) for each scanline in the credits section of my demo. I was using it to do a sinewave effect on the background image (a dalmatian, of course!).
It turned out pretty cool, but I had to slow it down to update every 3 VBL's, as it ran too fast when updating every VBL.


Regards,
Lonewolf10
Lonewolf10 is offline  
Old 05 July 2011, 21:18   #53
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,515
Use very tall pre-drawn sprites that scrolls up or down and only change sprites' X-position using copper? Very cheap (of course means width restrictions)
Toni Wilen is online now  
Old 06 July 2011, 15:25   #54
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
Hey Toni, thats a pretty good idea. Maybe you could pre-calc the twister but set sprites for the textured points!. Not played with sprites yet.

However I did try my first twiseter yesterday, failed just on the pre-draw
h0ffman is online now  
Old 11 July 2011, 14:50   #55
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
Well, I finally worked out what I was doing wrong and got my twister up and running. Borrowed line draw from Sting's example and bumped it up to 5 bitplanes.

It seems the more splits you add, the more like plasma it becomes...

Should run on a 68000, however the copper pointer generation is as yet to be optimised!

EXE attached (not packed this time!)
Attached Files
File Type: zip Twister-hoff05.zip (4.1 KB, 254 views)
h0ffman is online now  
Old 11 July 2011, 15:08   #56
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by h0ffman View Post
My guess is you pre draw then set the bitplane pointers every line?

Hmmm. I'm not so sure now?
Yep, that's exactly what I'm doing. You first draw the twister to a static bitmap (precalc) and in your main routine you decide which line to copy from that very picture. You have to do that for every line of course. Drawing a textured twister works exactly the same way, i.e. no sprites needed.
StingRay is offline  
Old 11 July 2011, 15:18   #57
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
My big aim is to have a full length logo twisting on one of the faces, which would mean

pre-calc twister * number of lines of the logo = massive!

So I was thinking of pre-calcing the logo widths as sprites then plotting them in position on each line with a sprite....

But... I never dun nuffink wiv spritez
h0ffman is online now  
Old 11 July 2011, 15:29   #58
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by h0ffman View Post
My big aim is to have a full length logo twisting on one of the faces, which would mean

pre-calc twister * number of lines of the logo = massive!
You need: static twister pic (e.g. 320*256*5 in your case = 51200 bytes) plus the waits+bpl pointers in the copperlist: 256*(8*5+4) (8*5 = bitplane pointers for 5 bitplanes, +4 = copper wait). Not that massive.
StingRay is offline  
Old 11 July 2011, 22:14   #59
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 744
Ez Stinger

But, the logo would be different on each line, thus multiplying the twister by the number of lines of the logo surely??
h0ffman is online now  
Old 12 July 2011, 00:30   #60
Coagulus
Gets there in the end...
 
Coagulus's Avatar
 
Join Date: Sep 2005
Location: Wales
Posts: 863
Quote:
Originally Posted by StingRay View Post
Yep, that's exactly what I'm doing. You first draw the twister to a static bitmap (precalc) and in your main routine you decide which line to copy from that very picture. You have to do that for every line of course. Drawing a textured twister works exactly the same way, i.e. no sprites needed.
haha, that's how my rubbish initial attempt at a twister started, with a precalc-ed bitmap and lines copied from it. But I'd got everything else wrong! Thanks again for your help.

loving this thread. It's probably one of the best resources on the net about it now. Now how about all the other effects....
Coagulus 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
Help with a sine effect bobster Coders. Tutorials 16 17 October 2012 12:11
2x Filter effect: How to? Cherno request.UAE Wishlist 3 13 February 2012 06:26
Global Effect mai support.Games 3 04 February 2010 12:58
Cracktro effect absence Coders. General 13 02 April 2009 16:41
Chessboard effect Six Coders. General 11 09 January 2007 15:45

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:29.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.15116 seconds with 14 queries