cat-game-test

command module
v0.0.0-...-8c0ccb7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2020 License: GPL-3.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

cat-game-test

This is just an experiment to practice Go deeper. It uses the Pixel library ( https://github.com/faiface/pixel ).

Work in progress! so some parts of the code might be really ugly.

2020-01-21

Code refactor

Added tiles drawing and a map loader (maps generated with Tiled (https://www.mapeditor.org/)

bug: FPS drop after drawing tiles, need to use batch drawing

2020-01-20

Added a better loader of sprites (also using a CSV file).

Added some basic behaviour when pressing keys, an extremely simple physics struct, and movement.

2020-01-16

I separated the code into two packages, one for the main and another to handle the loading of the sprites from the .png files. Right now, the program is loading a spritesheet with one action ("Walk"), then it shows on screen the animation (animation is only 10 frames, but FPS is way higher, so you see the effect of a "extremely fast cat running". I will work on that next.

Resources

All sprites are from:

https://www.gameart2d.com

SDL C++ tutorial (good for theory):

http://lazyfoo.net/tutorials/SDL/i

Article about scrolling and cameras in 2d game:

https://www.gamasutra.com/blogs/ItayKeren/20150511/243083/Scroll_Back_The_Theory_and_P%20ractice_of_Cameras_in_SideScrollers.php

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址