robots-4
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| robots-4 [2023/10/06 02:22] – created appledog | robots-4 [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | = Robots Part 4 | ||
| - | * This isn't really a ' | ||
| - | * Our goal is to import and use a sprite sheet. | ||
| - | * We will need to make a SpriteSheet class. | ||
| - | * We will need to make a Sprite class. | ||
| - | * ALL objects will be drawn by blitting the sprite. The sprite class will pull the correct image for animation. | ||
| - | == General Overview | ||
| - | === Class SpriteSheet | ||
| - | This class will be created with the name of an image file and the dimensions of the sprites inside. It will then go through and categorize sprites by number. Rows are flattened into one row by attaching subsequent rows to the first row. The SpriteSheet will then contain an array of images, the index to which is the sprite number. That is all the SpriteSheet has to do; to be able to return a cut (cropped-in) image based on a number. | ||
| - | |||
| - | === Class Sprite | ||
| - | A Sprite will have an array of images. It's purpose is merely to hold and manage the images for animation. The sprite class will return the correct image because it is given an index number for the array of images. Therefore ' | ||
| - | |||
| - | === Thing Classes | ||
| - | As mentioned above, we now need a ' | ||
| - | |||
| - | In fact it may be possible to 'not use' a map at all, if everything is kept in arrays. The only trouble with that is that without a game map, proximity checks (such as while moving) become difficult. | ||
| - | |||
| - | The solution to this is to create a ' | ||
robots-4.1696558977.txt.gz · Last modified: by appledog
