DizzyAGE General Coding Queries

Need help with using DizzyAGE then look here
AndyG
Hard Boiled Egg
Posts: 208
Joined: Thu May 22, 2014 1:54 pm
Location: UK
Contact:

Post by AndyG » Thu Jul 02, 2015 11:44 pm

OK never mind, I think I've got it now :v2_dizzy_cheers:

User avatar
Noggin the Nog
Hard Boiled Egg
Posts: 412
Joined: Sun Jul 01, 2012 12:04 am

Post by Noggin the Nog » Sat Jul 04, 2015 6:31 pm

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.

AndyG
Hard Boiled Egg
Posts: 208
Joined: Thu May 22, 2014 1:54 pm
Location: UK
Contact:

Post by AndyG » Sat Jul 04, 2015 7:52 pm

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:

Code: Select all

#def G_HUDRAW		70
...then edited the handlers.gs file to look like:

Code: Select all

// 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:

Code: Select all

{
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:

Code: Select all

// 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!

AndyG
Hard Boiled Egg
Posts: 208
Joined: Thu May 22, 2014 1:54 pm
Location: UK
Contact:

Post by AndyG » Sat Jul 04, 2015 7:56 pm

Oh yeah, I also had to edit the start.gs file like this:

Code: Select all

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

User avatar
Noggin the Nog
Hard Boiled Egg
Posts: 412
Joined: Sun Jul 01, 2012 12:04 am

Post by Noggin the Nog » Sun Jul 05, 2015 5:33 pm

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.

AndyG
Hard Boiled Egg
Posts: 208
Joined: Thu May 22, 2014 1:54 pm
Location: UK
Contact:

Post by AndyG » Sun Jul 05, 2015 8:20 pm

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 :) . What I may do is go back and enable the player somewhere with an action object so players can skip it.

delta
Hard Boiled Egg
Posts: 3965
Joined: Fri Feb 09, 2007 7:08 pm
Location: North West
Contact:

Post by delta » Tue Jul 07, 2015 7:04 pm

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

Image

"Quotes from the internet may not be genuine" - Abraham Lincoln

delta
Hard Boiled Egg
Posts: 3965
Joined: Fri Feb 09, 2007 7:08 pm
Location: North West
Contact:

Post by delta » Tue Jul 07, 2015 7:07 pm

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 ;)
Image

Image

"Quotes from the internet may not be genuine" - Abraham Lincoln

delta
Hard Boiled Egg
Posts: 3965
Joined: Fri Feb 09, 2007 7:08 pm
Location: North West
Contact:

Post by delta » Tue Jul 07, 2015 7:13 pm

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

Image

"Quotes from the internet may not be genuine" - Abraham Lincoln

AndyG
Hard Boiled Egg
Posts: 208
Joined: Thu May 22, 2014 1:54 pm
Location: UK
Contact:

Post by AndyG » Tue Jul 07, 2015 11:19 pm

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

Post Reply