English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Tutorials

 
 
Thread Tools
Old 09 February 2010, 12:21   #1
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Another old skool intro for you

Hello boys and girls.

Check out the attached .zip file for source code and an executable version of another new old skool intro I coded.

I won't say what it contains - check it out for yourselves.

I hope you like it - the scrolltext contains all the information I won't write here.

Last edited by pmc; 26 February 2010 at 12:23.
pmc is offline  
Old 09 February 2010, 12:40   #2
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
That's one cute little intro! Nice one, I like!
StingRay is offline  
Old 09 February 2010, 12:54   #3
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Cheers Stinger!

I said in the scrolltext it was originally going to be used for something else, well, I was going to put it into the megademo as another part of mine but I dunno - somehow at the time I stopped liking it. It was more intro / cracktro than megademo part if you see what I mean...?

I'd finished it all except for the scroller and then just stopped working on it.

Anyway, out of boredom this morning I had another look and decided it wasn't *that* bad and thought it deserved at least being finished so I just tacked on a scroller as I'd already converted the font graphics (always for me the worst part of doing a scrolltext! ) for something else I coded that didn't see the light of day either.
pmc is offline  
Old 09 February 2010, 14:16   #4
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by pmc View Post
It was more intro / cracktro than megademo part if you see what I mean...?
I do! Typical crack intro like screen. Then again, many (mega)demo screens looked liked that back in the day. =)

Quote:
Originally Posted by pmc View Post
as I'd already converted the font graphics (always for me the worst part of doing a scrolltext! )
That's what I call "slave work". Too bad most of the time I am the slave. Reminds me of something that happened at Evoke 2006 (I think), friend of mine (won't mention any names ;D) was coding some Java intro, graphics artist (another friend of mine) drew the font, however, the chars weren't in ascii order. Have gave the font to the coder and coder's reply was: "Draw a new font, this one is unusable since the chars aren't in the correct order!". If I would have been the graphics artist I would have told him to *censored*, however, graphics artist went back to his table and redrew the font. I of course asked the coder what the problem was to type in a small conversion table, reply "that's not my job". Some people apparently have nice slaves.
StingRay is offline  
Old 09 February 2010, 14:26   #5
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Quote:
Originally Posted by StingRay
That's what I call "slave work". Too bad most of the time I am the slave.
LOL. You're not wrong.

I've converted several fonts now taking them through from the original .ttf on PC through to .iff on Amiga, layed out in ASCII order, hand edited to the correct size and spacing and then, due to the way I lay out my fonts for my scroller routine, manually editing the raw data to how I need it.

Needless to say, this is what I would call a ball ache (normally takes a couple of days) and it has to be done *every* time I want a new font.

Yes, as you say - I too, am that slave.

Quote:
Originally Posted by StingRay
Reminds me of something that happened at Evoke 2006 (I think), friend of mine (won't mention any names ;D) was coding some Java intro, graphics artist (another friend of mine) drew the font, however, the chars weren't in ascii order. Have gave the font to the coder and coder's reply was: "Draw a new font, this one is unusable since the chars aren't in the correct order!". If I would have been the graphics artist I would have told him to *censored*, however, graphics artist went back to his table and redrew the font. I of course asked the coder what the problem was to type in a small conversion table, reply "that's not my job". Some people apparently have nice slaves.


That's one understanding graphician!
pmc is offline  
Old 09 February 2010, 14:35   #6
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by pmc View Post
manually editing the raw data to how I need it.
Why do you have to edit the raw data? The way I usually do it is like this:
1. use the font and draw the characters you need (e.g. ABCDEFGHIJK...Z) using the text tool in PPaint (f.e.)
2. save the text lines as brush, convert to raw bitmap/chunky data as needed
3. hack a small routine which calculates the character offsets in the font
4. ???
5. profit!



Quote:
Originally Posted by pmc View Post
That's one understanding graphician!
Indeed! He's one of a very rare breed. =)
StingRay is offline  
Old 09 February 2010, 14:54   #7
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Quote:
Originally Posted by StingRay
Why do you have to edit the raw data?
Well... mainly because of the way I lay out my font data so that character selection is nice and easy. The font bitmap data isn't stored in my code as, for example, a standard 320*256 screen. Instead I store it like this:

ABCDEFG.........XYZ etc.

In one long bitmap that's the character's height high. This is what I have to edit by hand - ie change the 320*256 into the correct ???*??? font bitmap.

Then selecting from the bitmap based on the scrolltext is as easy as:

Code:
               movea.l     scrolltext_ptr(a5),a0
                          movea.l scroll_ptr(a5),a0
                          move.b (a0)+,d0
                          cmp.b #255,d0
                          bne.s .notend_scroll
                          movea.l     scrolltext_ptr(a5),a0
                          move.b     (a0)+,d0
.notend_scroll:      move.l      a0,scroll_ptr(a5)
                          movea.l    font_ptr(a5),a0
                          subi.b      #32,d0
                          lsl.b        #1,d0        ;depending on char size
                          adda.w    d0,a0
Not sure if that's lame or not () but it seems to work OK - provided as I say I lay the font out right in the first place.
pmc is offline  
Old 09 February 2010, 15:14   #8
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by pmc View Post
The font bitmap data isn't stored in my code as, for example, a standard 320*256 screen. Instead I store it like this:

ABCDEFG.........XYZ etc.
I know, that's how I store my fonts too.

Quote:
Originally Posted by pmc View Post
In one long bitmap that's the character's height high. This is what I have to edit by hand - ie change the 320*256 into the correct ???*??? font bitmap.
Hint: you are a coder! You don't edit things by hand if some small piece of code can do that for you. *hint hint*

Quote:
Originally Posted by pmc View Post
Then selecting from the bitmap based on the scrolltext is as easy as:

Code:
               movea.l     scrolltext_ptr(a5),a0
                          movea.l scroll_ptr(a5),a0
                          move.b (a0)+,d0
                          cmp.b #255,d0
                          bne.s .notend_scroll
                          movea.l     scrolltext_ptr(a5),a0
                          move.b     (a0)+,d0
.notend_scroll:      move.l      a0,scroll_ptr(a5)
                          movea.l    font_ptr(a5),a0
                          subi.b      #32,d0
                          lsl.b        #1,d0        ;depending on char size
                          adda.w    d0,a0
Not sure if that's lame or not ()
That's fine and will do the job. =) You can optimize the cmp.b #255,d0 tho (ugly! ) like this: move.b (a0)+,d0 bpl.b .notend_scroll. That will of course only work if you don't use any other special characters to control the scroll (like dc.b -1 ; stop scroll or smth similar).
StingRay is offline  
Old 09 February 2010, 15:20   #9
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Quote:
Originally Posted by StingRay
I know, that's how I store my fonts too.
I've been doing something the way you do it? That makes me feel a whole lot less lame.

Quote:
Originally Posted by StingRay
Hint: you are a coder! You don't edit things by hand if some small piece of code can do that for you. *hint hint*
All right, nice one - I'll have a think. It's something else to relieve the boredom and if it's one less step in that arduous font conversion process then: \o/

Quote:
Originally Posted by StingRay
You can optimize the cmp.b #255,d0 tho (ugly! )
LOL!
pmc is offline  
Old 09 February 2010, 15:35   #10
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by pmc View Post
All right, nice one - I'll have a think.
You know width/height of each char and you know how many chars are in your font. That's all you need.
StingRay is offline  
Old 10 February 2010, 00:20   #11
Kitty
Registered User
 
Kitty's Avatar
 
Join Date: Mar 2005
Location: London UK
Posts: 1,532
Good stuff pmc, looking forward to the megademo
Kitty is offline  
Old 10 February 2010, 04:15   #12
Plagueis/KRX
coder
 
Plagueis/KRX's Avatar
 
Join Date: Jul 2009
Location: a galaxy far far away
Age: 49
Posts: 84
Dude, that intro ruled!!! I'm so happy to see it, and it could not have come at a better time for me...I'm just finishing up a c64 project and I'm ready to resume coding on the Amiga. Also, things in my personal life/schedule are getting cleared up again thankfully, and I'll be able to prioritize my time in such a way that Amiga coding can sneak up there a bit higher on the ol' precedence table.

I loved the music PMC!!! It's the first thing that struck me, probably since I'd watched the piece several times (sans scroller) when you previewed it to me a few weeks ago....so I was accustomed to the cool effects, but the music was so good it made it feel new again.

So Cheers....oh, and Thanks for the greet!!!
Plagueis/KRX is offline  
Old 10 February 2010, 07:56   #13
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Quote:
Originally Posted by Kitty
Good stuff pmc, looking forward to the megademo
Thanks Kitty - by the way, none of that intro would've been done at all if you hadn't drawn me that nice logo so I'd say kudos goes to you.

@ Plagueis - thanks man. Yeah, I prefer the new music too. Nice to know you'd watched it a few times - people (well, at least one, ie. you ) actually watch and enjoy my code!

I'm looking forward to your new Amiga intro - my advice would be to resist the temptation to look at the source codes I've posted too closely before you've had a really good go at doing the intro yourself. You'll learn more that way and it's more fun too.
pmc is offline  
Old 10 February 2010, 09:24   #14
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,986
Quite nice, but the interference part would work better when the two sets of circles don't move so far apart.
Galahad/FLT is offline  
Old 10 February 2010, 09:30   #15
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Yeah, I see what you're saying there actually.

Wouldn't be too hard to acheive - they're both following the same sinus paths, one slightly behind the other.

A quick tweak of the source code to close the gap in the path a little and voila.

A nice little home project for someone with the source code...
pmc is offline  
Old 10 February 2010, 11:32   #16
WayneK
Registered User
 
Join Date: May 2004
Location: Somewhere secret
Age: 50
Posts: 364
There were 2 bugs in the intro I noticed:

[1] The sine of the logo at the top suddenly snaps back to 0, it doesn't look very smooth (ie: it ripples and then suddenly jerks back to original position).
[2] There was no greet to me.

Obviously 2 is pretty serious, so I thought I should inform you!

And just FYI, I store my fonts the exact opposite way, one tall bitmap <charwidth> wide + <numofchars> tall
WayneK is offline  
Old 10 February 2010, 11:47   #17
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
WayneK - you PM's and posts always make me roll up. Superb.

Regarding bug 1 - that's intentional.

That black and white Retro logo reminded me of old TV's or old movies and that gave me the idea of putting an effect on it that made it look like it was suffering static interference until someone banged the top of the TV to make it right again...

Thinking about making the logo suffer interference was what then made me add an interference effect to the intro.

See - what I said to Kitty was the truth - I wouldn't have made it at all without her logo.

Regarding bug 2 - that's unforgivable.

Sorry man - that will be rectified in all future productions.
pmc is offline  
Old 12 February 2010, 02:17   #18
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Great intro! I like the detail where the white bar blends into the grey frame.
Leffmann is offline  
Old 12 February 2010, 08:16   #19
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Quote:
Originally Posted by Leffman
Great intro!
Thanks man - appreciated.

Quote:
Originally Posted by Leffman
I like the detail where the white bar blends into the grey frame.
You noticed! Yeah, not in any way difficult to do of course but I liked the way it looked.
pmc is offline  
Old 15 February 2010, 15:20   #20
korruptor
TDI
 
korruptor's Avatar
 
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
Man, that's ace
korruptor 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
Made an old-skool demo! pmc Coders. Tutorials 187 30 November 2009 15:11
Amiga RGB Monitor cable & FREE Old skool PC Games Paul_s MarketPlace 0 31 October 2009 16:21
OLD Skool Sceners Interested in Uk "Gathering" NITRO Amiga scene 13 02 September 2005 23:17
Can you name this intro?! Quickbeam Retrogaming General Discussion 3 17 May 2003 10:54
Best Old-Skool RTS? Cam Nostalgia & memories 39 08 November 2002 22: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 10:25.

Top

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