New answers tagged

0

A background really isn't anything but an image that you draw before anything else. The easiest way to do that is to import the image using image.load() and save it to the variable background. After doing that create a new variable background_y that saves the position of where the background is. After that, go to your update function and decrement ...


-1

There are plenty of trade offs to make in selecting a language. For example, C++ is known for being much faster and more efficient than a language like Python. However, it can also be more complex and difficult to build. If you are brand new to making games, I would recommend using Unity and programming in C#. Unity also offers some good native tools and ...


0

Note, I haven't done much work with animations in Unity from Blender. I believe (in Blender), you create a new animation by going to the Dope Sheet, and then to the Action Editor. This should allow you to create new actions. You can then create more animations (make sure to press the F button so that Blender saves the animation even if nothing is ...


0

I wrote this in C#, but It has the same idea, and can be taken as pseudo code. Because in pong you're only dealing with rectangles and not polygons, it makes collision detection and response fairly easy. In C#, the .NET 4.5 framework already has a method at allows you to check if a rectangle is intersecting (touching) another rectangle. (Keep in mind that ...


1

The idea behind infinitely scrolling backgrounds is pretty simple. You simply draw the background enough many times to fill the screen, and once a piece of the background moves off screen, you loop the rendering and start back from the beginning. So, the basic functionality would go as follows: (pseudo code, should be easily adaptable to PyGame) piece = ...


0

For a 2d game , you should use other instruments to animate the character like Spriter pro , however you can put all the "steps" of the animation in one file and then export it in PNG , then in Unity you can use the "Sprite Editor" to cut the image and make various pieces . This is the documentation of the Sprite Editor : https://docs.unity3d.com/Manual/...


0

I can't off code itself but i can offer the theory behind it with some pseudo code First of all some theory: Screens have a resolution this is mesured in pixels so for example, 1920*1080 on a screen of 10 inches, this is more pixels per inch so 20 pixels on this screen would take up less space then 20 pixels on a 40inch screen, because of this some math ...



Top 50 recent answers are included