How do I make a proper action platformer?

Get help using Construct 2

Post » Mon Jul 28, 2014 10:16 pm

sprite is within angle - sprite set mirrored..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Jul 30, 2014 9:53 am

Don't know how to get that to work; a little more detailed please?
Also, how would I add a pickuppable gun/a menu where you can select the gun you want before the game?
B
4
Posts: 15
Reputation: 210

Post » Wed Jul 30, 2014 10:20 am

For the mirrored sprite upon hitting an angle, this ought to work:
Image

For the pickupable gun and the menu, those are two separate things :)

One approach just to get the simple pickup/gun fire working might be to:
  1. Create a Global Variable 'PlayerHasGun1' or something similarly named
  2. When Player collides with the gun sprite in the game, set this Global Variable to true
  3. Destroy the gun sprite they collided with
  4. Spawn a new gun sprite at a particular Image Point attached to your player sprite so that it moves around with the player
  5. Make an event which says something like "if 'PlayerHasGun1' = true, when player presses (fire key), spawn bullet with acceleration 50 at image point 2 on the gun sprite
  6. (Note: you also need to create separate events to check for any bullet collisions with enemies, and if collision is detected, destroy them)

If you are going to have several types of guns, it may be worth having an array instead. Then you can look up certain positions in the array in order to see whether or not the player has that gun currently available.

On that note, for the menu and gun selection, I would...
  1. Create a global variable 'CurrentlySelectedGun' or something similar
  2. Create a new layout before your game just for the gun selection.
  3. Set up your sprites with an 'active' animation (gun available) and an 'inactive' animation (gun not available)
  4. On the start of the layout, have the game check your gun array/global variables to see which guns the player has
  5. Then you can set the sprite animation to either the 'active'/'inactive' animation dependent on which they have unlocked.
  6. You can also then disable those sprites as clickable or not clickable (enabled/disabled) according to whether they've unlocked them
  7. Then once a player clicks on a particular gun, you can set the global variable 'CurrentlySelectedGun' to whichever gun they chose and tell it to go to the game layout
  8. At the start of the game layout, have the game check the value of 'CurrentlySelectedGun' and spawn the correct gun at an image point attached to the player according to which they have selected

...It sounds complicated, but actually, working your way through this you'll pick up a lot of the basics you'll need to complete the rest of the game :) if you get stuck I can try to make a quick .capx prototype for you to follow.
B
7
S
1
Posts: 61
Reputation: 588

Post » Wed Jul 30, 2014 2:00 pm

I would suggest you do some step by step tutorials first. They don't take long and will give you a basic understanding of how C2 works. Then think about one little piece of your project, like, how to make a sprite mirror and flip and rotate. THen pick another little piece, and so on.
I have used and learned 3 different game development softs (Game Editor, 001 Engine, and now C2). C2 is very powerfull, the few bugs I encounter are not hard to work around and are quickly fixed, and the design is very slick and well thought out. It is also very versatile. However (and this is not a complaint), it does not handle game-style specific things like equipping weapons/armor, transitioning levels, inventory management, making bullets come out of guns, etc. Those things are all possible, but not done for you. 001Engine for example is a tile RPG engine and does those kinds of tasks for you, but if your game is not the same type as the type 001 is geared for, it feels restrictive very quickly.
I'm telling you all this because I think it will be helpfull to narrow your focus down to figuring out how to do the little basic things first. Once you have those under your belt, the bigger stuff will become much more apparent.
The other thing I would advise is that as your project gets more complex, it is vitally important to keep it organized. Use Groups and Comments like a madman. Make sure that before you close your project for the day, ask yourself "If I don't get back to this for a month, will I be able to pick up where I left off?"
Sorry this doesn't directly answer your questions, but @Mr E Bear 's car analogy is dead on.
B
11
S
4
G
1
Posts: 159
Reputation: 1,803

Post » Wed Jul 30, 2014 8:26 pm

angellondon wrote:For the mirrored sprite upon hitting an angle, this ought to work:
Image

For the pickupable gun and the menu, those are two separate things :)

One approach just to get the simple pickup/gun fire working might be to:
  1. Create a Global Variable 'PlayerHasGun1' or something similarly named
  2. When Player collides with the gun sprite in the game, set this Global Variable to true
  3. Destroy the gun sprite they collided with
  4. Spawn a new gun sprite at a particular Image Point attached to your player sprite so that it moves around with the player
  5. Make an event which says something like "if 'PlayerHasGun1' = true, when player presses (fire key), spawn bullet with acceleration 50 at image point 2 on the gun sprite
  6. (Note: you also need to create separate events to check for any bullet collisions with enemies, and if collision is detected, destroy them)

If you are going to have several types of guns, it may be worth having an array instead. Then you can look up certain positions in the array in order to see whether or not the player has that gun currently available.

On that note, for the menu and gun selection, I would...
  1. Create a global variable 'CurrentlySelectedGun' or something similar
  2. Create a new layout before your game just for the gun selection.
  3. Set up your sprites with an 'active' animation (gun available) and an 'inactive' animation (gun not available)
  4. On the start of the layout, have the game check your gun array/global variables to see which guns the player has
  5. Then you can set the sprite animation to either the 'active'/'inactive' animation dependent on which they have unlocked.
  6. You can also then disable those sprites as clickable or not clickable (enabled/disabled) according to whether they've unlocked them
  7. Then once a player clicks on a particular gun, you can set the global variable 'CurrentlySelectedGun' to whichever gun they chose and tell it to go to the game layout
  8. At the start of the game layout, have the game check the value of 'CurrentlySelectedGun' and spawn the correct gun at an image point attached to the player according to which they have selected

...It sounds complicated, but actually, working your way through this you'll pick up a lot of the basics you'll need to complete the rest of the game :) if you get stuck I can try to make a quick .capx prototype for you to follow.



This is wonderful! However, I still have issues with the silly sprite flipping thing. Perhaps you can have a look?
(This is purely a build to test/create mechanics, the sprites are all ad-libed.)

https://www.mediafire.com/?1coj9jmtk6eoccw
B
4
Posts: 15
Reputation: 210

Post » Thu Jul 31, 2014 2:22 am

There is pretty robust documentation on construct website. There are also multitude of different examples to analyse too. Would encourage you to just go trough them first and learn how the program works.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
92
S
30
G
22
Posts: 1,987
Reputation: 20,178

Post » Thu Jul 31, 2014 4:33 am

megatronx wrote:There is pretty robust documentation on construct website. There are also multitude of different examples to analyse too. Would encourage you to just go trough them first and learn how the program works.


One of the biggest problems no one realises is that because of such robust documentation and such a large flood of information, newbies usually don't know which is the best to follow, or even which works.
B
4
Posts: 15
Reputation: 210

Post » Thu Jul 31, 2014 5:55 am

Updated version with a small test area.

https://www.mediafire.com/?1coj9jmtk6eoccw
B
4
Posts: 15
Reputation: 210

Post » Sat Aug 02, 2014 12:23 am

How do I do the following:

Change movement keys to WSAD.
Change the transition animations when switching layouts?
Make a elevator sort of thingy.
Make dialogue appear on cue?
B
4
Posts: 15
Reputation: 210

Post » Sun Aug 03, 2014 8:34 am

Message: Horizon is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
BOOM! Short preview.. youtube .com/ watch?v=7_JM2Gnd3MU&feature=youtu.be
B
4
Posts: 15
Reputation: 210

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests