蓝猫淘气

Snake game based on GD32E231

 
Overview

It took 2 weekends and finally the debugging was completed. This is the first time I have tried to write a small game on a microcontroller. The effect is okay, but the screen I am using is a bit too small. It hurts my eyes and makes it difficult to play.
This work mainly completes the Snake mini-game, which is similar to the ones previously played on non-smart phones. The main function is to adjust the speed and control the Snake to eat as many small foods as possible. After reset, the EEWorld picture will be displayed first, then the GigaDevice icon, and finally my own logo. Then it’s time to enter the game. The main interface of the game provides two options: starting the game and speed adjustment. In the speed adjustment, there are nine speeds from 1 to 9 to choose from. The larger the number, the greater the speed. The entire work is designed with only three buttons (one KEY1 on the GD32E231 board and two KEY2 and KEY3 on my stm32 board). In the game, KEY1 can be used to pause the game, and KEY2 and KEY3 are used to control the greedy snake. direction, KEY2 controls the snake to rotate clockwise, and KEY3 controls the snake to rotate in the forward direction.

参考设计图片
×

Blockdiagram

 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-08 00:59:25

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号