[phpBB Debug] PHP Warning: in file [ROOT]/viewtopic.php on line 1582: number_format() expects parameter 1 to be double, string given
Tutorial Fighter (updated 9/15/10) - Scirra Forums

Tutorial Fighter (updated 9/15/10)

Post your own tutorials, guides and demos.

Post » Sat Sep 11, 2010 10:38 pm

It's basically the same as UberLou's with a timestamp.

I'll try and do a timestamped example.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Sep 16, 2010 2:43 am

[size=150:21p6rmdr]PART 2: CONTROLLING THE PLAYER[/size:21p6rmdr]
Download tutorial file

Changes from Part 1
[list=1:21p6rmdr]
[*:21p6rmdr]Scaled collision box to better represent the player[/*:m:21p6rmdr]
[*:21p6rmdr]Added enemy sprite to "character" event sheet[/*:m:21p6rmdr]
[*:21p6rmdr]Press 1 to spawn a new enemy[/*:m:21p6rmdr]
[*:21p6rmdr]Organization, made folders for each character[/*:m:21p6rmdr]
[*:21p6rmdr]Moved the code to hide "solids" layer into the "system" event sheet[/*:m:21p6rmdr][/list:o:21p6rmdr]

New Player Variables:
[list=1:21p6rmdr]
[*:21p6rmdr]hbSpawner: used to spawn a hit box when it reaches a certain time[/*:m:21p6rmdr][/list:o:21p6rmdr]

Global Variables:
[list=1:21p6rmdr]
[*:21p6rmdr]hitPause: used for the hit pause effect when you successfully attack an enemy[/*:m:21p6rmdr][/list:o:21p6rmdr]

Layouts and Event Sheets
[list=1:21p6rmdr]
[*:21p6rmdr] FXnStuff Layout: For...effects...and stuff[/*:m:21p6rmdr]
[*:21p6rmdr] Enemy01 Event Sheet: This event sheet contains all of the enemy code[/*:m:21p6rmdr]
[*:21p6rmdr] System Event Sheet: This sheet is for global game systems. Stuff like controlling particle effects, hitpause, camera shake, debug, etc. [/*:m:21p6rmdr][/list:o:21p6rmdr]

Hit Boxes
When you press an attack button, you spawn a hit box. This is the thing that collides with the enemy's mask or collision box to register a hit. Hit boxes store attack data like damage (how much to subtract from enemy health) or force (how much x and y translation). When the hit box collides with the enemy, the hit box is destroyed to prevent hitting multiple times. If you want multiple hits just keep spawning hit boxes like in the punch3 code of the "player" event sheet (Line 41 and 42). The "dir" variable shows its usefulness here as I can use it to scale the hit box width in the negative direction if the player is facing left. Variable "hbSpawner" is used under the animation controls section to create the hit box. I don't usually like to put anything but animation specific code under here, but I made an exception for the hit box code. It just fit neatly in there.

Hit Pause
Hit pause is something most action games use to make attacks feel powerful. When an attack connects, there is a short pause in the game to freeze frame the action. The heavier the attack, the longer the pause. It also offers the player a split second to think about what they want to do next. Try longer hit pause timings for a more dramatic effect.

Hit Effects
I like to make my own particle effect systems in Construct for VRAM optimization and greater control. It's more optimized for VRAM because you can use one sprite for different systems. You also get more control because each particle is an object. All code for the particle effect is in the "system" event sheet.

Again, if there are any questions or something needs to be explained more clearly please let me know and I'll update the post.
B
77
S
49
G
25
Posts: 346
Reputation: 17,409

Post » Thu Sep 16, 2010 6:34 am

[quote="UberLou":rj4gu4sz][color=#FF0000:rj4gu4sz][size=200:rj4gu4sz]TUTORIAL FIGHTER![/size:rj4gu4sz][/color:rj4gu4sz]

[size=150:rj4gu4sz]INTRO[/size:rj4gu4sz]
Tutorial Fighter will be a series of tutorials aimed at moderate to intermediate level Construct users showing how to make an action game. I'm expecting each part of the tutorial to be continuously evolving. I will explain what I think is necessary, but if there are questions or I missed something, I'll make sure to add them into the main post or into the comments of the cap file. If you have any suggestions on how to make these tutorials any better, let me know. Help me help you!
I am not a programmer and I don't claim this as the definitive way to make an action game in Construct. If anyone has any suggestions for better coding, I am open to them. I am also not a game designer. If I've incorrectly explained any concepts or someone can define them more clearly, feel free to correct me and I'll update my post.
Also, please excuse my crappy graphics, I plan to polish them as I go. OK, enough disclaimers, here we go! :)

[list=1:rj4gu4sz]
[*:rj4gu4sz]PART 1: CONTROLLING THE PLAYER
Covers player control and attacks.[/*:m:rj4gu4sz]
[*:rj4gu4sz]PART 2: HITTING THINGS
Adding in hit boxes, enemy hit reacts, hit pause, hit effects etc.[/*:m:rj4gu4sz]
[*:rj4gu4sz]PART 3: MORE PLAYER MOVEMENT
Adding more actions for the player: running, running attacks, blocking, dodges[/*:m:rj4gu4sz]
[*:rj4gu4sz]PART 4: SPECIAL MOVES
inkBot created a nice example of how to do special moves based on discussions on page 3. I haven't gotten to implementing a special move system yet, but check it out if you're interested.[/*:m:rj4gu4sz][/list:o:rj4gu4sz]

Enjoy!
-Lou[/quote:rj4gu4sz]

I am an game desginer + i can do graphical art aswell, & i simple love this way of style of fighting, we should make this game as an team :)
B
2
S
1
Reputation: 400

Post » Sat Sep 25, 2010 10:37 pm

nice update.
B
21
S
4
G
4
Posts: 280
Reputation: 2,934

Post » Thu Oct 18, 2012 12:09 pm

hey how can i open it? is it cuz i have a new version.
where can i get the new version??

thanks!
B
4
Posts: 15
Reputation: 355

Post » Thu Oct 18, 2012 4:56 pm

You can open it with Construct 1. Sorry, I'm not really supporting this anymore since I've moved onto Construct 2. The concepts are exactly the same though so you should be able to rebuild it in 2.
B
77
S
49
G
25
Posts: 346
Reputation: 17,409

Post » Wed Oct 31, 2012 4:12 am

can I not open .cap files with the free version of construct 2?
Are there any other sources on how to do fighting games? I'm trying to soak in all the knowledge I can
B
32
S
4
Posts: 406
Reputation: 3,221

Post » Thu Nov 08, 2012 3:02 pm

Construct 2 uses .capx files, this tutorial is for Construct Classic, which is open source.
B
8
Posts: 6
Reputation: 456

Post » Thu Nov 28, 2013 6:24 pm

Seems to be a good tutorial but all the links are broken
B
5
S
1
Posts: 29
Reputation: 433

Post » Thu Sep 10, 2015 8:13 am

Someone have saved these cap files ? , because i have send a mail to Uberlou and he say me that he don't have the files anymore.
B
2
S
1
Posts: 6
Reputation: 312

Previous

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest