Game Development Community

Scrolling bitmap control

by Tim Heldna · in Torque Game Engine · 04/16/2005 (6:50 am) · 13 replies

Just wandering if anyone knows of an easy way to implement a scrolling bimap gui conrol. All i want it for is a credits screen. I just want to be able to make a bitmap which conains text, specifically the credits of the people who are / have contributed in the making of my game, and have it scroll up the screen. Pretty much like the credits at the end of a movie. There was a resource posted recently involving a scrolling star field but i can't seem to get it working, it just keeps crashing on me. Was just wondering if there's an easy way to do this or if it's already in torque and i haven't found it yet.
Any help would be appreciated, thanks.

#1
04/16/2005 (6:53 am)
Sometimes it just seems like things "fit together". I just got thru looking at this post a few minutes ago... Notice my comment below...

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7441
#2
04/16/2005 (8:07 am)
Hey David,
Thanks for the reply but unfortunately that was the resource i mentioned (see my original forum post, that scrolling star field i mentioned) which i can't seem to get working. It compiles fine but when i put it into my Gui it just crashes.
Have you tried it yourself, can you get it to work???
#3
04/16/2005 (8:43 am)
Works fine here.
#4
04/16/2005 (10:35 am)
Okay i got it working by deleting some 'DSO's. But now when i save a new GUI in the GUI editor it doesn't write it to the 'init.cs' script like it used to. Something weird is happening on my computer???
#5
04/16/2005 (1:39 pm)
The GUI editor never wrote it to the init.cs script... That's always been a manual process. :)

DSOs cache compiled scripts and occasionally get out of date. Deleting them is usually a good idea.
#6
04/16/2005 (10:09 pm)
Thanks ben, think i had too much red wine last night. I could have sworn that it was an automatic process but clearly i was wrong.
Hey regarding the DSO's, i've got an automatic DSO cleaner that deletes all DSO's in the directory it was run. Are there any DSO's i shouldn't be deleting? I think that i read somewhere ages ago that you shouldn't delete the 'main.dso' but am not sure if this is true or not.
#7
04/16/2005 (10:45 pm)
AFAIK you can delete them all. That why it's handy to have a batch command with
del /s *.dso
lying around.
#8
04/17/2005 (12:06 am)
@ Dirk
I've had a weird problem that only started happening when i started deleting all DSO's. That being that *.cs script files that i've changed seem to go back to their original unchanged state.

For example i have an m16.cs script file which i would make changes to, save it, delete all DSO's then run Torque. The changes work fine, then when i exit out of Torque the m16.cs script file changes back to it's original state. I use context for script editing and it tells me the script has been changed do i wanna reload from disk, if i do that's when it goes back to it's unchanged state.

Someone from the Tribes2 community told me not to delete the main.dso in the
C:\Torque\example\starter.fps directory as this will lead to problems and he suggested this may be the cause of my problem. Now i delete all DSO's barring the one i just mentioned and i have no problems.

I don't understand this at all and i haven't come across anyone else having the same problem. I guess for now i'll just continue to leave that main.dso alone.
#9
04/17/2005 (12:49 am)
This is very strange - this assumes that TGE actually writes a .cs file which would be news to me. Are you sure that it is not another process reverting the .cs file? Like the editor you use?
#10
04/17/2005 (1:15 am)
Tim Heldna.... All .dso files are fair game to delete. .cs (the actual script files) are murky territory. Generally the main.cs that resides in the same location as the .exe is a "hands off" file unless you really know what you're doing. The main.cs files in the "mod" folders (starter.fps) generally follow a pretty standard template so you can edit those if you want. Most everything else outside the common folder is free game. The common folder falls under that "If you don't know what it does. Don't touch it" clause.

Torque writes a couple .cs files on every exit. These are the prefs.cs files, other then that Torque shouldn't be making changes to any .cs file.
#11
04/17/2005 (3:23 am)
@ Harold
That's pretty much what i thought. I 'm going to follow your advice, thanks for the input.

@ Dirk
I know what i'm saying about the 'cs' files doesn't make sense but i assure you it's happening when i delete the main.dso file in the exe directory. I'm gonna follow Harold's advice and leave it well alone.
#12
08/07/2005 (12:12 pm)
Just to bring up the matter of scrolling credits again, has anyone implemented a nice scrolling bitmap based credits screen > 2048 pixels high?

I have some worries about using a bitmapped credits screen but the possibily benefits mean I'd like to persue this as a viable option.

Is 2048 a good size fo a credits screen?... Movie credits seem to go on and on.. assuming there's a lot of people I want to mention, will 2048 pixels be enough?

Does Torque decompress the whole image in memory when it loads it? If it does, the PNG file I'm using will take up about 5mb.. 640x2048, ture colour with alpha channel...
#13
08/07/2005 (1:10 pm)
If that's all you're doing, sounds fine to me. Use a GuiChunkedBitmapCtrl. You can then make it any height you want (bounded by memory). If you're worried, you could also break it up into multiple sections to minimize the working set.