G.M.O.S.S.E - Now on Github! (29/3/24)

A place for people with an interest in developing new shmups.
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: G.M.O.S.S.E - MK-VI (1/01/2012) Input Replays, new fonts

Post by trap15 »

Yeah, for transparency. It makes it look a lot more "dynamic" too.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VI (1/01/2012) Input Replays, new fonts

Post by BPzeBanshee »

I find it funny that the whole point of the vid was the warning visuals and revamped bullet patterns, and more attention gets paid to the pretty explosions. <3 u guise :lol:
Dave_K. wrote:It's been awhile since I frame stepped through a Yagawa game, but I thought he skipped rendering lower priority sprites like explosions when the object count was very high and overall framerate started dropping. Or are you saying to give more of a transparency effect?
I can add a conditional check against the number of explosion instances, but abuse of creating multiple objects in GM is bad programming design anyway. I make sure I'm staying under 300 object count at all times, so it isn't really necessary.

Alternatively I can fake slowdown based on object count which I have considered - I'd call it 'legacy mode' because I'd essentially design it to emulate my legacy PC's performance. :P
trap15 wrote:For the explosions, can I recommend adding in a "blank" frame every other frame? Or maybe it already does and youtube just isn't showing me 60fps. Regardless, they do look great!
They're solid frames, and I doubt doing that to the sprite itself would have any effect. I can just reduce the alpha of the sprite if needed for transparency, but I'm not sure it'd do any good. Solid State Survivor does it and it's the one thing that makes the game look tacky. Maybe reduction of alpha over time? I might try and talk to you later about this one.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VI (1/01/2012) Input Replays, new fonts

Post by BPzeBanshee »

Aesthetics:
* Added in explosion flicker, with an option to turn it off/on via config menu. trap15 and nimitz can let me know if I'm still "doin it wrong" after MK-VII when I don't have more important things to look at.

Sound-related:
* Finally de-GMFMODified all of the player's sounds except for Invader who's getting shafted anyway. Busterhawk sounds even weirder than it did before, but oh well. Another thing for people to test out more extensively in MK-VII.

* Also separated player-specific sound loading from player-specific volume handling into two user-defined events. This way the config menu controller can reset the volumes of the player-specific sounds in-game instead of having to reload (as it was when I first implemented sound volumes etc).

Core:
* Made further work on the loading of the config file. Default settings are now defined using GM's own third argument in ini_read_real/string whereas I had it before using a separate script and an if statement to check whether the config file actually exists. Basically, I'm removing an unnecessary redundancy, can't remember why I even thought having it separate was a good idea in the first place.

And finally, speaking of the Invader, final curtain call:
Should I replace the Invader with a retro-like sprite but more or less make it do the same thing, or replace it completely with a revamped Warbird?
I'm making the change within the next few days after some tweaks to the bosses and Stage 2 and then it'll be set in stone. So far I've gotten one vote from a person irl that went both ways and I don't want to have to revert this change due to popular demand afterwards, so here's your chance.
User avatar
emphatic
Posts: 7921
Joined: Mon Aug 18, 2008 3:47 pm
Location: Alingsås, Sweden
Contact:

Re: G.M.O.S.S.E - MK-VI (1/01/2012) Input Replays, new fonts

Post by emphatic »

That's really great stuff! :shock:
Image | My games - http://www.emphatic.se | (Click) I have YEN stickers for sale
RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VI (1/01/2012) Input Replays, new fonts

Post by BPzeBanshee »

Well, input replays aren't working and weren't working, and I've had enough of trying to get it to work. So it's been ripped out. Makes some areas easier on the eye.

For those who've actually been modding this thing: I changed the enemy HP and player shot damage variables by increasing both by a factor of 10. This makes them more sane to manipulate and easier on the eye.

Changed the Boss Warning sign to remove the scanliney effect and just red gradient bars on the sides with half-transparency.

I was hoping to get a release out by tomorrow but Kaiser still hasn't gotten around to making new sprites for the Stage 2 boss and there's still some backend tweaking needed anyway along with a potential pause menu issue (if anyone gets a freeze in GM games when they try to pause let me know).

EDIT: Okay, Kaiser sent me a new sprite for the Stage 2 boss. Still needs work though and I'm horribly tired. If the apocalypse really happens any time soon I'll be saving my energy in Darwin, most likely place in the world to survive.

EDIT2: Oh, and the Invader's been ripped out and replaced with the "Hyperion Warbird", armed with curling homing lasers of doom, three cannons of rapidfiring Xonochrome-like shots (not quite the same firerate though), and a hyper mode for bomb that increases ship speed and homing laser instance limit for a limited time. Also, more bugfixes etc.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VI (1/01/2012) Input Replays, new fonts

Post by BPzeBanshee »

Verbose logging bitches! :D
(should've done this BEFORE I ripped out input replays, maybe now I might've figured out what went wrong where... >_>)

Code: Select all

[346] +50 x 1(0 left), killed obj_3Den3_atk, Score: 0
[365] +50 x 2(161 left), killed obj_3Den3_atk, Score: 50
[373] +50 x 3(172 left), killed obj_3Den3_atk, Score: 150
[388] +50 x 4(165 left), killed obj_3Den3_atk, Score: 300
[399] +50 x 5(169 left), killed obj_3Den3_atk, Score: 500
[498] Player died, 2 left
[673] +500 x 7(14 left), killed obj_en1_dead, Score: 1350
[722] +500 x 8(131 left), killed obj_en1_dead, Score: 4850
[801] Player died, 1 left
[801] +500 x 9(101 left), killed obj_en1_dead, Score: 8850
[982] +300 x 1(0 left), killed obj_3Den1, Score: 13350
[1041] +750 x 2(121 left), killed obj_en2_dead, Score: 13650
[1139] Player died, 0 left
[1139] +750 x 3(82 left), killed obj_en2_dead, Score: 15150
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VI (1/01/2012) Input Replays, new fonts

Post by BPzeBanshee »

Continues are implemented! There is currently no time limit forcing you to make a decision on it. If you hit YES, the game starts where it paused with lives reset and 1 added to the last digit of the score, up to 9 (so if you continue 10 times it'll show 9).

I still haven't got a final title for the Warbird replacement. At the moment I switched it to "Iron Warbird" and made it grey-coloured instead of orange bodied but it sounds too much like a heavy metal band and I don't like the look of it. Can't make my mind up.

On the bright side, bullets are now animated, are blue by default and change to red when they're either on a collision course with the player or a certain distance from the player hitbox itself. Also, more work on Stage 2. The boss has been tweaked, stage 2 has been reworked and an extra surprise that I'm not going into details about is added.

The Stage 1 boss has been tweaked as well. Arxyne is purple and it's arc in the three-way-shot is wider, although I'm thinking of making it slightly less wide. Bombs are given a friction variable on Create, so you can actually place bombs in stages to be picked up without them dropping off the screen (whereas in MK-VI they handle the speed adjustments themselves because I forgot that friction existed as a GM internal variable, duhhhhhhhhh).

More additions to verbose logging to provide more and better info. It isn't performance sucking in-game but rather a single variable containing a formatted bunch of strings which all get saved to a text file when obj_ctrl_gameover transitions to rm_scores.

Adding to score is now done via a script, more stuff in obj_ctrl_music has been refactored (including fade effects being done by a separate object entirely), the music loading/info loading scripts have had alterations, the player object actually does get destroyed now as opposed to being made invisible when I tried that final parsing of getting input replays to work....

Lots and lots and lots and lots and lots of stuff, so much that the changelog is fucking huge and I've had to split it into several categories and some of the info on it is outdated, and some info I haven't even put on yet.

Rest assured, as much as I haven't been able to get around to making progress update videos as much as I'd like, it's getting a release on 1/1/2013 whether I like how it looks internally or not. Most likely the thread's title will go along with "Huge Core Tweaking, part 1" or something similar.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII (1/01/2013) Stage 2, New Ships and

Post by BPzeBanshee »

MK-VII is finally out, exactly 1 year after MK-VI was released.

Download link: http://www.mediafire.com/?1tqregadvau2esh
Video of a new surprise here: http://www.youtube.com/watch?v=Rb1P1EHo6B8

The changelog is damn huge and the internet is really failing hard on me, it was a pain to upload the video despite being 7 MB in size and even harder for GMOSSE itself (smaller than ever might I add despite the addition of several sprites and music) which weights at approx 13 MB.

Some pointers from off the top of my head though:
- Rebindable controls for keyboard AND joystick/gamepad
- Perfect distortionless TATE
- Changeable Window Size
- Filtering option (best used when Window Size makes the text look bad, GM limitation)
- Stage 2 created, playable from start to finish with midboss and boss
- Warbird R2 replaces the Invader
- Arxyne replaces Arxtyan
- New bullet sprites
- A fix for people who find that GM games crash when using background_create_from_screen
- Massive internal revamp in an attempt to make things easier for people to develop for
- Sound effects use GM Sound Engine, Music uses GMFMODSimple and both use separate controllers
- Explosion flicker based on trap15's suggestion
- New 'Elitist' HUD style which I must say has grown on me a fair bit
- Main Menu improvements
- BOSS RUSH MODE
- Customisable music support (with music info displayed in-game)
- Continues
- A surprise (see above video)
- Various bugfixes and tweaks

I hope that this makes not only the gameplay better in some aspects but makes things easier for people who have been wanting to learn how the hell GMOSSE is meant to work. A frequent complaint I got was that GMOSSE had become too difficult to actually look at internally, so a lot of effort has been made to reorganise things and bring more object stuff into scripts.

EDIT: Found a bug. Squashed it. If you got an error when going in-game to Ship Select that's been fixed. For those who are developers and have already downloaded the previous version, look in Scripts > CORE > Sound > scr_freesnd_normal(), and find where I've accidentally put sound_delete(global.explosion1) twice (one of those should be global.explosion2).
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

Spotted another bug but I'm waiting for someone to actually notice before I decide on uploading R3. On the bright side, internet's working again.

In other news I'm working on something else (when I actually get time or feel up to working on it) for adding functions which people have asked of it since before I came to this forum. Will elaborate more when things actually get stable.
User avatar
Rozyrg
Posts: 918
Joined: Wed Feb 11, 2009 12:03 am
Location: Southeast USA

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by Rozyrg »

Man, I could watch the Warbird's pretty green homing shots all day and not even worry about whether they're actually hitting anything. :mrgreen: Good job with the Swordfish's beam, too... I still haven't gotten *all* the kinks out of mine yet. It should work perfectly, it just doesn't.

I'm surprised I even made it to Stage 2, I always forget how fast and ferocious this beast is. I might've already said this before; but the enemy designs totally give me a Hyperzone vibe as well, definitely a plus. ;)
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

Hyperzone, another game I've never played before. Should check it out. :D Kaiser redid all of the sprites and created completely new ones for most of Stage 2 (for the boss I did box sprites first that he replaced since apparently it looked awful), inspired from some real ancient game whose name I can't recall. Seems to work fine though, I'm glad that the graphics are acceptable considering it isn't something I care too much for.

Ironically the Warbird's green lasers started from a request at Fusion Fangaming for help regarding a Touhou spin-off. Apparently Reimu or some person's bomb includes orbs that spin around the player for a while in a certain fashion and then lock on to enemies, and English didn't exactly appear to be his forte so I made my own example. Solved the problem and gave me a cool replacement for the broken Space Invader, although it was originally going to be red, but I foresaw visibility issues with the red enemy bullets (well they were at the time), so I made them green and Arxyne's everything to be purple instead. I have a feeling I may be relying too much for homing objects as secondary weapons though, that's three ships which have them now.

As for Swordfish, it's implementation is actually rather crude: 40ishx320 pixel laser sprite (from an external file no less) with the original image being overlayed together from Gun6/ZeroMan0's 40ishx40ish animated laser GIF with collision as basic as everything else, thus very handy for killing the back turrets of the platforms in Stage 1 but mainly useful for penetrative damage and duration rather than raw power.
User avatar
Kaiser
Posts: 1728
Joined: Mon Jun 12, 2006 10:20 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by Kaiser »

Rozyrg wrote: I'm surprised I even made it to Stage 2, I always forget how fast and ferocious this beast is. I might've already said this before; but the enemy designs totally give me a Hyperzone vibe as well, definitely a plus. ;)
I'm a complete amateur when it comes to designing sprites, the stage 2 boss sprite was a hackjob, it wasn't something entirely new, just the modified box sprite of what BP showed me before. It feels incomplete ATM because it's pods needs to be given new sprites as well, but that's something for later.
Zenodyne R - My 2nd Steam Shmup
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

Been meaning to record a video of what Stage 2 looks like now but I've been having issues with VirtualDub and just generally burnt out from GMOSSE development.

Been working on another project lately, and real life stuff instead. Certainly taking a break from any real work on GMOSSE for now, but I've learnt a few things whilst mucking around with said other project that could come in handy later.

Firstly, Triggers. Very handy. GMOSSE doesn't use any and I'm not sure it's in newer versions (pretty sure it's not in older) of Game Maker. Will consider moving ship weapon functions and stuff to triggers (which dev-wise will make things nicer to look at, gameplay-wise nothing will be different since it's basically GML if/return statements put into a GM IDE event).

Secondly, my old notes on the wobble scrolling in this thread seem a bit confusing, and there's next to no notes at all about it in GMOSSE. So I'll just post this formula here:

Code: Select all

view's x position = (player's x position / (room width / (room width - view width) ) ) - x offset for TATE issue
room width in GMOSSE: 320 pixels
view width in GMOSSE: 240 pixels
320 - 240 = 80
320 / 80 = 4
Therefore, in actual GML:

Code: Select all

// dynamic for room size
view_xview[0] = (obj_hitbox.x/(room_width/(room_width-240)))-x_o
// or static, to keep it short:
view_xview[0] = (obj_hitbox.x/4)-x_o
The other project I've been helping out with had wobble scrolling but used view_object, view_vborder and view_hborder, which relies on GM's automated system for keeping a specific object within the center of the view......which completely breaks as soon as you flip the screen and view dimensions. I was able to get it working manually but it was quite shaky at the best of times and quite buggy looking, so I instead I recalled this stuff about GMOSSE, how I came up with the specific variables, and implemented this system instead. Works perfectly now regardless of orientation (thanks to my TATE offset control), and is even smoother and easier to look at than the original code in the project.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

Image
Preliminary support for 2 players. Coded in a standalone GMK this will be ported over to a little test project of mine, and if it plays nice there then it'll get included into the next release of GMOSSE. Still gotta figure out continue/stage clear/game over/player-specific resource loading. Either way, this required a lot of thinking and a serious rethink of a lot of GMOSSE's generic components and spawn behaviour (the hitbox handles player spawning and variable control for score/lives/continues etc while obj_ctrl_game sits in the center, makes the hitboxes to begin with and draws EVERYTHING you see there on screen) so expect a lot of controllers to disappear in MK-VIII.

Don't worry, when it's done the HUD will be as flawless as ever, and I won't use those HUD pictures I came up with unless people think they're actually better than what I have already (as if).
User avatar
Rozyrg
Posts: 918
Joined: Wed Feb 11, 2009 12:03 am
Location: Southeast USA

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by Rozyrg »

Yeah, just adding 2P involves a lot more than you would think going in; but at least you don't also have checkpoints in there to make it even more unnecessarily complicated and nasty. ;)

Probably obvious; but a good trick I've found for testing is using a standard 2 stick gamepad and having one player on each stick/trigger, somewhat like Raiden 4's special mode.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

I sortof have that now with one player using WSAD and the other UDLRarrows. Enemies grant points to whichever player hit them last - I'm not sure this is the best way to go but I'd rather not fidget too much like I would if I made it so enemies grant points to whichever player did the most damage.

The main issue I have now is to figure out what to do if a player decides to rejoin: no doubt picking a different ship is going to result in a delay while sounds are loaded for it specifically, and even the newer sound effects engine I've come up with isn't exactly designed for it. Then there's the matter of what the fuck I'm going to do for wobble scrolling (player1's x + player2's x / 2, maybe?), a revamp of the high score system, more additions/renaming of input handlers, etc.

At least most of the core display/mechanics stuff (ie. respawn player after 60 frames, restore bombs, flash timer for 180 frames, score mechanics etc) is working, but to eradicate obj_ctrl_life/obj_ctrl_score from GMOSSE completely is going to be a bit of work to say the least.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

Bad news:

Lost internet, home phone and the parental unit's mobile phone to a dispute with the ISP, so I won't be able to be online much if at all.

That being said however I am making *some* progress albeit slowly. The 2P Test GMK I made is just about done but while working on my other sideproject I had trouble getting thrusters to appear on the ship adjusted for its turn using the fake stage clear player method I had, so I have a bit more internal changing to do that I'm not too keen to advance on while I've got an assessment for Uni due at some point soon. I really hope DeltaZeal/G-Stream G2020's music gets enhanced for the 360 port so I can replace the MAME recordings I've got for it with the real deal too.

I also attempted to make a platformer again, this time using one of Mark Overmar's old tutorials I found on my ext.HDD. Making good progress actually but starting to have issues with moving walls again. I have no idea how I'll handle water considering how different the physic behaviour is though. If anyone has some up-to-date/simple/useful GM8 tutorials with platforming shoot them my way and it'll be much appreciated.
User avatar
n0rtygames
Posts: 1001
Joined: Thu Mar 15, 2012 11:46 pm
Contact:

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by n0rtygames »

Hey Banshee,

I was wondering - this was mentioned to me earlier - you say this is the open source shmup engine... does that mean you'll be exposing the game maker source for this at some point, or otherwise have a repository somewhere?

Just curious :)
facebook: Facebook
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

The source is included in the download: a GM 8.0 .gmk file that you can freely modify (either with LateralGM or GM8.0Pro, note that only the latter allows for EXE export for obvious reasons).

By the way, internet's back. :D
User avatar
n0rtygames
Posts: 1001
Joined: Thu Mar 15, 2012 11:46 pm
Contact:

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by n0rtygames »

BPzeBanshee wrote:The source is included in the download: a GM 8.0 .gmk file that you can freely modify (either with LateralGM or GM8.0Pro, note that only the latter allows for EXE export for obvious reasons).

By the way, internet's back. :D
Well, don't I look stupid?

Might have to crack it open and have a look through at some point :-)
facebook: Facebook
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

WIP music replacement by railslave: http://www.youtube.com/watch?v=lSOZwu38V8A

I'm liking the music a lot. Most of it doesn't fit in at all right now (the boss theme has loop/timing issues, minute-long tracks in areas where it should only be like 10 seconds) but it's shaping up quite nicely. The Ship Select theme is my personal favourite. Nothing's been done past Stage 1 in terms of stage-specific stuff, and Stage Complete has no replacement yet.

The video says R3, I'm planning a possible revision update but if there's enough core stuff I get around to changing I'll probably hang back for a bit and then release a stable MK-VIII (that's an 8) instead.

EDIT: Also, in case it broke in the public R2 release, let it be stated for historical purposes that Arxyne has been fixed, and is probably due a weapons rewrite anyway to be less boring and more useful. Warbird R2 also needs rebalancing.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

Minor update: music now supports the NONE option in its filename tag in the music config, just like Xeno Fighters R. Unlike the latter it should be applicable with pretty much every track but this hasn't been thoroughly tested yet (worked with the intro). I think there may have been some slight bugfixes to other areas as well but not likely.
User avatar
Giest118
Posts: 1042
Joined: Wed May 02, 2012 1:50 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by Giest118 »

SO.

Recently, it started to really bother me that Game Maker has no built-in support for numbers bigger than 2.1 billion. So, I decided to work around that and make big number support anyway. I originally did this just for TW3R (so the score could go above 2.1 billion), and the solution I came up with for that game was specific to that game with a lot of hard-coded variables. I decided to come up with a more general solution. My idea was basically that a variable would be pretty much normal until it exceeded a billion, and then the billions could be stored in the second index of that variable (since Game Maker just kind of lets you retroactively decide that variables are now arrays).

This turned out to be nightmarish to implement because Game Maker sucks ass at arrays.

I envisioned numbers of theoretically infinite size (or at least up to 2.1*10^(9*3000000)) being possible to calculate with, but sadly, Game Maker lacks things like "passing arrays into functions" or "checking the length of an array".

Lacking that, my code got messy pretty quickly, and is thus far basically limited to 2.1 billion billions for a single number (or 2.1 quintillion). Which should be okay for the sake of, say, any given scoring system in a shmup, but it still left me annoyed.

So these are the scripts I came up with: One for adding to a big number, one for building a big number string, and one for seeing if one big number is bigger than another. I made these with scoring systems in mind (as well as high-score boards, hence the comparison function). At present, I have not attempted subtraction, division or multiplication, because I didn't see much use for them.

I have an example gmk with the scripts and examples of how to use them. The only thing in the gmk is a room with objects displaying the (potentially big) number, adding various large numbers to it (by clicking the buttons), and a comparison with 1.5 billion (printed helpfully on the left side).
https://dl.dropboxusercontent.com/u/289 ... umbers.gmk

Behold the shitty array fetching functions I had to put up with.

Code: Select all

/*
Big number adding script.

Takes two arguments.
argument0: The name of the "big number" variable to add to. (Must be a string)
argument1: The number to add to argument0. It can either be a real or the
    (string) name of a 'big number' variable.
    
Returns: Nothing. argument0 will be changed.

Usage note:
This script must be called by the object containing the variables (or by way of
a "with" construction). Passing in variables of the form "obj.var" will not work.
*/


if(is_real(argument1))
{

    variable_local_array_set(argument0,0,variable_local_array_get(argument0,0)+argument1)
    while(variable_local_array_get(argument0,0) > 1000000000)
    {
        variable_local_array_set(argument0,0,variable_local_array_get(argument0,0)-1000000000)
        variable_local_array_set(argument0,1,variable_local_array_get(argument0,1)+1)
    }
    
} else if (is_string(argument1)) {

    var num;
    num=variable_local_array_get(argument1,0)
    variable_local_array_set(argument0,0,variable_local_array_get(argument0,0)+num)
    while(num > 1000000000)
    {
        variable_local_array_set(argument0,1,variable_local_array_get(argument0,1)+1)
        variable_local_array_set(argument0,0,variable_local_array_get(argument0,0)-1000000000)
    }
    num=variable_local_array_get(argument1,1)
    variable_local_array_set(argument0,1,variable_local_array_get(argument0,1)+num)
}

Code: Select all

/*
Big number string building script.
The purpose of this script is to prepare a big number variable in order
to print it to the screen.

Takes one argument.
argument0: The name of the "big number" variable to build a string out of.
    (Must be a string)
    
Returns: The resulting string.

Usage note:
This script must be called by the object containing the variable (or by way of
a "with" construction). Passing in variables of the form "obj.var" will not work.
*/

var num;
num[0]=variable_local_array_get(argument0,0)
num[1]=variable_local_array_get(argument0,1)

var printstring;
printstring=string(num[0]);
if(num[1] > 0)
{
    i=0;
    while(i < 9 - string_length(string(num[0])))
    {
        printstring="0"+printstring;
        i+=1;
    }
    printstring=string(num[1])+printstring;
}

return printstring;

Code: Select all

/*
Big number comparison script.

Takes two arguments.
argument0: The first number to compare. Can either be a real or the
    (string) name of a 'big number' variable.
argument1: The second number to compare. Can either be a real or the
    (string) name of a 'big number' variable.
    
Returns: True if argument0 is greater than argument1, False otherwise.

Usage note:
This script must be called by the object containing the variables (or by way of
a "with" construction). Passing in variables of the form "obj.var" will not work.
*/


if(is_real(argument0) && is_real(argument1))
{
    if(argument0 > argument1)
        return true;
    else
        return false;
    
} else if (is_string(argument0) && is_real(argument1)) {

    var billions0, num0;
    num0=variable_local_array_get(argument0,0);
    billions0=variable_local_array_get(argument0,1);
    
    if((billions0 > 0) || (num0 > argument1))
    {
        return true;
    } else {
        return false;
    }
} else if (is_real(argument0) && is_string(argument1))
{
    var billions1, num1;
    num1=variable_local_array_get(argument1,0);
    billions1=variable_local_array_get(argument1,1);
    
    if((billions1 > 0) || (num1 >= argument0))
    {
        return false;
    } else {
        return true;
    }
} else if (is_string(argument0) && is_string(argument1))
{
    var billions0, num0, billions1, num1;
    num0=variable_local_array_get(argument0,0);
    billions0=variable_local_array_get(argument0,1);
    num1=variable_local_array_get(argument1,0);
    billions1=variable_local_array_get(argument1,1);
    if((billions0 > billions1) || (billions0 == billions1 && num0 > num1))
    {
        return true;
    } else {
        return false;
    }
}


I dunno if this is the kind of thing you want in GMOSSE, since anyone wanting to use big numbers might be better served using an extension package. But for people who are religiously opposed to those, this could work as an alternative.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

As per our discussion on IRC I'll definitely consider adding it to the scripts library in GMOSSE for anyone who wants to use it should they find it necessary to have numbers that large for score (I personally would go so far as to say that large score numbers are bad game design if it *needs* to be that large, but that's personal opinion). Thanks for the submission Giest! :)

I should note (and will add a warning in the comments of the code) that the scripts here use the variable_xxx functions to do array control with self-made arrays, which are deprecated in newer versions of GM. I try to keep my stuff not reliant on version differences but there are a select few that are also deprecated: fortunately, like these scripts, they can be simply commented out and won't affect gameplay because it only affects some of the external file settings and graphic-related stuff that 99% of people here won't use anyway.
User avatar
Giest118
Posts: 1042
Joined: Wed May 02, 2012 1:50 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by Giest118 »

... Wow, this is embarassing.

I just discovered something that blew my fucking mind. In my games I tend to use the in-built "score" variable for keeping track of score, so when that number started overflowing at 2 billion, I just sort of assumed that was all Game Maker could handle.

But then, in my testing of one of TW3R's new modes, I noticed that the end-of-stage bonuses were exceeding 2 billion (heading off into the realm of 6 billion) without any apparent overflow occurring. I never added the big-number handling to those bonuses. So I did more testing and realized... you're not even gonna believe this.

Image

In code, these are the numbers on display:

Code: Select all

testnum3=6555444333222111;
testnum4=55444333222111.99;
testnum5=5444333222111.999;
My findings show that a variable can be of any size, provided that the number itself is no bigger than 16 digits. Also, large numbers with a decimal point get automatically written in fucking scientific notation. I didn't modify the printing code to do that, Game Maker does that automatically.

What I take from this is: the "score" variable, and ONLY the "score" variable, is stored in a signed 32-bit integer. Every other number in Game Maker is in some weird data type where numbers can be 16 digits in size, even though that doesn't correspond to any bittage I've ever heard of.

So are my scripts above useless? Probably. They can easily be made useful again by just adding a few digits onto every place where a "billion" is referenced I suppose, but jesus god, how did Game Maker get this weird?
User avatar
Rozyrg
Posts: 918
Joined: Wed Feb 11, 2009 12:03 am
Location: Southeast USA

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by Rozyrg »

Default GM variables are evil, stay away! :lol:

You might need a little extra code if you want to insert commas or do the Giga Wing style color coding, though; but that's fairly easy to do.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

Most decimal numbers go to scientific notation when they reach large numbers in most programs: every OS calculator I've ever seen does this, for exmaple, after hitting around 16 digits. Doesn't surprise me at all.

What does seem odd is that the built-in score variable doesn't behave the same way. I suspect some of the built-in functions and variables (ie. score) have not been correctly updated to retain compatibility with large numbers after the large number precision issue in GM6.

One of the things I'm planning to add in GMOSSE MK-VIII is multiplayer support, as a result the scores are separated and use variables I made which should alleviate any issues with the score variable itself.
User avatar
Giest118
Posts: 1042
Joined: Wed May 02, 2012 1:50 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by Giest118 »

I come again with suggestions and such.

First is a thing I found when I was playing the game itself, and I noticed something weird about the extra life in stage 2. It doesn't appear to give you an extra life if you're already at 3. Is this intentional, or is it a bug?

Aside from that, I've been thinking back to the few times when I borrowed scripts from GMOSSE to use in my own games, and I seem to remember having a difficult time finding what I was looking for. In particular, as a suggestion, shouldn't "initializing the fonts" have its own script? I remember quite a while ago you pointed me to GMOSSE as an example of sprite-based fonts being used, but it took me a bit of searching to figure out where in GMOSSE it actually was.

For help with this and other navigation issues, I suggest including this text file:
Script List.txt

All it is is a list of the scripts and folders, indented by the in-gmk folder structure, based on your MK-VII R2 release. It includes descriptions of each script where I could decipher them.

I wrote this because I figured it would be helpful to have a simple document that could be searched by way of "ctrl-f" without having to deal with Game Maker's "search script" feature. Now, that feature can be helpful for certain things--had I known about it at the time, it would have helped me find where the font code was hidden--but if you're not exactly sure what you're looking for, it's not all that helpful. The text file above contains a list and basic description of every script, so it could be construed as useful.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

Good advice, I'll take all of that onboard! In fact I did wonder the other day why fonts were left in the main function, if it's easier for people to see I'll split that too.

The lives are deliberate. It adds additional score if you already have three lives (ala Batrider) but it's not immediately apparent - which I need to fix. Something for next release: an object creatable via script that displays small text and then disappears after a bit, like those "+100000!!!!" little text things that pop up for medals.

Speaking of medals I may even add those too, if people think it'll be a good addition. I've been considering a complete redo of the scoring system because plain chains are boring - and going a Triangle Service route could lead to some interesting code development. I'll be doing alteration of stage content for the end of Stage 2 anyway (since just after the extend there is a WIP clusterfuck).
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: G.M.O.S.S.E - MK-VII R2 (1/1/13) Stage 2, New Ships and

Post by BPzeBanshee »

Added the popup text thing. Collecting points from maximum bombs and extends have little text pop up. Kind of WIP, needs people to actually notice whether it's there or not for me to start messing with it.

Also made another modification to the stage 1 turret platforms: instead of doing a spin attack for its second phase, it continues to aim at the player and halves its turn speed. Makes its general difficulty based purely on player's actions now whereas before it was a bit hard to predict when you were high up on the screen.
Post Reply