Fangames > Game Design
[UPDATED] Tutorial: Getting Started With Fangame Development
Vitellari:
Thx, you've helped me a lot :atkHappy:
zaphod77:
some tips.
I Wanna Be the Studio Engine YoYoYo Edition uses objPlayer instead of player as the player object.
Making something (like, say, a mini Hachune Miku) chase the player is easy, simply place this is it's step event.
if (instance_exists(objPlayer))
{
direction=point_direction(x,y,objPlayer.x,objPlayer.y);
}
In the create event just set it's speed to whatever you want.
It's possible to modify all of any given object at once on the screen. Examples include launching all of them at the player, making them all fall down, making them freeze and change color, expand outwards from Miku's hand, etc.
You can either use an alarm, or a tick counter in the boss itself to do this. the important trick is the with statement
So say you've spat out a bunch of objCherryBounceRandom. At a certain point in the song, you want them to stop, and launch a second batch and then later make them all fly outwards.
To pause them all, you simply put in you alarm/step event.
with (objCherryBounceRandom)
{
speed=0;
}
Of course if we were to try to make it fly away, it would still bounce. this will not do. so we need to put in a hook in objCherryBounce to allow the bounce to be bypassed.
Open objCherryBounce. Add to the create event
keep_bouncing=true;
originx=x;
originy=y; ///remember where i spawned so we can fly away from there later.
and then change the Step event to.
if (keep_bouncing)
{
move_bounce_solid(0);
}
Now you can turn off the bounce feature of your bouncing cherries when you need to.
we make them fly off away from Miku's hands with
with (objCherryBounceRandom)
{
speed=6; ///or whatever
keep_bouncing=false;
direction=point_direction(originx,originy,x,y);
}
by swapping originx with x and y with origin y, it will go towards the spawn point instead.
You probably want them to change colors too. in this case, simply make a new object, say objCherryBounceRandomColorable with objCherryBounceRandom as a parent using the white cherry sprite with no events. and then when you spawn then you can
a.image_blend = make_color_rgb(100,255,100);
assuming you used
a = instance_create(spawnx,spawny,objCherryBounceRandomColorable);
to spawn it.
and when you stop them, you can also change the color with
with (objCherryBounceRandomColorable)
{
speed=0;
image_blend = make_color_rgb(10,10,10); ///dark grey
}
You can even use with to change all objects of one type into another. Say you have a negi object that goes a random direction of left or right. (what can i say, it's a classic. :) )
with (objCherryBounceRandomColorable)
{
instance_create(x,y,objSidewaysNegi);
instance_destroy();
}
If you need to address different groups of the same object, simple make a child of it with no events.
Coding objSidewaysNegi is left as an exercise to the reader. :)
As we can see, the possibilities are limitless.
klazen108:
Over two years since I made the original tutorial... time sure flies! While the tutorial as I've written it is still pretty useful, a bunch has changed since then, like our recent move to GMStudio! In order to stay with the times, I've overhauled everything. Because there's just so much to tell, I felt that using a separate webpage gives me better control over the whole structure, so I've moved it off the forums onto my website.
Even if you're well versed in the fangame creation process, I invite you to take a look at the new and improved tutorial! There's some sections in there based on common questions I get asked from newbies and professionals alike. If you've got a question that isn't covered but think is something everyone should know, please post a reply and let me know! It's not finished yet, but since all the basics are covered, I'm going ahead and releasing it. There may be some glitches and typos (there's over 110,000 characters in the document, my fingers are tired), so let me know if you find any of those too. Stay tuned for updates, maybe more after Fangame Marathon 2016 is over...
Version 2.0 of the Fangame Development Tutorial can be found here!
Denferok:
Minor complaint, having like 30 words per row makes it a bit hard to read, would recommend giving the website a width of like 60% and the margin: auto of course. Other than that, thanks for your great help!
klazen108:
Thanks for the suggestion! I'm practicing my web design skills and wanted the page to look nice on mobile, so I was avoiding a set width. I've changed the layout to have a max width of 1024px, so it should still take up all the space on a small screen, while not expanding so much you have to turn your head on a large screen. Hope that helps!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version