⌂ YolkfolkThe Dizzy Fansite
Community discussion

DizzyAGE General Coding Queries

Started by delta on 9 February 2008 • 258,915 views

721 posts
#83049
As long as Dizzy triggers the timer a message should still pop up regardless of room shouldn't it?
👍 0
#83052
Don't think that will work Phill as a timer (or status additions) are usually dealt with by room updates as the game has to update it on each cycle, which is why I was toying with the HandlerGameUpdate section of the Handlers file.

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.
👍 0
#83058

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.

👍 0
#83060

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:

👍 0
#83061

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..)

👍 0
#83067

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:

👍 0
#83068
Hi Hobbes,

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.
👍 0
#83073
I tend to agree Simon. Looking at the menus.gs file the default is white, but adding colour to the headings is done the same way as hobbes has done by just adding the 'colour code' rather than a define as used in the def.gs file. Can't remember who, but someone did change the colour of the 'life eggs' in the HUD to yellow in one of their games.
👍 0
#83145
Hey everyone,

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.
👍 0
#83146

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!

👍 0
#83147

OK never mind, I think I've got it now {yolkfolk}:cheers:

👍 0
#83148
Hi Andy,

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.
👍 0
#83149

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!

👍 0
#83150

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)

👍 0
#83151
Cheers Andy, I had the same thought as you when I tried to do this and unpacked Mystic Forest too. Although I thought at first you meant an intro before the main menu. That's what I tried - putting an animation into the loading screen.
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.
👍 0
#83152

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.

👍 0
#83160
Grandad, regarding a timer with a pop-up message, I could be wrong, but you might be able to check from the room update function and draw a messagebox from there. If not, I'm pretty damn certain you can from room entry or exit. Sure, it wouldn't be exactly that time, but chances are good that it'd be close.
👍 0
#83161

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:

👍 0
#83162
Regarding Dizzy falling across the HUD, technically that isn't possible, as the 'game area' is the bit inside the window, below the HUD. It isn't possible to have the player outside the game window.

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.
👍 0
#83163
Well, if Jamie says those two ways aren't possible, that's good enough for me! :tup: For myself, I'm happy with the intro I've pieced together (inspired by the one from Link to the Past - with Dizzy as the triangles.) I might have a think about the two-maps thing though, because my game has a "dark and light world". The way I've started, they're both in the same map and the player is just moved on the Y axis to change, but we'll see how things go!

(I know I shouldn't make the intro before the actual game, but I couldn't help myself!)
👍 0