A flaw with game_restart()?

Posted by s on Nov. 22, 2007, 8:37 p.m.

Not really

Interesting thing I think you may wish to know(this info is collected with GM6)

[content]

When using game_restart(), it does not reset some variables(alpha and colors, for example)

This means that draw_set_alpha(.1) is used and if on the starting of the game before the alpha has been tinkered draw_get_alpha() is used, it will return .1

This allows one to store a value over from when the game restarted. A value of 1 would obviously mean the game has just begun

Sadly though, draw_set_alpha(2) will save it as 1, so division must be used in those cases(or draw_set_color() and the like)

[/content]

Anyways, I found interesting thing out when I restarted Kibosh without resetting the alpha. Nice half transparent menu got me looking about and indeed I've used this to my advantage in storing, such as the chapter and difficulty so that I can use game_restart and still have the player continue on without menu flipping when they get a GameOver

Ya, I'm in a rant mood. I should almost front this. Almost 300words. Meh, why not?

So…I've made it long and all what next to make this last? Ah yes, a not very exciting image. Click it if you want to see a more danmaku proving image

That's the final foe of Ch1. It doesn't look all that great, but in motion you'll be lasting waves of bullets, striking at snakes and then dodging homing missiles(or catching them, if you can switch polarity in time). I'm almost half way done Ch2. I'm trying to make sure to make easy mode easy and hard mode hard. Ch2 right now needs to be toned down, I think I've made Ch1 hard enough on hard mode and easy enough on easy mode

So ya, I figure that should be able to avoid the dreaded tag of short blog I've come to write

Comments

PY 17 years, 1 month ago

Ya,you go,Serp,eh?

Brillience for using a 'bug' to your advantage!

NoodleNog 17 years, 1 month ago

Quote: blog
…front this
HERESY! XD

Also, I see more than 2 sprites, so I'm guessing you are code-creating them at start. Those numbers (7 and 6) look horrid when scaled, moar resolution pls.

s 17 years, 1 month ago

@murf=Need I answer that? I'm sure you've gone through the antiYYG drabble and bloat issues before, so I'll just stay with the Vista converter and my happy little GM6s

The number is constantly scaling,it fades in over the whole screen and shrinks away in a countdown from 9

And I do use sprites in this case. I have the cannon, the arm, a 1x1Mask and now I have the blanked ship so that I have a free resource to add in. The numbers are constantly moving about, so you don't really notice