Video Game Sprite Sheets

  • Creating a sprite sheet for various types of games from board games to video games with different genre such as adventure, fighting games, arcade, educational games, puzzles, console, sports and more would obviously take time as it is not easy to do and so utilizing pre-made game sprite sheets is very helpful and time saving.
  • High quality game assets including audio clips and game sprites. Thousands of 2d game assets one style. 2d game assets Discord About License. Welcome visitor.
  • Craftpix offers high-quality 2D game assets for your project. Here you will find game icons, sprites, tilesets, gui, characters and more. All graphics are at a very affordable price. There is also a section with free game assets.
Video game sprite sheets

Platformer With Sprite Sheets

Sheet

Example code for this example can be downloaded here: spritesheet_example.zip

A quick video of our final program is below, and at the bottom of the page is a video explanation of the program.

Find game assets tagged gui like Assets: Free UI KIT #4 Icons, Bars, Buttons, PS4 Controller Buttons FREE, Assets: FREE UI KIT #2, PX UI - Basic, Assets: Free UI KIT #3 Windows, Icons, Panels, Buttons on itch.io, the indie game hosting marketplace.

This example shows a platformer game using sprite sheets. A good 2D game can involve a lot of graphics. Rather than create and manage a file for each image, games will use a large image made up of several smaller images. For example, this sprite sheet has multiple frames of a player character walking all in one image:

The sprite sheet was downloaded from the ``Platformer Art Deluxe' package at OpenGameArt.org and was created by author Kenney. Here is another sprite sheet that our game uses to build the world:

In addition, I've created a couple backdrops for my game. You can't interact with the backdrops, but I think it is more interesting to have a backdrop than just have a solid color. The backdrop was created using the Tiled Map Editor and Kenney's Buildings sprite sheet.

This is the backdrop for Level 2.

Finally, the code! This code builds off the other platformer examples on this website. I've divided the code up into several files to make it easier to navigate.

The first file just has some variables that represent constant values. It makes the code easier to read by using variables like WHITE and allows me to change the screen size easily.

This class pulls smaller images out of the large sprite sheet. Create an instance of the class and pass in the file name as a parameter to the constructor. Then call getImage with the x, y location of the upper left corner of yorur sprite along with its height and width. You can use a drawing program to get the location of the sprite images you are intersted in.

What Is A Sprite

This next file defines platforms we can jump on or run into. At the beginning of the file we create lists for each image we want to use. The lists contain the x, y location of the sprite, along with the width and height. Next is the Platform class that defines a non-moving platform. There isn't much to it. The class passes along the image x, y, width, and height and uses the SpriteSheet class to grab the image.

If you want moving sprites, the next class MovingPlatform adds functionality to its parent class Platform. The class keeps track of its boundaries that it stays in, along with the velocity. The update is complex because a moving platform can 'bump' the user and move him/her. It also needs to keep track of how far the world has scrolled to the left or right.

This file defines each level in the game. There is a parent Level class that all levels should inherit from. Things that all levels have (like a list of platforms) are defined in this parent Level class. After that there is a class for each level.

The player class. This class could be simple, but we will make this player have an animation as he/she moves left and right.

Game Sprite Resource

This is the main program to run:

Copyright © 2017
English version by Paul Vincent Craven
Spanish version by Antonio Rodríguez Verdugo
Russian version by Vladimir Slav
Turkish version by Güray Yildirim
Portuguese version by Armando Marques Sobrinho and Tati Carvalho
Dutch version by Frank Waegeman
Hungarian version by Nagy Attila
Finnish version by Jouko Järvenpää
French version by Franco Rossi
Korean version by Kim Zeung-Il
Chinese version by Kai Lin

Sprite Sheets Maker