DizzyAGE General Coding Queries
Started by delta on 9 February 2008 • 258,915 views
Your idea might work Simon, I'll give it a go as just moving a dynamic object should be able to be dealt with by the Handler as it's not requesting a player response ....latent is where the game can pause whilst it waits for a player response. Non latent just happen regardless of what the player does.
I've been messing around recently with the font, and was glad to find it was as easy as just editing the "font" tile :smile: . Does anyone know if it would be easy to make an animated font? I tried saving the tile with the old [space]2 and hoped that would work, but sadly it does not.
Shouldn't think so Andy as the font is just the template for the 'text' strings. When people make messages that move up (or down) they're usually objects that are shifted along the 'y' axis. Of course, if you've got a couple of hundred years to spare you could make each message individually in the same way you animate object tiles
:wall:
Well, considering I was trying to replicate the stars counter from Fantastic Dizzy (where the stars spiral in to form the number), it may have taken me some time indeed! {yolkfolk}:rofl: 250 animations, and after each star it would need to check, "if you have 1 star, play this animation, else...". But I'll forget this, and work on a simple counter. Thanks anyway!
(The sprite sheet for the numbers 0-9 would have been pretty massive anyway..)
Hi folks.
Is there a global variable somewhere that sets the colour of the text that displays the room name? I searched through the scripts but couldn't find anything.
At the moment, I've just added the colour reference to the code in handlers.gs, and it works fine. But was curious whether there might have been a colour set somewhere else?
// title
rx = GameGet(G_ROOM X) ;
ry = GameGet(G_ROOMY);
w = HudGetTextWidth( RoomGetName(rx,ry) );
HudDrawText( fontid, 160-w/2,9,w,8, [color="#FF0000"]"{c:0xffFFFFFF}" + RoomGetName(rx,ry), 0
Cheers :smile:
No, I don't think there's anything like that - you have to change it piecemeal I think. You could define a global variable and add it into the code of course but it's not worth it obviously.
I want to start my new game with an intro sequence before the HUD is drawn. I'd like Dizzy to fall from the very top of the screen (where the HUD will be drawn later). This part isn't crucial though, and a solution may be to just have 2 HUD's, the first of which is just black space. (Of course, the text and life bar would also need to be delayed or altered temporarily.)
I've been reading up on this, and having a mess around with the handler, and I can't seem to figure it out. Apparently, DrawHud is called by the engine? I'm not sure what that means and I can't find any reference to it outside of the handlers file. I know Mystic Forest Dizzy has a brilliant intro, but I've had a look at that and I'm still none the wiser.
Here's where I am at the moment: I put #def HUDRAW 70 in the def file and inserted a bit into the handlers file, so it reads:
// cover
hudraw = GameGet(G_HUDRAW);
if(GameGet(G_COVER) && hudraw==0)
{
... (everything here as normal)
}
This works as far as the menu screen: there will be a HUD display as long as I write hudraw==0, any other numbers it will be missing. Great! But when I start the game, the HUD appears. I don't want it to appear until I change the variable myself, because I want to make an intro. Any ideas much appreciated as always!
OK never mind, I think I've got it now {yolkfolk}:cheers:
Glad to hear you solved your problem. I don't suppose you could post the code here? I tried doing something similar, adding a little animation to a game before the hud appears, and it sort of worked but I'm not very happy with it.
I'd be very interested in your solution. Thanks.
Sure! Well, I wasn't actually able to draw outside of the game screen as I'd wanted, I just mean I worked out how to delay drawing the HUD. Which you can probably do in your sleep! (Your animated HUD in Sunken Castle was impressive.) What I do have took me hours to figure out but it's really simple. I just put a define in the def.gs file:
#def G_HUDRAW 70
...then edited the handlers.gs file to look like:
// cover
hudraw = GameGet(G_HUDRAW);
if(hudraw==1)
{
HudDrawTile[...]
}
Because the define is 0 by default, the HUD won't be drawn until you write:
{
GameSet(G_HUDRAW,1);
}
... probably at the end of your intro, in the game.gs file. You will also need to edit the start.gs file like this:
// INTRO BeginNewGame(); // use this to skip the MainMenu, for quick testing //MainMenu();
This bypasses the main menu so you can just do it yourself (in my case, with a few cutscenes).
So far this has worked with no problems... I worked it out by just bumbling around though, so I hope it doesn't bite me in the ass later!
Oh yeah, I also had to edit the start.gs file like this:
// INTRO BeginNewGame(); // use this to skip the MainMenu, for quick testing //MainMenu();
This skips the main menu so you can just make your own (for me, a series of cutscenes)
Sure! Well, I wasn't actually able to draw outside of the game screen as I'd wanted, I just mean I worked out how to delay drawing the HUD. I had an idea about this - if you turn the scrolling mode on during the intro, the rooms adjacent to the current one should be drawn as well, and be visible when the hud is missing. Then you could use a dynamic object to do Dizzy falling.
Good idea, I never thought of that. I guess the player would need to be enabled (maybe set with a transparent sprite or hidden behind something) so the Y axis stays rooted? I've just finished though and I'm happy with what I have :smile: . What I may do is go back and enable the player somewhere with an action object so players can skip it.
AndyG, regarding animated fonts, it's probably possible in theory. Message boxes are drawn as part of the HUD (from what I remember). There's probably a way of 'forcing' the HUD to animate, but I don't think I ever really tried. I wouldn't bet on there being a way though :wink:
In terms of turning scrolling on, that wouldn't work either, because the game window is still the same size. You'd have to make the game window bigger while it happened (so it filled the whole screen), and I'm not at all certain you can do that - it may be possible though.
A different way to do it would be to have two maps - one of them the size of the screen and blank (with something at the bottom for Dizzy to fall onto). Once he's fallen to the bottom and just standing there, you'd then unload that map and load the normal size map and the HUD (obviously with Dizzy in a room that looked exactly the same). Slightly complicated, but not impossible, and if you did it right at the start, that would cut down on how complex it would need to be.
(I know I shouldn't make the intro before the actual game, but I couldn't help myself!)