Sprite pushed out on creation - REWARD offered!

Get help using Construct 2

Post » Tue Sep 11, 2012 12:07 pm

I'm working on a top down shooter but when the player sprite overlaps a solid object such as a wall and fires, the bullets spawned are pushed out of the solid. Is there any way to avoid this? I've tried setting position after spawning and various other things, but no joy.

I'd assumed that this was a feature of Construct, but it doesn't seem to happen for enemy bullets so now I'm not so sure.

There's a link to the game at the moment below
here

ASDW for movement and right-arrow is fire at the moment. When you try it you'll see as you near a wall the bullets spawn far away from the weapon.

Any help would be gratefully received as I'm desperate! In fact, whoever gives me a solution can have a special character in the finished game ;)
B
14
S
2
G
6
Posts: 52
Reputation: 3,633

Post » Tue Sep 11, 2012 12:12 pm

Are you using any sprite detector to move around?
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Sep 11, 2012 12:19 pm

There's the player collision, with the sprite pinned to it, then there's also a detector whose position depends on the direction of movement - it's there for detecting "cover" walls (holding up near them takes cover, then down again to exit).
B
14
S
2
G
6
Posts: 52
Reputation: 3,633

Post » Tue Sep 11, 2012 2:04 pm

Fixed the damn thing! Seemingly the sprite object was corrupted somehow, it sometimes wouldn't let me duplicate frames and such so I should've considered this sooner. Created a new sprite, imported the old images in and it's all fine! Phew, relief.

@shinkan Seeing as you're the only one attempting to help I'll still honour that reward if you fancy it ;)
B
14
S
2
G
6
Posts: 52
Reputation: 3,633

Post » Tue Sep 11, 2012 2:14 pm

haha, should I be scared? ;P
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Sep 11, 2012 2:37 pm

Haha no no, I was just willing to put a special character in the game for whoever solved the problem! Oddly there were some weird Z order issues with the old sprite which seem to be sorted now too, glad the whole ordeal's done with and I can continue with it.

Oh also, if you tried it I'd love some feedback.
B
14
S
2
G
6
Posts: 52
Reputation: 3,633

Post » Tue Sep 11, 2012 2:45 pm

Loading/start/option screen is awesome. And I like your pixel style.
Gameplay... well I wait for some improvements ;)
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Wed Sep 12, 2012 12:17 pm

Thanks! Yeah, I've barely started adding all the gameplay mechanics, just got the basics down.
B
14
S
2
G
6
Posts: 52
Reputation: 3,633

Post » Wed Sep 12, 2012 1:24 pm

Looks great so far. I love the title screen and the pixel art. Well done!

Issues:
1. Enemies are lined up. You kill one and you find out down the road you killed several more. If you move up and down and spray your weapon, you can kill all the enemies in the level without advancing. An easy fix is to make it where the bullet doesn't travel past the view of the screen.
2. Player gets stuck ducking against a wall. At fist, I thought the player automatically ducts when shot at. I thought that was cool, but it only happens if you next to a wall. I'm not sure if there is a key to press to let go, but I just press 's' (down) multiple times until he moves away from it. It's troublesome.
3. Sprite overlap issues on level 3. Player flickers when against the wall.
4. There's other things like chopper not attacking, first aid kit not healing and so on, but I understand the game isn't finished.

Other than that, I love the retro feel of the game. I like the celebration the enemies do after they kill you. It makes me want to play again and get him back. It also makes me play harder because I don't want them to celebrate my defeat. Maybe add random celebrations, like having them point and laugh at you? I also like the rain effect on level three.

So far so good. I hope you post a link when it's complete!

B
5
Posts: 25
Reputation: 375

Post » Thu Sep 13, 2012 4:16 pm

Thanks for the feedback, I really appreciate it :D

1. Not intentional in the original design, as such bullets now only live just beyond the screen, mostly avoids this. Also, the range at which enemies become active needs tweaking.
2. Known bug, currently the detector will move to the left or right if you press those keys while in cover, and pressing down while the detector is over cover is what leaves it - so the detector being moved messes this up! As such if you find you can't exit cover pressing up to place the detector over cover and then down again fixes it.
3. Fixed! The sprite animation data was corrupted causing the bullet spawn issues and the Z-ordering.

Haha I'm pleased you like the celebrations - it was a silly idea I had but one that turned out quite charming :D I like the idea of different celebrations though, I may look into that. Maybe different celebrations for different enemy types!
B
14
S
2
G
6
Posts: 52
Reputation: 3,633

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests