A sci-fi simulation game, in which players must design, assemble and test. Gain your reputation by engineering and selling your own spacecraft, testing them to. 2D Sprites - Free and Premium In this section you will find a collection of Free and Premium game character sprite sheets for arcade, platformer, casual, RPG, and many others. If you want to create your own 2D game and you need characters, our assets would suit you.
I am going to make an educated guess based on what I am seeing. I do not know what your bounding boxes sizes are. Your code checking for anything to the right of the object is checking a little too far to the left. Your code checking towards the left of your object isn't checking far enough. If your objects speed is 7 and you are only checking 6 pixels to the left of the object, then you can end up inside the wall, which will allow your code checking to the right to detect a wall.
If you are checking for only certain points and not bounding boxes, then it is possible you are simply passing the object without detecting it, depending on the walls width. I would use collisionrectangle for this sort of thing. Also I would learn the basics of encapsulation and seperation of concerns. By putting your code into separate functions you make it a lot easier to debug and to read.
. Community ▼.
Resources ▼. Other ▼. is software designed to make developing games easy and fun. It features a unique 'Drag-and-Drop' system which allows non-programmers to make simple games. Additionally, experienced coders can take advantage of its built in scripting language, 'GML' to design and create fully-featured, professional grade games. Content that does not follow the is subject to deletion, so please become familiar with them.
I'm making a top-down spaceship tactics game, and I'm struggling with a basic movement issue. I've got the ship accelerating and turning.
On a right-arrow button press, I'm using 'Transform the Sprite' to rotate it by a set amount, then 'Set the speed and direction of motion' to direction: imageangle and speed: objPlayerShip.speed This works great moving forwards - but when the ship is in 'reverse' and it turns, its speed reverses direction and it's suddenly moving forward. I've tried a few strategies - 'If' checks to see if ship's speed is positive, checks to see if the direction of motion is the same as the angle of the sprite.no luck. Is the speed of an object relative to its angle? I would expect the ship moving backwards to have a negative speed value - but it seems like this is not the case.
Any help is much appreciated.