Star Wars-style scrolling text

Started by SSH, Thu 27/03/2003 11:38:47

Previous topic - Next topic

SSH

I have made a star wars opening titles-type scroller. You will need:

1. A room with a starfield background and a continuously scaled walkable area (this example was 1 to 100% with the walkable area taking up 3/4 of the screen, vertically)
2. "Characters" for each line of text, with the views/sprites of the text to be scrolled as graphics with the perspective already applied (easy in PSP) (I have 4 lines here, characters 1 to 4)
3. This script:

$$$!$$$ ROOM room1.crm
$$$!$$$ RS
// room script file
int crawl=400;
int recip=84000;

function room_a() {
  // script for room: Repeatedly execute
crawl+=1;
character[1].y=recip/crawl;
if (crawl >= 494) {
  character[2].y = recip/(crawl-94);
  character[2].room = 1;
}
if (crawl >= 588) {
  character[3].y = recip/(crawl-188);
  character[3].room = 1;
}
if (crawl >= 682) {
  character[4].y = recip/(crawl-282);
  character[4].room = 1;
}
if (character[1].y < 82) {
  NewRoomEx(2, 160, 150);
}
}


This example was in a 320x200 room... you can change the settings of crawl and recip to change the speed and the initial X position. The sprites for each line of text were about 32 pixels high (and 320 wide)

EDIT:
You can see this now in my new game: Adventures of Princess Marian II: Mother's Day

http://www.adventuregamestudio.co.uk/yabb/index.php?board=5;action=display;threadid=5098;start=0#lastPost
12

delta

I could do a starwars scroller but really I'd be copying somethin being totally unoriginal. :P

SSH

Hey, I was just sharing the script in case anyone else wanted to do it: you don't have to be abusive!
12

delta

Whos being abusive? I'm sharing my point of view on copying work. You don't have to listen since I see it all the time. I'm not dissing your code. I'm sure its really cool.

SSH

I'm confused now: are you saying that its bad:

a) That I have created something that looks like the Star Wars opening text crawl
b) That someone might copy my code snippet to make their own text crawl when I'm happy for them to do so
c) That I have copied someone's code (I haven't, by the way)
d) Something else
12

scotch


Joseph DiPerla

I think there is a misunderstanding here somewhere...

Anyways.... Thanks for your contribution. Someone is creating a Star Wars game, maybe he can use this code for his game, who knows...


Joey
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

deltamatrix

#7
All I was referring to was the idea of this scroller. I'm not dissing ur code and Im honored that your happy to share it with us. I know this code is purely yours.

Its just that its been done already by George Lucas which is my only concern. I'd still like to see it in your game though. The only times this style has been copied in other films/games was when it was intended as a joke or spoof. Like the beginnig of austin powers 2.

EDIT: 'This post was automatically edited to remove TXT-style spelling' Whats wrong with that?

BTW: Question for my fellow brits. Have you guys been having trouble getting on-line with the phoneline lately? I had loads of trouble as I'm using a re-router to connect.
BAD WOLF - TORCHWOOD - MR SAXON - THE BEES ARE DISAPPEARING - PANDORICA - RIVER SONG

Darth Mandarb

#8
This is awesome!

I was working on something like this, but you just did the work for me!  I don't know if I'll use this in my game Rebel Spy because I like to use all my own stuff.  But if I can't get it to work on my own, can I use this?  If I do you'll get props in the credits!

dm

SSH

#9
Feel free to us it in Rebel Spy if you like, Darth. The tricky bit is getting the text to slow down appropriately as it goes into the background. I'm not sure what should really be used for perspective calculations: maybe a square root would be better, but the reciprocal I use seems close enough. The numbers will certainly need some adjustment: for a 640x480 (your background size, I see) I would suggest using crawl start at 700, recip=350000, and if your lettering lines are 64 pixels high, bring in each new line after 102 repeats... but its trial and error until you get the speed you like (you can also change the game speed, which might be easier)

Delta, I am using the scroller as a joke... the game is for my wife for Mother's day and is very short so an overblown intro is ironic (she also loves Star Wars)

edit: here's the game announcement thread:
http://www.adventuregamestudio.co.uk/yabb/index.php?board=5;action=display;threadid=5098;start=0#lastPost
12

delta

Played it. Good job!

~~~~~~~~~~~~~~

Have the Iraqis sabotaged the phonelines? Im on 19.6kbps

NavyNuke04

Yeah, good job! I took the liberty of checking out the pics you posted of your baby. Very cute! It's been a few years since mine were that small...

Scummbuddy

This didnt seem to hit me as to as how cool this really is until I saw the screenshot.  yeah, i knew what you were talking about, but this is really a good piece of code.  

Thanks a lot. Of course I'll cite you if I decide to use it.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

FenderQ

Thanks very much for sharing your work with the community.  I think sharing your work like you've done is one of the things that make this community so great.

Well done!  :D

Scummbuddy

It took me like an hour to re-find this thread.  I have decided to use this textscroll, and I will credit you with it when I release my game.  Thanks.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

wOoDz

Quote from: Scummy-HOP on Sat 24/05/2003 15:21:13
It took me like an hour to re-find this thread.  I have decided to use this textscroll, and I will credit you with it when I release my game.  Thanks.

thank you for looking i've been after something like this :D! and well done SuperScottishHero, and i'll do likewise with a credit in the game

woodz

SSH

Glad you find it useful, guys!

Just remember to nominate me for every category in the next AGS Awards  ;)
12

DeviantGent

Ah ha!

This will come in veeeeery handy for the Star Wars game I'm making. All right if I use it? You'll get a mention in the credz.
The Deviant Gent
His Tumblr - His Twitter

SSH

Of course, that's why I posted it here. Please PM me when your game is released so I can give it a go!
12

DeviantGent

Probably won't be for a while. It's something I've literally just started in AGS - I've been beavering away at it for about 6 months in Klick N Play and getting nowhere fast. Still, it'll be really good as a result.

Cheers. I'll make sure you get a copy.
The Deviant Gent
His Tumblr - His Twitter

SMF spam blocked by CleanTalk