Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - LS15

Pages: 1 2
1
Ask a Question / How to make moving and bouncing enemies?
« on: February 11, 2013, 10:51:15 pm »
Hi, I'd like to make my enemies for my platformer jump and move forward at the same time, but haven't had much luck so far in getting the coding to work. To give some idea of what I mean, think of the jumping Paratroopers from Super Mario Bros with the wings on them. The enemy I'm going for here is much like that, but for some reason I can't seem to get the enemy to both move forward and jump without it rocketing up into the air.

Any pointers on how I can get started coding it? I feel like what I have is not even close to right and I should just start on a better note, so I'd appreciate any ideas. Thanks!

2
Resolved Questions / Re: Using Regions to Activate an Enemy?
« on: January 23, 2013, 10:38:28 pm »
Yes! It's finally working! Thank you Tuo and Ozygiygas for your help. Just for the benefit of anyone else who may be curious how to make it work, I'll post the final code which worked for me.  8)


3
Resolved Questions / Re: Using Regions to Activate an Enemy?
« on: January 22, 2013, 08:19:13 pm »
Your code is for "enters", so it only activates upon entry, not any time while inside the region. To do that, you have to use the scene palette actor loop "for each actor inside region" and tell it to see if the actor is Leon (probably via actor type comparison), and if so, do the coding.

Gave it a shot, but no luck so far. I'm sure I did it wrong, but to be honest I'm not sure why it won't work. I mean for each actor inside the region, if my player is within the region, the effects should take place, but nothing happens when I enter the region with the code below:

4
Resolved Questions / Re: Using Regions to Activate an Enemy?
« on: January 22, 2013, 07:33:47 pm »
Quote from: Tuo
How are you getting the "Leon Target"? Also, are you keeping on moving the region to self?

In the event for my main character, I simply set that as the attriubte for him. I was hoping it would make things easier but it doesn't seem to work. Also, I made sure it was moving and got that to work thanks to Ozy's and your advice below...

Quote
As a quick follow-up to Ozy's comment, for the creation and movement, if you want the region centered around the player, the fastest way to do it is to use:
create region at x: [x-center of self - (half of the width of the region)], y: [y-center of self - (half of the height of the region)]

Use the same idea for the movement coding. Then you don't have to play with the numbers

Upon turning on debug drawing, from what I see, your idea worked very well, thank you!

Quote from: Ozygiygas
First things first, you're going to want to enable debug drawing whenever your code involves regions, as it makes them visible (saving you a lot of irritation and heartache when debugging).

That is very helpful, thanks! Now I can see the movement of the region, so I know what's going on and am not completely in the dark.

Quote
Your region box is waaaaay too big. When I punched in your specifications it reached far around and below the enemy into the abyss. Try and position it so the actor stands at the very center of the region. You'll have to play around with the numbers a bit, but for me the optimal height and width was 30 and 150, respectively (a side note, I was using the default Prolonger sprite when programming this so yours will likely require a different size). Try and think in terms of x-position and actor width because the origin of the region is often contrary to what you'd expect

If we assume that your enemies will be moving (which they probably are), another problem that occurred with your code is that the regions don't follow the actors - they stay fixed at the exact point you created them. Needless to say, you don't want this. You can add an "Always" event that constantly realigns the region with its actor using the "make region follow" block.

I've fixed this recently, and everything is in working order except for one problem. Once the enemy has gone past the player (Within the region), it continues to move, even though it should be changing direction in response to the player being on the opposite side of him. It only changes direction when I leave the region and then return...

I figure this is because the event I'm using to trigger this is not constantly being updated? I'm using the "Enters region" event to trigger the movement instead because when I use "Updated", the game stops working and the flash player freezes. I'm guessing this is because always checking for the movement inside the region is simply too much... so any ideas guys? The code is very close to being completed, it's just that one little problem that remains.

I appreciate all the help so far, by the way.  :)

Below is the code I now have.

5
Resolved Questions / Using Regions to Activate an Enemy? [Solved]
« on: January 21, 2013, 03:47:07 pm »
It feels like I ask way too many questions, but oh well.  :D

What I'd like to do in my platformer game is have an enemy be activated when the player enters a region that surrounds them. After which they would begin chasing the player. So far I've been unsuccessful, though. It seems like when I create a region through behaviors, they don't like to work... or I'm just doing it wrong.  :P

But either way, I'd rather not have to put them in manually in my scenes since there's going to be plenty of enemies.

Below are the pieces of code I came up with (But don't work). Any ideas how I could get it up and running?



6
Resolved Questions / Re: Key Sensitive Jumping?
« on: January 20, 2013, 09:06:00 pm »
One idea would be to use a number attribute (i.e. Time) to count up instead of the "On Ground". Then, you could do:
if action1 is down
  if Time < 10
    increment time by 1
    if y-speed of self > 0
       set y-speed to 0 for self
    push self sharply towards 270 at [Jump Power / 10] force
if action1 is released
   set time to 10 (in order to stop the player from double-jumping with this)

Then, in the collision with the ground, set time to 0 instead of the text to true.

It worked perfectly. Would've never thought of  Jump Power / 10 honestly... I'm sure it's redundant to point this out, but you really know your stuff. Thanks!

7
Resolved Questions / Key Sensitive Jumping? [Solved]
« on: January 20, 2013, 05:59:42 pm »
Hi, I was wondering if there was a fairly simple way in a platformer to have jumping be sensitive to how long the player holds down the jump button? As in, the longer the button is held down, the higher they go (To a certain point anyway), and if they tap the button, the jump will be lower.

I thought that studying the jump behavior within the platformer movement kit would help me, but I'm unable to understand a lot of the coding for it, so I was hoping there was a simpler way.

Any ideas?

Also, I have attached the code I have so far for convenience. Right now it allows me to jump, but always goes the same height regardless of how long the jump button is pushed. Any help would be appreciated!

8
Game Ideas / Re: Hybrid of Platformers
« on: January 18, 2013, 08:39:52 pm »
Looks pretty cool. On paper, mario and sonic, both good games, why not merge them? Of course, why merge kirby and call of duty o.O You gotta be very careful with how you do this,because you could end up with 1 of 4 results: Copy of mario, copy of sonic, REALLY awful game, good game.

My biggest concerns are two of the things you listed; copying the two games. For this reason I came up with the lives mechanic mentioned above and the office enviroment to really separate it from the two other much different worlds of Mario and Sonic.

But I think dtrungle has a good point about lives and how it may just frustrate people instead of attract them to the game...

 
Quote
Someone did sonic loops i seem to remember, but can't remember who, i suggest asking around a bit, but it has been done (or attempted) which could speed things up

Yeah, I saw a demo for it, although I don't plan on outright making loops for the reason you mentioned above. I don't want it to be a copy of Sonic after all; just inspired. I'll have to think of other ways to include Sonic's style of platforming without the same exact terrain.

Quote
One thing i must add, is ADD SECRETS. The whole allure of the old marios, to me, was the secrets. As a teenager, old games seem pretty outdated, so you're not gonna wanna play em all for their nostalgic qualities or amazing graphics, but i did enjoy finding all the little secrets. It's a good feeling.

I definitely will add many secrets per level. The catch is also that the player will usually need to use their special abilities to reach these secrets, and to do so, they'll have to maintain their speed. I think this is the key to combining those two mechanics. Having a reaosn for them in particular. If you want to reach secrets, then maintain your speed, to put it simply.

Only question is, is that enough to hook people's attention?

9
Game Ideas / Re: Hybrid of Platformers
« on: January 18, 2013, 08:45:26 am »
My thoughts,

Lives is an old game mechanic and it's still used every now and then, it also depends on the game itself. But the reason for not using it is pretty clear, most players do not want to lose and then restart X number of stages. There is simply no enjoyment out of that. However, there are players that enjoy that type of feature but they are the minority.
Instead, they could swap Lives for Health (of even keep Lives) and have the player restart just the level so that there is some drawback to 'dying'.

So moving back a level or two is a bad idea? It's understandable since nobody will want to just play the same levels over and over again, even if they really like it.

Quote
I'm unclear on your game mechanic but I don't see a platform game created in an office setting to work out.  :-\ And add in your Sonic speed and those loops, it would be confusing to comprehend. But, it could be pulled off, who knows.

The game mechanic I had in mind basically boils down to how long the player can keep their speed going. The longer they keep their speed up, the more the game allows you to do in the way of special abilities. Mario did something similar with the Racoon Tail in Super Mario Bros 3. If he ran at full speed for long enough, he was able to fly for a limited amount of time. I'd like to expand on that, while also combining the stylistic choices and physics of the old Sonic games.

As for the office environment not working, would it have to do with how confined it has a tendency to be? Most platformers are outdoors with great big backgrounds for us to see, while an office enviroment would make that hard to pull off. To combat this, I kind of wanted to make an exagerated enviroment out of it that... one that makes no practical sense in the real world.

10
Game Ideas / Hybrid of Platformers
« on: January 17, 2013, 08:18:27 pm »
So for my first full Stencyl made game, I'd like to make a 2D platformer hybrid of two of the most famous of the genre: Mario and Sonic.

What I mean is that I'd like to take the things that made them succesful and combine them into one. In the case of Mario, we can safely say the likeable elements for games such as Super Mario Bros. 3 and Super Mario World were how often the player was rewarded. Tons of secret areas led to lots of exploring, and the controls were always very polished as well. In the case of Sonic, being able to get up to full speed and keep that speed going is a great feeling, you could do so much more in terms of where you moved than any other platformer with the various landscapes traversed (Such as the loops), and it had great style too.

Mainly what I'd like to do is create a fast paced game that rewards the player for keeping their speed up for a certain amount of time by letting them do special moves. The way I picture it is that as the player is moving at max speed, a bar in the HUD begins to fill up, and there'd be three sections of it that are color coded. WHen the first section fills up, the player is able to do the weakest special move, I was thinking something along the lines of a slide which will allow them to access smaller areas and take out certain enemies easily. The second I was thinking could be something like a super jump, which would allow them to reach higher places and find secrets. The final one could be some kind of special attack where all enemies close by are defeated.

Another thing I want to establish with this game would be the danger of losing. I look at lives in games these days and usually I think to myself "What's the point?". The worst that ever seems to happen is that you wait through a ten second loading screen. Most games have ditched lives altogther from what I can tell... but the beauty of making a short flash game is that I may be able to get away with making something of lives without it being too frustrating. My idea is to make it so that the player can pick up tokens throughout the levels, and when the player runs out of lives, whether they can continue with the level they died at or not will depend on the amount of tokens they've collected. Each level will require a certain amount of these tokens, and whatever amount the player has, that's where they'll have to start over again when they retry. This way, a player wouldn't die at say, level 9 and have to start all the way over again if they ran out of lives. They'd have to go back a level or 2, but that's not so bad, and the impending threat of that happening will make for a more intense experience.

On the topic of high-speed as I mentioned earlier, I would also include the standard high score tables which will be based on how fast a player finished the level and how many enemies were killed. I was thinking I could come up with a fun little ranking system for in the game, but we'll have to see about that.

As for the style of the game, I like the idea of it being something corporate related. How often do you see something like a platformer in a corporate setting filled with its exagerated tropes? Could be an interesting experience. The story could simply be that a rage-filled employee wants to kick his boss' ass so he traverses the company until he reaches him.

My biggest concern here is whether or not this makes for a unique enough experience. I can't think of any games that have combined these ideas, but I'm sure they're out there. Another concern is whether combining two rather conflicting games will even work. Does it sound like it'd be fun?


11
Ask a Question / Re: Strange Issue With Platformer Movement Kit?
« on: January 17, 2013, 11:54:14 am »
Mixing kits with your own coding = bad idea. With what you've said, there's not much we can do without seeing the game itself. You can upload it to StencylForge (top menu -> Publish -> StencylForge -> Make Public) and then let us know so someone can look at it directly, but the answer will likely be "screw the kit, delete all behaviors from it, and make them yourself doing blah and blah."

At first I thought that was the problem, but when I created an entirely new game, and selected the Jump and Run Kit rather than a blank game (Which has all the Platformer Movement behaviors applied to an already made scene for me) the problem was still there without me having anything to do with it.

That's why I was a little surprised this didn't come up on my forum search. Of course, I have no problem uploading my own game, I just think this issue may be exclusive to one of the behaviors that comes with Platformer Movement.

12
Ask a Question / Strange Issue With Platformer Movement Kit?
« on: January 17, 2013, 11:29:36 am »
Hello again, I found more problems for myself in record time.  ;D

Using the Platformer Movement Kit, I found a strangely specific issue in that when running to the left, it won't allow me to jump for some reason. When I run to the right, walk to the right, or walk to the left, jumping works just fine.

I figured it may have been a problem with my specific game, or that I was only using a few behaviors from the kit, so I tried the actual game it's based around and chose the kit upon making a new game, but encountered the same issue.

I searched the forums but came across nothing that sounded much like this. Is there any way to fix it? I looked through the coding but couldn't really wrap my head around why it wouldn't work..

13
Resolved Questions / Re: Stuck in Walls
« on: January 17, 2013, 10:14:29 am »
Quote from: Ceric
Hi LS15, I'm a little confused as to why you would need completely different collision shapes when changing animations. Is that essential to gameplay?

Well I don't have different shapes, just different locations of the collisions. The reason is that my running animation takes up more space than, let's say my idle animation for instance, and I want my sprites for the character to all be the same size. The result is that I leave empty space in various sprites of the main character, and that's why when I horizontally flip them, I need to change the location of the more precise collisions, since my sprites has pretty much moved to the other side where the empty space once was. I think it's essential to have more than a box surrounding the character for my game, since the sprites are considerably larger than 32x32 and precision platforming is planned...

Quote from: Tuo
LS, try to add/subtract to the x value when colliding with a side. For example, if the right side was hit (so you are turning left), "set x to [x of self - 5] for self", where the 5 is whatever distance makes the turning around work.

This did the trick, thank you Tuo!  :D


14
Resolved Questions / Stuck in Walls [Solved]
« on: January 15, 2013, 12:08:27 pm »
Hi, I'm having an issue in my platform game animations where if the player turns in the opposite direction of a wall, they'll get stuck inside of it. I actually know the reason it's happening; it's because when I flipped my image horizontally for an animation moving in the opposite direction, it required me to set collision boxes in a different spot for that animation. Eg. Walking right has a collision box in a different spot than walking left. So when I change directions, the actor's collision is moving to an entirely different spot, which means if I'm too close to a wall, I'll get stuck.

I tried to use custom origin points to fix this, so that animations would pivot in the same spot, but for some reason it's not working. No matter where I specify a custom origin point it gets ignored and always pivots at the same spot.

So I was wondering if you guys might have any ways to fix this that you commonly use for your own games? I'm sure this problem is encountered often enough... I'd appreciate any help! Thanks!

15
Old Bugs (1.x/2.x) / Behaviors Not Working?
« on: January 08, 2013, 01:13:49 pm »
For the past couple of days now I think I've been experiencing a bug, but I wasn't sure since I am new after all, so I tested just about everything I could think of before posting here.

Most recently, I created a test file to see if maybe something was up with my old saves, and found that even using only two behaviors, after making any change to my main character's collision box, the behaviors would be ignored.

In this case, the camera won't follow my actor and horizontal 2-way movement isn't working. When debugging I got what you'll see in the second attached file below.

Is this a bug, or am I just doing something wrong?


Pages: 1 2