shmups.system11.org

Shmups Forum
 
* FAQ    * Search
 * Register  * Login 
It is currently Sun Aug 20, 2017 7:59 am View unanswered posts
View active topics



Post new topic Reply to topic  [ 314 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next
Author Message
 Post subject: G.M.O.S.S.E - MK-IX (30/11/16) GM:Studio at last!
PostPosted: Sun Jan 16, 2011 9:22 am 


User avatar

Joined: 08 Feb 2009
Posts: 4813
G.M.O.S.S.E - the Game Maker Open-Source Shmup Engine
Currently at MK-IX (30 November, 2016)

Image
(older gameplay screenshots: 1, 2, 3, 4)

Download: Dropbox / Mediafire

I also have the original soundtrack folder that made use of Gleylancer and Crue Ball tunes. If you wish to use that download from here, extract to your GMOSSE folder and select the config file for it from the Audio Options ingame.
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Last edited by BPzeBanshee on Wed Nov 30, 2016 11:53 am, edited 17 times in total.

Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Sun Jan 16, 2011 3:31 pm 


User avatar

Joined: 18 Jan 2010
Posts: 417
Location: Frying over a jungle and saving the nature
The full(?) extent of the jam! :o

BPzeBanshee wrote:
- I want to make homing missiles that home towards ANY enemy. Havent figured that part out yet.

I have here a couple of homing weapon scripts, taken from the GMC forums 2 years ago. They both use different algorithms, but both of them requires you to put the codes in the bullet object itself. These will cause the missiles to actively seek out the nearest specified instance, so for best results use a parent object. I managed to create a weapon similar to the Hunter shot from Thunder Force using the first one. Maybe they can help you out.


EDIT: Removed the first algorithm. I see you already used it... :oops: The way I used it in my old game prototype was to use a parent object, though. When I did this the projectiles sought out the nearest enemy object they could find and even changed direction once the original target had been killed.
===========================

Second algorithm (requires putting several lines of code in the missile's Create, Alarm and Step events), by Louis8k8.

CREATE EVENT:
Code:
//By Louis8k8

targetx = argument[0];    //The coordinates of the instance
targety = argument[1];
found = 0;      //A switch to determine if a target has been selected, 0 means no, 1 means yes.
seek = 0;       //Records id of object to trace

alarm [0] = 1;  //An alarm-loop which chooses the direction of the object's movement

/*Find Object*/
//A counted loop that counts from 0 to the size of the room width/height which you need put in. Will exit if found = 1 (an object is selected as target)

//If object exists and distance to it is within the detection range "distance".

for (distance = 0; distance < room_height+room_width && found == 0; distance += 1)
if (instance_number (argument[4]) > 0 && distance_to_object (argument[4]) < distance)       
    {
    seek = argument[4];   //The target is set to that object
    found = 1;                  //Indicating that a target has been chosen so loop ends
    }


ALARM:
Code:
target_dir = point_direction(self.x, self.y, targetx, targety);
diff = ((target_dir - direction) mod 360 + 540) mod 360 - 180;
if (abs(diff) < 10)
   direction = target_dir;
else
   direction += sign(diff) * 10;

alarm [0] = 2;


STEP:
Code:
if (found == 1 && instance_number (seek) > 0)
    {
    target = instance_nearest (self.x, self.y, seek);
        targetx = target.x;
    targety = target.y;
    }


EDIT 2: I noticed that if you keep tapping Z after selecting "Start Game" it keeps playing the voice clip without starting the game, unless I wait for the clip to stop playing. Upon checking your code I realized you didn't put in a function to disable menu item selection after pressing Z in the Main Menu, so the Alarm event for the "Start Game" object kept re-initializing whenever Z was pressed (in fact I can still change the selected menu item with the arrow keys after choosing "Start Game"). Pretty lean code though, so all you need to do is put in a variable in obj_menucontrol's Create event that would allow the player to use the arrow keys and Z when true, and disable use of the keys when false.
_________________
--Papilio's Alpha now on itch.io! (development thread)
Xyga wrote:
Blondest eyelashes ever.


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Mon Jan 17, 2011 12:55 am 


Banned User
User avatar

Joined: 07 Feb 2010
Posts: 2116
I approve of this, nice work!
_________________
IGMO - Poorly emulated, never beaten.

Hi-score thread: viewtopic.php?f=2&t=34327


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Mon Jan 17, 2011 2:23 am 


User avatar

Joined: 08 Feb 2009
Posts: 4813
Drum wrote:
I approve of this, nice work!

:D Thank you!

Quote:
The way I used it in my old game prototype was to use a parent object, though. When I did this the projectiles sought out the nearest enemy object they could find and even changed direction once the original target had been killed.

Could you be more specific with this? I know the script works because I originally put a small thing together as a Homing Missile Demonstration for the guy that did Breakforce but I could only ever get it to home into one enemy. Really it's only in there because I havent taken it out for saving space yet, and as you can see with the lives bar I've used the missile sprite for something else entirely. :P

Quote:
EDIT 2: I noticed that if you keep tapping Z after selecting "Start Game" it keeps playing the voice clip without starting the game, unless I wait for the clip to stop playing. Upon checking your code I realized you didn't put in a function to disable menu item selection after pressing Z in the Main Menu, so the Alarm event for the "Start Game" object kept re-initializing whenever Z was pressed (in fact I can still change the selected menu item with the arrow keys after choosing "Start Game"). Pretty lean code though, so all you need to do is put in a variable in obj_menucontrol's Create event that would allow the player to use the arrow keys and Z when true, and disable use of the keys when false.

Yeah, I liked the implementation of it. I should just change the event to Key Press Z and then an if clause and I think that should do the trick. I actually came up with the menu thing based on someone else's code example too but I couldnt see the guy's name in it at the time. He had three buttons that would play sounds like "IMA FIRIN MAH LAZERN *PEWWWW*" and stuff like that. Your idea seems good too, I could use that for multiple cases as a global switch.

I'd also like to implement a sort of ship select feature. I can't imagine it'd be too difficult to do, just maybe another room, a nice externally-loaded background and a few ships to pick from (I was going to edit the Judge Spear's sprite (again) to come up with something closer to the ship from Gleylancer to go with the theme, then I thought of a cool weapon design I could do for Swordfish if the creator of that ship would allow me to).
Another experiment I tried and so far failed at: Making a TATE option. I think there was a way that was found early in the XF-R thread or something, but as it was view_angle[90] gave nasty bars on the sides of the screen as if it were 16:9 mode all over again. :roll: I'll dig up what I can on those relevant threads when I get the time.

On the bright side though, I did make my own script! I'm quite happy about it because firstly I didn't copy/paste any direct code and secondly it's a little more complex than Rozyrg's original basic bullet creation script in that I added a minimum and maximum speed you can do for it as well as amount of possible spread. This alone makes interesting bullet patterns that can be seen in the green obj_orb in its first attack pattern really being a spray and then later on using more circular attack patterns at a set speed WITH THE SAME SCRIPT. I felt quite good about myself when I made that work, and in my original test for the green orb's second attack pattern it added like 500 bullets to the screen. :O
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Mon Jan 17, 2011 3:12 am 


User avatar

Joined: 18 Jan 2010
Posts: 417
Location: Frying over a jungle and saving the nature
BPzeBanshee wrote:
Could you be more specific with this? I know the script works because I originally put a small thing together as a Homing Missile Demonstration for the guy that did Breakforce but I could only ever get it to home into one enemy.


Pretty simple, you just create a generic parent object which you must set all enemy types to, and then code your homing missile to seek out that parent object in its Step event. Depending on how it is coded (using instance_nearest is often enough), it will seek out the nearest instance of the parent object, which of course will be the nearest enemy. I can give you a short sample if you want.

EDIT: I tried re-implementing your original method. I now remember why I had two lockon bullet types in my original game code; Simon's version actually only allows you to lock on to only one enemy at a time :lol:. I actually prefer the second approach I outlined above, which allows different missiles to lock on to different enemies.

Quote:
Yeah, I liked the implementation of it. I should just change the event to Key Press Z and then an if clause and I think that should do the trick. I actually came up with the menu thing based on someone else's code example too but I couldnt see the guy's name in it at the time.

Yup, an If clause will do the trick, since you only need to call an action if the variable returns true.

I'm thinking of adding a few resources you could use in your GMK file in my spare time if it's all right with you, a script or two and a few sample objects if possible.
_________________
--Papilio's Alpha now on itch.io! (development thread)
Xyga wrote:
Blondest eyelashes ever.


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Mon Jan 17, 2011 9:02 am 


User avatar

Joined: 08 Feb 2009
Posts: 4813
I actually tried that but in a different way and it didn't work. I must've been doing it wrong so I could always try again. I may try and implement both for demonstration's sake.

And I'm totally okay with you contributing, it seems you're the main contributor to this entire thing so far. :P Just send it to me via PM or something and I can muck around with the stuff for another major release.

EDIT: Signing off for tonight, so far thanks to you I've gotten the homing missiles to work using the first method and I'll see what I can come up with for the second method later tonight. I also fixed the menu bug and the scoring bugs and stuff. Some of the explosions don't behave how they used to upon death now (lesser orbs of the boss only explode once for example) and using the same parent object method I made collision events with the player's bullet a lot easier to manage too since it affects all enemies. :D
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Mon Jan 17, 2011 5:31 pm 


User avatar

Joined: 16 Feb 2006
Posts: 5077
Location: Canada
This is a neat idea, I approve :3


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Wed Jan 19, 2011 8:52 am 


User avatar

Joined: 08 Feb 2009
Posts: 4813
MK-II of GMOSSE is out!

Get it here. I also added it to the first post.

Biggest change is that MK-I's bugs are fixed and MK-II brings a new set. And also, TATE mode. :P\

At this point I'm considering implementing multiple ships in the game. If anyone has any cameo requests or anything of the like let me know. I'm also planning on redesigning the boss to use timelines and less randomised content for possible input file support via timelines if that's even possible, as well as whatever trivial bugfixes and new stuff I want to put in (got another script from S20 that I havent put in yet and is apparently broken, I'll take a look at it tonight).
And if anyone can tell me why the text looks bugged when in TATE mode or provide insight into any of the more weird current issues, please do let me know. :oops:
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Wed Jan 19, 2011 9:33 am 


User avatar

Joined: 18 Feb 2006
Posts: 5013
I suggest putting in a template for multiple ships / additional ships as this is intended to be more a tool than a game by itself.
_________________
so long and tanks for all the spacefish
unban shw
<Megalixir> now that i know garegga is faggot central i can disregard it entirely
<Megalixir> i'm stuck in a hobby with gays


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Wed Jan 19, 2011 10:04 am 


User avatar

Joined: 08 Feb 2009
Posts: 4813
Twiddle wrote:
I suggest putting in a template for multiple ships / additional ships as this is intended to be more a tool than a game by itself.

This is indeed the plan, though I must confess I do have ulterior motives in implementing functions into GMOSSE. Whatever I use here will be easily able to be implemented into the 'true game project' that I've been planning for a long time.
Once I'm confident other key issues are sorted I'll redesign the ship system to be able to select multiple ships. I'm not nearly as good as Alluro when it comes to emulating commerical ships but if you have a suggestion for a ship I'm all ears.
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Thu Jan 20, 2011 8:02 pm 


User avatar

Joined: 17 Jun 2007
Posts: 861
Location: Slovakia
I'd recommend removing keydown events for movement and replacing them with a single script. It'll help if you decide to add more ships with different movement or configurable controls.

Here's how i'd do it, feel free to modify.
Code:

//reset speed to 0
xvel=0
yvel=0

//is slowdown key down
if (keyboard_check(vk_shift)) movespeed=2 else movespeed=5

//add movement
if (keyboard_check(vk_left)) xvel-=movespeed
if (keyboard_check(vk_right)) xvel+=movespeed
if (keyboard_check(vk_up)) yvel-=movespeed
if (keyboard_check(vk_down)) yvel+=movespeed

//speed limit (for diagonal movement)
if sqr(xvel)+sqr(yvel)>sqr(movespeed)
    {
    dir=arctan2(yvel,xvel)

    xvel=cos(dir)*movespeed
    yvel=sin(dir)*movespeed
    }

//add speed to position
x+=xvel
y+=yvel

//clamp position
x=max(min(x,238),2)
y=max(min(y,318),2)
_________________
"A game isn't bad because you resent it. A game is bad because it's shitty."


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Sat Jan 22, 2011 7:14 am 


User avatar

Joined: 08 Feb 2009
Posts: 4813
I never really understood why people put keypress events in Step as opposed to directional buttons but I suppose one could mod it easily in regards to controls, and then depending on how I decide to implement the multiple ships dynamic I could just put the entire lot in a switch-case-break argument that would cover most if not all bases.
Nevertheless the idea of putting it in a step event seems like a useful idea (as well as limiting on diagonal movement) so I probably will add it given time if it's all the same to you. :D
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Sat Jan 22, 2011 11:32 am 


User avatar

Joined: 18 Jan 2010
Posts: 417
Location: Frying over a jungle and saving the nature
Yes, putting it in the Step event ensures that it's easily modded. You can use either If > Then or Switch > Case > Break statements to outline each keypress event, and even combine it with a Data Array system to ensure full control over the mapping process and add customization to the mix (you can even reassign the same actions to a joypad).

Here's a key remapping tutorial by Mark13673 which uses Data Arrays saved to an external .INI file to remap keyboard presses to different functions. I'm currently studying it myself, and I believe both Rozyrg and Alluro use a variation of it.
_________________
--Papilio's Alpha now on itch.io! (development thread)
Xyga wrote:
Blondest eyelashes ever.


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Sun Jan 23, 2011 3:18 am 


User avatar

Joined: 11 Feb 2009
Posts: 912
Location: Southeast USA
Mine just uses keyboard_lastkey pretty much. It clicked for me when I realized it just stores the numerical ASCII codes (for some silly reason I thought it might use the built in vk commands or something), which are extremely easy to move around. I use the arrays mostly for the options part.

For instance, when reading what the current ones are:
Code:
key[1]=global.shoot_button
key[2]=global.up_button
key[3]=global.down_button
key[4]=global.right_button
key[5]=global.left_button

After which you could run those values through another script to get all the right names for each.
Code:
var num;

repeat(5)//however many keys there are
 {
 num+=1
  getkeynamescript(key[num],num)
 }

Code:
//(getkeynamescript)

//all of these values are reset to zero after this script ends
var num,kname,which_key;

num=argument0 //key id (ASCII)
which_key=argument1 //the key being redefined

switch (num)
{
case 37: kname="left" ;break;
case 38: kname="up" ;break;
case 39: kname="right" ;break;
case 40: kname="down" ;break;
}

keyname[which_key]=kname



For confirming the changes, you'd basically just reverse the first one. Then for the INI, you'd just move those global variables over.. just make sure you don't have them default to zero when it reads the values!

Redefining keys isn't *too* bad, the slippery part (for me at least) is where the user inputs the ones they want. You have to make sure it catches the one you pressed correctly and that there are no conflicts with the current set (like, pressing the current button for 'up' when redefining it wouldn't make it go to the above selection.) It took a lot of trial and error for me.

Anyways, definitely impressed with what you've got so far. Keep it going! :)
_________________
Fire Arrow Plus is out on Steam!
Itch.io page - Gamedev blog


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Sun Jan 23, 2011 6:44 am 


User avatar

Joined: 08 Feb 2009
Posts: 4813
Thanks for the extra info guys, looks like I've got some more learning to do. :)\

When I can get the time to do so (school's starting up for me now D:) I'll redesign obj_player so that it can represent different ships with different key functions and behaviours under the one instance using the method I find most simplistic for me to learn. :D
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Mon Jan 24, 2011 1:52 am 


User avatar

Joined: 11 Feb 2009
Posts: 912
Location: Southeast USA
If you're going to have multiple ships, remember that anything you assign to the object by script will 'miss' the create event and instead happen on it's first step... even if you create it in the same script. Ie:
Code:
ship=instance_create(argument0,argument1,obj_player)
switch (argument2)
{
case 0: ship.sprite_index=ship0_img;break;
case 1: ship.sprite_index=ship1_img;break;
case 2: ship.sprite_index=ship2_img;break;
case 3: ship.sprite_index=ship3_img;break;
}



Just something to keep in mind. :3
_________________
Fire Arrow Plus is out on Steam!
Itch.io page - Gamedev blog


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Sat Feb 05, 2011 8:02 am 


User avatar

Joined: 08 Feb 2009
Posts: 4813
Thanks for the assistance guys, I'm still keeping what you guys have all set in mind and when stuck I'll come back here to get back on track.

Having said that, I do now have customisable ship support! I've coded it to go with the Ship Selection screen (which I've also made and not really finished but it does work!) and with obj_player changed to be a parent object used for movement among other things, so no scripts but another controller object. Thank God for case/switch/break.
Image
The default ship is now called Xonochrome and its related functions are now in a separate object. I'm still in the process of renaming things to be ship-specific for sprite-related stuff but when playing you won't notice the difference so I can say its a success. The menu itself is rather boring so I'll have more spacey stuff going on in the background to keep going with the Gleylancer theme.
Of course, multiple ship selection would be useless without multiple ships, so I spent a while thinking of something cool and came up with this....

Image

Again, still WIP. It has no unique bomb just yet (Im trying to come up with ideas for that one) and its way overpowered, abusing a current flaw with the boss where if the green orb is blown up before the circle attack happens the boss will do absolutely nothing till it dies.

Current todo list for MK-III that I'd like to get done (I may release earlier than this):
- INI file config support
- Level management handling with a controller object (I've done this already with my previous game project that I put on hold, so I can use that for a reference)
- A second stage with enemies using attacks made only by Pinwheel
- Investigate if an key input recording system can be implemented using external timelines
[For this to be accurate for scoring evidence one would need to either make nothing in the game randomised
OR
prerecord bullet direction and placement of EVERYTHING in the game which would be resource-taxing and confusing to implement]
- convert all enemy shots to timeline-based events instead of variable-based timers in Step event
- fix TATE offset (yeah right)
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Mon Feb 07, 2011 12:11 pm 


User avatar

Joined: 08 Feb 2009
Posts: 4813
No pictures yet cause I'm about to get off and very busy with schoolwork, but I improved the ship select menu to have cool stars happening in the background (like Gleylancer does it, but I made it using an extra 'behaviour' method in the existing obj_star), and got scrolling text displaying stats and info in the blank spot underneath it. Changed font of the ship display too (twice). Fixed a bug with scoring and found a strange glitch where movement on the first step when playing will give an error regarding unknown player hitbox position or something. Not sure what to do about this, but I do plan on making an extra function in a similar fashion to how Cave does demonstration of weapon mechanics. I may do this here in the same room (again, like how Gleylancer does it) or in a separate room. Still thinking about how I'm going to code that. Actually after writing this I think I can solve this for the moment just using the spawning and whatnot in Room Creation event but I still want a live demonstration of ship capabilities at some point in the engine.

Anyhow, just letting you know, I haven't stopped working on the project, but the backlog I've made for myself is going to take some time with schoolwork and all and I will make frequent updates like this with posts as to what I've done so far. If anyone has extra function suggestions to the backlog besides what I currently have listed let me know.

Speaking of which:
- Enemies need redesign. Changing damage to health variables for individual enemies seems like a bad idea and last time I tried making a parent object for this it failed. I was an idiot and should be able to do this properly now providing I figure out how I'm going to set up hp as a local variable for enemy objects and yadda yadda. Attack patterns have yet to have been converted to timelines.
- Comments need redoing (not high priority since I should only really do this when I can call the engine finished)
- Level select handling. Still haven't done that yet and turns out my game project did this rather crudely so I wont be using that method, instead will use another object controller for doing so.
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Mon Feb 07, 2011 1:58 pm 


User avatar

Joined: 18 Jan 2010
Posts: 417
Location: Frying over a jungle and saving the nature
BPzeBanshee wrote:
- Enemies need redesign. Changing damage to health variables for individual enemies seems like a bad idea and last time I tried making a parent object for this it failed. I was an idiot and should be able to do this properly now providing I figure out how I'm going to set up hp as a local variable for enemy objects and yadda yadda.

What do you mean by this? When I checked your local variable handling for enemy health, it looked pretty fine to me. Do you mean that you want to set up a universal system for handling enemy health for entire groups of enemy subtypes?
_________________
--Papilio's Alpha now on itch.io! (development thread)
Xyga wrote:
Blondest eyelashes ever.


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Tue Feb 08, 2011 5:36 am 


User avatar

Joined: 11 Feb 2009
Posts: 912
Location: Southeast USA
Yeah, I'd definitely recommend doing parents for the enemies. There's nothing to it, either really.

All of mine use a master_enemy object for a parent which has all the basic collision events and stuff like how far it should be off the screen before it dies (I usually base this on it's sprite_width, sprite_height, etc.) The trick is not to bog down the base parent with a bunch of really specific stuff only a few enemies will use, you can easily make sub-types that add different features or just build these onto the enemy obj itself.

Something else you could do is give the player bullets a damage variable on their creation script, so that the collision with an enemy is no more complicated than
Code:
health-=other.damage

That way you can change it on the fly and reuse the same bullet obj for different weapons. I know what a hassle it is to add collision events for dozens of bullet types..lol.
_________________
Fire Arrow Plus is out on Steam!
Itch.io page - Gamedev blog


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Tue Feb 08, 2011 6:42 am 


User avatar

Joined: 18 Jan 2010
Posts: 417
Location: Frying over a jungle and saving the nature
Rozyrg wrote:
Something else you could do is give the player bullets a damage variable on their creation script, so that the collision with an enemy is no more complicated than
Code:
health-=other.damage

That way you can change it on the fly and reuse the same bullet obj for different weapons. I know what a hassle it is to add collision events for dozens of bullet types..lol.
I used to do a variation of this actually, by using a parent object for all player bullets. It saved me a lot of time since all enemies merely had to register collision data from one projectile type and the specific objects would register their own unique variables afterwards.

The problem was when I tried doing a 2-player setup; the whole thing went haywire and I had to create unique objects AND collision events for player 1 and 2 bullets, since setting the same bullet type to different parent objects on creation confused the scoring system, plus I couldn't use other.damage either for obvious reasons.

Guess I have to rework the shot collision system and simplify it somehow, but your first suggestion on creating a parent object for all enemy objects could actually be the key (since I also had that too before the 2 player setup came along, after which I scrapped it while trying to find the scoring bug), so thanks for that. :D
_________________
--Papilio's Alpha now on itch.io! (development thread)
Xyga wrote:
Blondest eyelashes ever.


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Tue Feb 08, 2011 10:19 am 


User avatar

Joined: 08 Feb 2009
Posts: 4813
S20-TBL wrote:
BPzeBanshee wrote:
- Enemies need redesign. Changing damage to health variables for individual enemies seems like a bad idea and last time I tried making a parent object for this it failed. I was an idiot and should be able to do this properly now providing I figure out how I'm going to set up hp as a local variable for enemy objects and yadda yadda.

What do you mean by this? When I checked your local variable handling for enemy health, it looked pretty fine to me. Do you mean that you want to set up a universal system for handling enemy health for entire groups of enemy subtypes?

This, precisely S20. While the method I had worked, I realised there was a much more optimal way to handle enemy collisions for general things so I thought I'd do something similar to the player ship system.

As of now, I've gotten this working and converted all ships to this form - but I came across an interesting error while doing so. It seems that having anything in the parent enemy object (I used obj_enemytarget, which was already a parent object in GMOSSE purely for the homing missiles) with Begin Step is not read when the child object has a Begin Step event as well. This caused me some grief because while the normal rotating enemies worked fine with the method I had, the boss objects didn't. So what you'd see was, upon health reaching 0 for the orbs, they didn't die and kept on attacking. :lol:
This happened because I changed all the 'upon health reaching 0' commands to straightout commands within User Defined 15. obj_enemytarget will call this when enemyHP <= 0 and each enemy has their own enemyHP set to a number within themselves upon creation. This command to go to event_user(15) was in the parent's Begin Step event, and so was not read by the boss objects which had their own Begin Step event, but was read by everything else I made work with this method because they only used Step.
I dont know what the problem is, but I'm guessing it's something I wasn't taught about Game Maker itself and will probably find something about it anyway. :roll:

Rozyrg wrote:
Yeah, I'd definitely recommend doing parents for the enemies. There's nothing to it, either really.

All of mine use a master_enemy object for a parent which has all the basic collision events and stuff like how far it should be off the screen before it dies (I usually base this on it's sprite_width, sprite_height, etc.) The trick is not to bog down the base parent with a bunch of really specific stuff only a few enemies will use, you can easily make sub-types that add different features or just build these onto the enemy obj itself.

Something else you could do is give the player bullets a damage variable on their creation script, so that the collision with an enemy is no more complicated than
Code:
health-=other.damage

That way you can change it on the fly and reuse the same bullet obj for different weapons. I know what a hassle it is to add collision events for dozens of bullet types..lol.

I've already come up with a good working method of doing this, but you've brought up extra things I did not consider putting to the parent object. Stuff like how far it should be off the screen before deletion I've done within the objects themselves and tweaked them slightly because I made the mistake of giving them an Outside Room event, which they spawned in to begin with and thus never appeared on the game screen. :lol:

So, now my list goes as follows:
- tweaking the power of player ship shots (setting obj_homingmissile's damage to 1.00 made it OP, and the Invader needs a small rebalancing of spread/power yet)
- thinking of how I'm going to make Invader's bomb, Im thinking of a bullet-cancelling line barrier like Hikaru's KIKU beam but Space Invaders style :D
- will do INI file support after making the bomb, containing option to change TATE settings.
- redo enemy patterns to timelines, not looking forward to doing this but it's necessary nonetheless. It will fix all remaining unintended timing problems with the boss and make things visually easier for creating bullet attacks.
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Tue Feb 08, 2011 11:21 am 


User avatar

Joined: 11 Feb 2009
Posts: 912
Location: Southeast USA
S20-TBL wrote:
The problem was when I tried doing a 2-player setup; the whole thing went haywire


This says it all. I salute you for braving this arduous territory at all. :D

Adding this feature crossed my mind before; but when it got down to actually doing it, I'd usually just end up with a massive headache. So many things you take for granted having only one player ship and one score to deal with.
_________________
Fire Arrow Plus is out on Steam!
Itch.io page - Gamedev blog


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Tue Feb 08, 2011 12:14 pm 


User avatar

Joined: 18 Jan 2010
Posts: 417
Location: Frying over a jungle and saving the nature
BPzeBanshee wrote:
As of now, I've gotten this working and converted all ships to this form - but I came across an interesting error while doing so. It seems that having anything in the parent enemy object (I used obj_enemytarget, which was already a parent object in GMOSSE purely for the homing missiles) with Begin Step is not read when the child object has a Begin Step event as well. This caused me some grief because while the normal rotating enemies worked fine with the method I had, the boss objects didn't. So what you'd see was, upon health reaching 0 for the orbs, they didn't die and kept on attacking. :lol:
This happened because I changed all the 'upon health reaching 0' commands to straightout commands within User Defined 15. obj_enemytarget will call this when enemyHP <= 0 and each enemy has their own enemyHP set to a number within themselves upon creation. This command to go to event_user(15) was in the parent's Begin Step event, and so was not read by the boss objects which had their own Begin Step event, but was read by everything else I made work with this method because they only used Step.
I dont know what the problem is, but I'm guessing it's something I wasn't taught about Game Maker itself and will probably find something about it anyway. :roll:

Ah, I see your problem. The thing is, if a Child object shares the same Event as the Parent, then that Child object's specific Event will override the Parent object's version, essentially nullifying anything you put in there. The best thing to do would be to take note of which object has which events and then avoid re-using them for any Child object.

One example is this: say you have a Parent player bullet object and several bullet Child objects, e.g. Homing, Burst and Spread, all set to the Parent. The Parent has 2 events:

    1) Collision with the enemy object, which tells the bullet to destroy itself
    2) an Outside View event (say, instance_deactivate_object(self);)

However, the Child has several events as well. Let's use the Burst shot as an example, so it would have:

    1) A Create event that lists things like damage variables
    2) A Step event for any special functions you may have
    3) A Destroy event that tells the object to create an AOE explosion upon destruction
    4) A Draw event for displaying sprites

If you noticed, in the above example the Child object does not share any of the same events as the Parent. This means that none of the Parent object's Events will be undone, and your projectile will function as intended. It will be destroyed if it hits the enemy object (as per the Parent object parameter) and it will create an AOE explosion (as per the Child object parameter).

However, the moment you make the two share the same Events, the Child object will take priority. For instance, if in the same example above you also give the Child object its own Outside View event, it will perform that instead of the Parent object's Outside View parameters. Or if the Parent Object has its own Create event detailing some specific variables and functions, and then the Child object has another Create event, then Game Maker will ignore anything you put in the Parent's Create event. The list goes on from there.

Kids these days I tells ya. :lol:

Rozyrg wrote:
So many things you take for granted having only one player ship and one score to deal with.

So painfully true...after going through it all I was left thinking "Now I know how some of those doujins produce stuff so quickly..." :lol:
_________________
--Papilio's Alpha now on itch.io! (development thread)
Xyga wrote:
Blondest eyelashes ever.


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Wed Feb 09, 2011 8:08 am 


User avatar

Joined: 08 Feb 2009
Posts: 4813
EDIT: Scratch that, instance_deactive_object does the same as deleting them from what I can see. That wont work. :(
I recently got hold of a possible way to implement a pause menu without using the keyboard_wait function or cheap window crap, but it may be difficult to implement correctly at this point and one suggestion against this method was to use the instance deactivation commands for everything to achieve the same effect. Proper pause menus are a pain in Game Maker and if I can find a good way to implement one that a person can understand in GMOSSE it will up the value of this engine even more.

And I'm not entirely sure what you're saying is right S20. I can see the logic in it but I couldve sworn I have create events that play out in parent objects and create events that play out on top of that in child objects. It just seemed to have only occurred in this case when passing more stuff towards the parent enemy object. I'll investigate this more in case there's further errors in GMOSSE that I dont know about.
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Wed Feb 09, 2011 9:08 am 


User avatar

Joined: 18 Jan 2010
Posts: 417
Location: Frying over a jungle and saving the nature
BPzeBanshee wrote:
And I'm not entirely sure what you're saying is right S20. I can see the logic in it but I couldve sworn I have create events that play out in parent objects and create events that play out on top of that in child objects. It just seemed to have only occurred in this case when passing more stuff towards the parent enemy object. I'll investigate this more in case there's further errors in GMOSSE that I dont know about.


Here's the entry on Parent and Child objects from the GM8.0 Help file:
Quote:
Often, objects should behave almost identically but there will be some small differences. For example, one monster might move up and down and the other left and right. For the rest they have exactly the same behavior. In this case almost all events should have the same actions but one or two might be different. Again we can make one object the parent of the other. But in this case we also define certain events for the child object. These events "override" the parent events. So whenever an event for the child object contains actions, these are executed instead of the event of the parent. If you also want to execute the parent event you can call the so-called "inherited" event using the appropriate action.


As for instance_deactivate_object(); it actually disables the object instead of destroying it. This means you can reactivate it later if you wish. However, this feature will apparently be taken out soon and replaced with something else, as its current implementation in GM is buggy. I use it to turn off enemy objects when they go a certain distance outside the view instead of destroying them, so I don't trigger their Destroy event actions. But doing this multiple times in a row will actually cause GM to speed up the game's framerate by 100% for some reason (probably memory related), so it's not recommended for every situation.
_________________
--Papilio's Alpha now on itch.io! (development thread)
Xyga wrote:
Blondest eyelashes ever.


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Wed Feb 09, 2011 10:15 am 


User avatar

Joined: 08 Feb 2009
Posts: 4813
S20-TBL wrote:
As for instance_deactivate_object(); it actually disables the object instead of destroying it. This means you can reactivate it later if you wish. However, this feature will apparently be taken out soon and replaced with something else, as its current implementation in GM is buggy. I use it to turn off enemy objects when they go a certain distance outside the view instead of destroying them, so I don't trigger their Destroy event actions. But doing this multiple times in a row will actually cause GM to speed up the game's framerate by 100% for some reason (probably memory related), so it's not recommended for every situation.

EDIT: instance_count(BPmustbesmokingweirdstuff) = 2;

And yes, as I suspected "Ono, I missed something" regarding GM's guide to parent objects. Now you know how I learn to use this thing - trial and error.

The instance stuff works, just gotta use it right and create a screenshot to get background (I believe Yoyogames has this listed as method #3 for pause menus). It's also how Hello Engine 4 does it from what I can tell, but the way the stuff's laid out in HE4 was a little bit confusing for me right now so I'll just code the rest of the needed requirements for a pause menu.
This also means that if GM9 comes out and it does indeed get replaced with something else GMOSSE will then be incompatible. I'll update if necessary to figure something out if and when that happens. Hopefully there'll be a far better replacement, I'm sure the current dev team for Game Maker know what the function's used for and will make such a function replacement.
Anyhow, expect a pause menu in GMOSSE MK-III. I've gotten annoyed too many times now (twice) by interruptions during playing and really I was going to get around to making one but now this takes more priority.
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Last edited by BPzeBanshee on Wed Feb 09, 2011 11:13 am, edited 1 time in total.

Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Wed Feb 09, 2011 11:09 am 


User avatar

Joined: 11 Feb 2009
Posts: 912
Location: Southeast USA
I personally use the keyboard_wait for pausing the game; but yeah, it can be quite fidgety. Even having specific instructions to unpause with any of the usable keys (aside from the arrows/movement buttons), half the time it will only respond to the pause button itself.
(not ruling out that my code might just be ****y though.)

I remember the fun I had just getting it to display PAUSE with that method... oh boy.
_________________
Fire Arrow Plus is out on Steam!
Itch.io page - Gamedev blog


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Wed Feb 09, 2011 11:25 am 


User avatar

Joined: 08 Feb 2009
Posts: 4813
Rozyrg wrote:
I personally use the keyboard_wait for pausing the game; but yeah, it can be quite fidgety. Even having specific instructions to unpause with any of the usable keys (aside from the arrows/movement buttons), half the time it will only respond to the pause button itself.
(not ruling out that my code might just be ****y though.)

I remember the fun I had just getting it to display PAUSE with that method... oh boy.

I used keyboard_wait and some other dirty stuff for my original school project that got my foot in GML to begin with, based on Mark Overmar's Space Cleaner example. Not very customisable though otherwise I would use it here too.
Basically what I have now with the deactivating method it pauses and unpauses using the Space Bar (doing a quick codeup with a obj_pausecontroller and some variable handling). It works, currently music is not stopped though that should be trivial with GMFMODSimple commands and the background continues to scroll, while all objects including framerate display disappear.
Really the hard stuff of actually making things paused is now overcome, just gotta make adjustments to stop/pause the right stuff and make it look nice.
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Top
 Offline Profile  
 
 Post subject: Re: G.M.O.S.S.E - A shmup template attempt in Game Maker
PostPosted: Fri Feb 11, 2011 12:29 pm 


User avatar

Joined: 08 Feb 2009
Posts: 4813
God damn this stuff was harder than I expected. It doesn't help being down with the flu. :cry:

I've got INI file support in, that's all good. Got an options menu to go with it too.
I've got pause menu in,
BUT
1) When using TATE mode the background from screen trick buggers up and displays incorrectly in-game while paused. Ive just spent something like 5 hours figuring out what the hell I was doing wrong and tried everything and couldnt figure this one out. Probably related to that screenshot display problem too.
2) Holding SHIFT to slow down, then pausing and resuming while holding SHIFT will result in the player ship constantly making afterimages but not slowing down. io_clear() does not fix this. :S
3) Not really related to the menu but it seems I'm racking up my sound limits with FMOD because some sounds arent playing when too much sounds are on the screen (mainly Invader's shots against boss while doing a circleattack or something). It was cutting the music off too, but I reorganised things so that the pause menu can pause all sounds and music and sounds are prioritised better now.

Besides that I'm ready to make a release probably tomorrow if storms dont show up and ruin my afternoon again. The Space Invader's bomb is implemented but I think it needs more sound effects to go with the aliens. Might be OP but who cares, it's a SPACE INVADER so it can! :D
_________________
Projects: G.M.O.S.S.E / Warbird A13:02 / Zenohell / XII STAG Hi-Score Thread


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 314 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Space Pilot 3K template by Jakob Persson
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group