How to set up Z88DK to develop C programs for the ZX Spectrum Next in about 20 minutes. This video aims to show how straight forward setting up a modern, easy to use development environment for the ZX Spectrum Next can be.
Let’s look at how to make an 8bit computer produce graphics normally seen on an Amiga. The Spectrum Next contains extra hardware that lets us very accurately control when things happen relative to the screen being drawn.
An overview of programming keyboards and joysticks on the ZX Spectrum Next. A video looking at how to use joysticks and keyboards on the Spectrum Next, using C and z88dk.
Spectrum Next Hardware Sprites Overview The Spectrum Next Wiki lists all the information, but the main points are 128 16x16 pixel sprites Mirror, rotation and magnification of sprites Sprites can be grouped together to make larger sprites The sprite images are stored in their own 16k of memory in the FPGA Think of the sprites as 128 slots in the Next that can each have a small 16x16 pixel image attached to it.
To get a sprite on the screen we need to choose one of the hardware sprites and set its attributes. Things like its x,y position, which sprite pattern to use and so on.
Load sprites into the Next is pretty straight forward once you have the images in the required format. Edit sprites and make a sprite sheet It’s best to work out a workflow for creating sprites and editing them, the tutorials always show ready-made pixel data included as a C header file.
https://opengameart.org/content/top-down-arcade-racing-game Looking at the sprite sheet you can see the cars only have three frames. Forwards Turning right Turning left If we tried to make a game with these we could make some sort of endless driving game where the aim is to continually go forwards up the screen avoiding things.
://github.com/ncot-technology/specnext-sprites-example/blob/master/src/scaling.c#L329 16x16 sprites are a nice size on the Next’s screen. Neither too big nor too small. inset example of next sprites - reuse something from earlier
Bigger sprites 16x16 pixel sprites are pretty good, and you should probably make most of your games with them. The screen is only 256x192 pixels in size so a 16x16 pixel sprite looks quite large.