0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

C语言零基础项目:连连看小游戏!

C语言编程学习基地 来源:C语言编程学习基地 2023-01-04 15:28 次阅读

每天一个C语言小项目,提升你的编程能力!

连连看小游戏是一款 以连连看为主要元素的Flash游戏,只要将相同的两张牌用三根以内的直线连在一起就可以消除,操作方便,绿色,无需安装,简单容易上手。和我们上一期所讲的对对碰游戏有所类似,我们一起来看看吧!

9b91a476-8c00-11ed-bfe3-dac502259ad0.gif

连连看小游戏速度节奏快,画面清晰可爱,适合细心的玩家。丰富的道具和公共模式的加入,增强游戏的竞争性。多样式的地图,使玩家在各个游戏水平都可以寻找到挑战的目标,长期地保持游戏的新鲜感。

效果展示:

9ba7866a-8c00-11ed-bfe3-dac502259ad0.png

操作方法

鼠标操作,将图案相同的两张图片用三根以内的直线连在一起就可以消除。

游戏目标

在有限的时间里,要将图片全部消除,才能步入下一关卡,通过全部关卡获得最终的胜利。

游戏中使用了大量图片、音乐、资源文件【https://codebus.cn/f/a/0/0/161/lianliankan.zip】

本项目编译环境:Visual Studio 2019/2022,EasyX插件

代码展示:

///////////////////////////////////////////////////
// 程序名称:连连看
// 作者:水木淋溪 
// 注:本游戏可以说是网上一个游戏的复制
//   但是是用自己的思想编制的(生成算法有参考)
//   游戏的优点我就不多说了,玩的过的人都知道
//   游戏缺点:音乐、背景选的不好,只有一关,很传统···
//        没有计时,没有提示,没有自动完成···
//   总之是有待完成,不过这些代码是核心
//////////////////////////////////////////////////
#include 
#include 
#include 
#include 
#include 
#pragma comment(lib,"winmm.lib")




//150 150 12 7 21 易
//60  100 16 9 32 中
//100 120 14 8 28 难
#define leftedge 150     //游戏区距左边框距离
#define topedge  150     //游戏区距上边框距离
#define COL    12     //游戏区列数
#define ROW    7      //游戏区行数
#define GridNum   21     //游戏图片数目


#define GridW   42     //游戏图片的长
#define GridH   48     //游戏图片的宽
#define N     555     //开屏大小(宽) 
#define M     785     //开屏大小(长)


IMAGE image[GridNum + 1][2];   //图片库
IMAGE image2;          //填充图片
int  GridID[ROW + 2][COL + 2]; //游戏图纸
MOUSEMSG mouse;         //记录鼠标信息


struct GridInfor    //记入击中图片信息
{
  int idx,idy;    //图纸坐标
  int leftx,lefty;  //屏幕坐标
  int GridID;     //图片类型
}pre,cur,dur;


struct         //记录连线点
{
  int x;
  int y;
}point[4]; 
static int pn;     //记录连线点个数


void InitFace ();                          //初始化界面
void Shuffle ();                          //随即打乱图片
void ShowGrid ();                          //显示图片
void RandGrid ();                          //绘制地图
void Link   ();                          //连接两图
void Des_direct ();                         //直接相消
void Des_one_corner();                       //一折相消
void Des_two_corner();                       //两折相消
void Load_picture ();                        //加载图片
void Init_Grid (GridInfor& pre);                  //初始化格子信息
void Leftbottondown (MOUSEMSG mouse);                //实现鼠标左击效果
void Draw_frame (int leftx,int lefty);                //绘制边框
void Mousemove (int leftx,int lefty);                //实现鼠标移动效果
bool Judg_val (int leftx,int lefty);                //判断鼠标是否在游戏区
void SeleReact (int leftx,int lefty);                //显示选中效果
void TranstoPhycoor (int* idx,int* idy);              //图纸坐标转变为屏幕坐标
void GridPhy_coor (int& leftx,int& lefty);              //规范物理坐标
void iPaint (long x1,long y1,long x2,long y2);           //将直线销毁
void DrawLine (int x1,int y1,int x2,int y2) ;            //用直线连接两图
bool DesGrid (GridInfor pre,GridInfor cur);              //判断两者是否能相消
bool Match_direct (POINT ppre,POINT pcur);              //判断两者是否能够直接相消
bool Match_one_corner (POINT ppre,POINT pcur);            //判断两者是否能一折相消
bool Match_two_corner (POINT ppre,POINT pcur);            //判断两者是否能两折相消
void ExchaVal (GridInfor& pre,GridInfor& cur);            //交换图片信息
bool Single_click_judge (int mousex,int mousey);          //判断单击是否有效  
void RecordInfor (int leftx,int lefty,GridInfor &grid);        //记录选中的信息
void TranstoDracoor (int mousex,int mousey,int *idx,int *idy);    //鼠标坐标转化为图纸坐标
void Explot (POINT point,int *left,int *right,int *top,int *bottel);//探索point点附近的空位置


void main()
{
  initgraph(M,N);
  mciSendString("play game_begin.mp3 repeat", NULL, 0, NULL); 
  InitFace();
  while(1)
  {  
    mouse = GetMouseMsg();  
    switch(mouse.uMsg)
    {
    case WM_MOUSEMOVE:
      Mousemove(mouse.x,mouse.y); break;
    case WM_LBUTTONDOWN:
      if(Single_click_judge(mouse.x,mouse.y))
      {
        Leftbottondown(mouse);
      }                break;
    default:             break;
    }
  }
  closegraph();
}


////////////////////////////////////////生成操作//////////////////////////////
void RandGrid()                    //产生图片的标记
{
  for(int iCount = 0, x = 1; x <= ROW; ++x )
  {
    for( int y = 1; y <= COL; ++y )
    {
      GridID[x][y] = iCount++ % GridNum + 1;
}  }  }


void Shuffle( )                  //打乱棋盘
{
  int ix, iy, jx, jy, grid;
  for( int k = 0; k < 84; ++k )
  {
    ix = rand() % ROW + 1;  // 产生 1 - COL 的随机数
    iy = rand() % COL + 1;  // 产生 1 - ROW 的随机数
    jx = rand() % ROW + 1; // 产生 1 - COL 的随机数
    jy = rand() % COL + 1;  // 产生 1 - ROW 的随机数
    if( GridID[ix][iy] != GridID[jx][jy] ) //如果不相等就交换数据
    {
      grid = GridID[ix][iy];
      GridID[ix][iy] = GridID[jx][jy];
      GridID[jx][jy] = grid;
}  }  }


////////////////////////////////初始化界面///////////////////////////////////////
void InitFace() 
{
  srand((unsigned)time(NULL));
  Load_picture();
  RandGrid();
  IMAGE image3;
  loadimage(&image3,"res\bg.bmp");
  putimage(0,0,&image3);
  getimage(&image2,3 * 42,2 * 48,42, 48);
  Shuffle();
  ShowGrid();  
}


void Load_picture()                  //加载图片
{
  IMAGE image1,background;
  loadimage(&image1,"IMAGE","grids");  
   SetWorkingImage(&image1);
  for(int i = 1 ;i < GridNum + 1 ;i ++)  
    for(int j = 0;j < 2;j++)
      getimage(&image[i][j],j * 42,i * 48,42, 48);
  loadimage(&background,"IMAGE","bg");
  SetWorkingImage(&background);
  getimage(&image2,3 * 42,2 * 48,42, 48);
  SetWorkingImage();
  putimage(0,0,&background);
}


void ShowGrid()
{
  int idx,idy;
  for(int i = 0 ;i < ROW; i ++)
    for(int j = 0 ;j < COL ; j++)
    {
      idy = i * 48 + topedge ,idx = j * 42 + leftedge;
      putimage(idx,idy,&image[GridID[i + 1][j + 1]][0]);      
}    }


/////////////////////////////////鼠标操作////////////////////////////////////////
void Mousemove (int leftx,int lefty)          //鼠标移动时的变化
{
   static int prex,prey,preidx,preidy, curidx,curidy;
  if(Judg_val(leftx,lefty))
  {  
    TranstoDracoor(leftx,lefty,&curidx,&curidy); //转化为图纸坐标
    if(GridID[curidy][curidx] != 0)
    {  
      GridPhy_coor(leftx,lefty);
      if(pre.idx == preidx && pre.idy == preidy)
        putimage(prex,prey,&image[GridID[preidy][preidx]][1]);
      else
        putimage(prex,prey,&image[GridID[preidy][preidx]][0]);
      prex = leftx,     prey = lefty;
      preidx = curidx,  preidy = curidy;
      Draw_frame(leftx,lefty);          //绘制边框  
}  } }  


void Leftbottondown (MOUSEMSG mouse)          //左击时的变化
{
  static int click = 0, idx,idy;
  click++;
  SeleReact (mouse.x,mouse.y);            //显示选中效果 
  if(click == 1)    RecordInfor(mouse.x,mouse.y,pre);
  if(click == 2) 
  {  
    TranstoDracoor (mouse.x,mouse.y,&idx,&idy);
    if(idx != pre.idx || idy != pre.idy)
    {
      RecordInfor (mouse.x,mouse.y,cur);
      if(pre.GridID == cur.GridID &&   DesGrid(pre,cur))
      {
        GridID[pre.idy][pre.idx] = GridID[cur.idy][cur.idx] =0;
        Link ();  pn = 0;
        putimage(pre.leftx,pre.lefty,&image2);
        putimage(cur.leftx,cur.lefty,&image2);
        Init_Grid(pre);  Init_Grid(cur);  click = 0;
      }
      else
      {
        ExchaVal(dur,pre);   ExchaVal(pre,cur);  
        Init_Grid(cur);      click = 1;
        putimage(dur.leftx,dur.lefty,&image[GridID[dur.idy][dur.idx]][0]);
    }  }
    else click = 1;  
}    }


void SeleReact (int leftx,int lefty)              //选中时效果
{  
  if(Judg_val(leftx,lefty))
  {
    int idx,idy;
    TranstoDracoor (leftx,lefty,&idx,&idy);
    GridPhy_coor (leftx,lefty);
    putimage(leftx,lefty,&image[GridID[idy][idx]][1]);
}  }


bool Judg_val(int leftx,int lefty)                //判断鼠标是否在游戏区
{  
  return leftx > leftedge && leftx < leftedge + GridW * COL && 
      lefty > topedge && lefty < topedge + GridH * ROW;
}


void TranstoDracoor (int mousex,int mousey ,int *idx,int *idy) //鼠标坐标转化为图纸坐标
{
  if(Judg_val(mousex,mousey))
  {  
    *idx = (mousex - leftedge) / 42 + 1;
    *idy = (mousey - topedge) / 48 + 1 ;
}  }


void RecordInfor(int leftx,int lefty,GridInfor &grid)      //记录选中的信息
{
  TranstoDracoor(leftx,lefty,&grid.idx,&grid.idy);
  grid.leftx = (grid.idx - 1) * 42 + leftedge;
  grid.lefty = (grid.idy - 1) * 48 + topedge;
  grid.GridID = GridID[grid.idy][grid.idx];
}


bool Single_click_judge (int mousex,int mousey)      //判断单击是否有效
{
  int idx,idy;
  TranstoDracoor (mousex,mousey,&idx,&idy);      //转化为图纸坐标
  if(Judg_val(mouse.x,mouse.y) && GridID[idy][idx] != 0)
    return true;
  return false;
}


void Draw_frame(int leftx,int lefty)        //绘制方框
{
  setcolor(RGB(126,91,68));
  setlinestyle(PS_SOLID,NULL,1);
  rectangle(leftx,lefty,leftx+41,lefty+47);
  rectangle(leftx + 2,lefty + 2,leftx+39,lefty+45);
  setcolor(RGB(250,230,169));
  rectangle(leftx + 1,lefty + 1,leftx+40,lefty+46);  
}


////////////////////////////////判断消除操作/////////////////////////////////////
bool DesGrid (GridInfor pre,GridInfor cur)            //判断两者是否能相消
{
  bool match = false; POINT ppre,pcur; 
  ppre.x = pre.idx; ppre.y = pre.idy; 
  pcur.x = cur.idx; pcur.y = cur.idy;
  if(Match_direct(ppre,pcur)) match = true;  
  else if(Match_one_corner(ppre,pcur)) match = true;
  else if(Match_two_corner(ppre,pcur)) match =true;
  return match;
}


bool Match_direct(POINT ppre,POINT pcur)            //判断两者是否能够直接相消
{
  int k,t;
  if(ppre.x == pcur.x)
  {  
    k = ppre.y > pcur.y ? ppre.y : pcur.y;
    t = ppre.y < pcur.y ? ppre.y : pcur.y;
    if(t + 1 == k) goto FIND;
    for(int i = t + 1;i < k ;i++)
      if(GridID[i][ppre.x] != 0)  return false;
    if(i == k)   goto FIND;
  }
  else 
    if(ppre.y == pcur.y)
    {  
      k = ppre.x > pcur.x ? ppre.x : pcur.x;
      t = ppre.x < pcur.x ? ppre.x : pcur.x;
      if(t + 1 == k) goto FIND;
      for(int i = t + 1;i < k ;i++)
        if(GridID[ppre.y][i] != 0) return false;
      if(i == k)   goto FIND;
    }
    return false;
FIND:  point[pn].x = pcur.x, point[pn].y = pcur.y;  pn++;
    point[pn].x = ppre.x, point[pn].y = ppre.y;  pn++; 
    return true;
}


bool Match_one_corner(POINT ppre,POINT pcur)          //判断两者是否能一折相消
{
  int left,right,top,bottel,x = ppre.x,y = ppre.y;
  Explot(ppre,&left,&right,&top,&bottel);
  ppre.y = top - 1;
RESEARCHX:  if(ppre.y < bottel)    ppre.y++;
      else goto BACK;
      if(Match_direct(ppre,pcur)) goto FIND;
      else goto RESEARCHX;
BACK:    ppre.y = y; ppre.x = left - 1;
RESEARCHY: if(ppre.x < right)     ppre.x++;
      else goto REBACK;
      if(Match_direct(ppre,pcur)) goto FIND;
      else goto RESEARCHY;
REBACK:   pn = 0; return false;
FIND:    point[pn].x = x,point[pn].y = y,pn++;
      return true;
}


bool Match_two_corner(POINT ppre,POINT pcur)          //判断两者是否能两折相消
{
  int left,right,top,bottel,x = ppre.x,y = ppre.y;
  Explot(ppre,&left,&right,&top,&bottel);
  ppre.y = top - 1;
RESEARCHX:  if(ppre.y < bottel)    ppre.y++;
      else goto BACK;
      if(Match_one_corner(ppre,pcur)) goto FIND;
      else goto RESEARCHX;
BACK:    ppre.y = y; ppre.x = left - 1;
RESEARCHY: if(ppre.x < right)     ppre.x++;
      else goto REBACK;
      if(Match_one_corner(ppre,pcur)) goto FIND;
      else goto RESEARCHY;
REBACK:   pn = 0;return false;
FIND:    point[pn].x = x,point[pn].y = y,pn++;
      return true;
}


void Explot(POINT point,int *left,int *right,int *top,int *bottel)
{
  int x = point.x,y = point.y;  x++;
  while(x <= COL + 1 && GridID[y][x] == 0) x++;   *right = x - 1; x = point.x; x--;
  while(x >= 0    && GridID[y][x] == 0) x--;  *left   = x + 1; x = point.x; y++;
  while(y <= ROW + 1 && GridID[y][x] == 0) y++;  *bottel= y - 1; y = point.y; y--;
  while(y >= 0    && GridID[y][x] == 0) y--;  *top  = y + 1; 
}


/////////////////////////////////消除操作////////////////////////////////////////
void Link ()
{
  switch(pn)
  {
  case 2:
    Des_direct();    break;
  case 3:
    Des_one_corner();  break;
  case 4:
    Des_two_corner();  break;
  default : break;
}  }


void Des_direct ()
{
  TranstoPhycoor(&point[0].x,&point[0].y);
  TranstoPhycoor(&point[1].x,&point[1].y);
  DrawLine(point[0].x,point[0].y,point[1].x,point[1].y);
  Sleep(250);
  iPaint(point[0].x,point[0].y,point[1].x,point[1].y);
}


void Des_one_corner()
{
  TranstoPhycoor(&point[0].x,&point[0].y);
  TranstoPhycoor(&point[1].x,&point[1].y);
  TranstoPhycoor(&point[2].x,&point[2].y);
  DrawLine(point[0].x,point[0].y,point[1].x,point[1].y);
  DrawLine(point[1].x,point[1].y,point[2].x,point[2].y);
  Sleep(250);
  iPaint(point[0].x,point[0].y,point[1].x,point[1].y);
  iPaint(point[1].x,point[1].y,point[2].x,point[2].y);
}


void Des_two_corner()
{
  TranstoPhycoor(&point[0].x,&point[0].y);
  TranstoPhycoor(&point[1].x,&point[1].y);
  TranstoPhycoor(&point[2].x,&point[2].y);
  TranstoPhycoor(&point[3].x,&point[3].y);
  DrawLine(point[0].x,point[0].y,point[1].x,point[1].y);
  DrawLine(point[1].x,point[1].y,point[2].x,point[2].y);
  DrawLine(point[2].x,point[2].y,point[3].x,point[3].y);
  Sleep(250);
  iPaint(point[0].x,point[0].y,point[1].x,point[1].y);
  iPaint(point[1].x,point[1].y,point[2].x,point[2].y);
  iPaint(point[2].x,point[2].y,point[3].x,point[3].y);
}
  
void DrawLine (int x1,int y1,int x2,int y2)
{
  setlinestyle(PS_SOLID,NULL,3);
  setcolor(RGB(90,43,9));
  line(x1 + 21,y1 + 24,x2 + 21,y2 + 24);
}


void iPaint (long x1,long y1,long x2,long y2)   
{  
  int minx,miny,maxx,maxy;
  if(x1 == x2)
  {
    maxy = y1 > y2? y1:y2;
    miny = y1 < y2? y1:y2;
    for(int i = miny; i <= maxy;i += 48)
      putimage(x1,i,&image2);
  }    
  else if(y1 == y2)
  {
    maxx = x1 > x2? x1:x2;
    minx = x1 < x2? x1:x2;
    for(int j = minx; j <= maxx;j += 42 )
      putimage(j,y1,&image2);
}  }


/////////////////////////////////////////////////////////////////////////////////


void GridPhy_coor(int& leftx,int& lefty)      //转化为标准物理坐标
{
  leftx = ((leftx - leftedge) / 42) * 42 + leftedge;
  lefty = ((lefty - topedge) / 48) * 48 + topedge;
}


void ExchaVal(GridInfor& pre,GridInfor& cur)    //交换格子信息
{
  pre.GridID = cur.GridID;
  pre.idx = cur.idx;pre.idy = cur.idy;
  pre.leftx = cur.leftx;pre.lefty = cur.lefty;
}


void Init_Grid(GridInfor& grid)           //初始化格子
{
  grid.GridID = 0;
  grid.idx  = 0;  grid.idy  = 0;
  grid.leftx = 0;  grid.lefty = 0;
}


void TranstoPhycoor (int* idx,int* idy)      //图纸坐标转变为屏幕坐标
{  
  int x ,y;x =*idx,y = *idy;
  *idy = (y - 1) * 48 + leftedge;
  *idx = (x - 1) * 42 + topedge;
}

大家赶紧去动手试试吧!

此外,我也给大家分享我收集的其他资源,从最零基础开始的教程到C语言C++项目案例,帮助大家在学习C语言的道路上披荆斩棘!

审核编辑 :李倩


声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • C语言
    +关注

    关注

    180

    文章

    7530

    浏览量

    128667
  • 编程
    +关注

    关注

    88

    文章

    3440

    浏览量

    92389
  • 代码
    +关注

    关注

    30

    文章

    4555

    浏览量

    66767

原文标题:C语言零基础项目:连连看小游戏!详细思路+源码分享

文章出处:【微信号:cyuyanxuexi,微信公众号:C语言编程学习基地】欢迎添加关注!文章转载请注明出处。

收藏 人收藏

    评论

    相关推荐

    微软游戏部门裁员1900人 或因暴雪新项目奥德赛被砍

    微软游戏部门裁员1900人 或因暴雪新项目奥德赛被砍 据外媒的报道微软游戏部门将裁员1900人,目前微软游戏部门共有约22000名员工;裁员人数约占微软
    的头像 发表于 01-26 19:54 1232次阅读

    C语言小游戏源码大放送

    电子发烧友网站提供《C语言小游戏源码大放送.rar》资料免费下载
    发表于 11-21 10:36 1次下载
    C<b class='flag-5'>语言</b><b class='flag-5'>小游戏</b>源码大放送

    小程序游戏风口有点“堵”?华为云耀云服务器 L 实例为企业疏难解困

    中,小游戏的占比为 28%,呈爆发式的增长趋势。背靠着 4 亿多小程序用户,小游戏未来增长空间巨大,众多中小企业转型进军小游戏市场,创造出了游戏领域新业态。虽然市场巨大,对创业团队来说
    的头像 发表于 11-16 09:54 133次阅读
    小程序<b class='flag-5'>游戏</b>风口有点“堵”?华为云耀云服务器 L 实例为企业疏难解困

    基于Android系统的连连看详细设计说明书

    电子发烧友网站提供《基于Android系统的连连看详细设计说明书.doc》资料免费下载
    发表于 10-30 10:12 0次下载
    基于Android系统的<b class='flag-5'>连连看</b>详细设计说明书

    S7-1200PLC多语言项目制作步骤

    对于默认情况项目项目语言取决于建立设备时,TIA PORTAL软件的用户界面语言。如果用户界面语言是中文,默认的项目语言以及初始编辑
    发表于 10-25 11:33 482次阅读
    S7-1200PLC多<b class='flag-5'>语言</b><b class='flag-5'>项目</b>制作步骤

    火遍童年的FC游戏是使用什么语言编写的

    那么FC游戏是用什么语言编写的呢?实际上,FC游戏的开发使用了一种名为汇编语言语言。汇编语言
    的头像 发表于 10-20 16:46 621次阅读
    火遍童年的FC<b class='flag-5'>游戏</b>是使用什么<b class='flag-5'>语言</b>编写的

    火爆微信小游戏开发的轻量云服务器,腾讯云、华为云、阿里云三家“避坑”指南来了

    微信小游戏是近几年兴起的互联网游戏产品应用,很多中小企业都开始将游戏产品布局到小程序里,利用微信平台流量优势,来降低游戏开发成本、以及获取大量游戏
    的头像 发表于 10-18 09:37 435次阅读
    火爆微信<b class='flag-5'>小游戏</b>开发的轻量云服务器,腾讯云、华为云、阿里云三家“避坑”指南来了

    基于FPGA的2048小游戏实现案例

    这周末调试《车牌识别算法》遇到点问题,“无聊”中用FPGA搞个2048小游戏玩玩。
    的头像 发表于 09-08 10:01 847次阅读
    基于FPGA的2048<b class='flag-5'>小游戏</b>实现案例

    基于FPGA的贪吃蛇小游戏实现案例

    手机游戏时代始于 1997 年,当时诺基亚在 6110 机型上发布了第一款名为〈贪吃蛇〉的手机游戏。这可能是有史以来最受欢迎的手机游戏之一,全球有超过 3.5 亿部手机提供这款游戏
    发表于 09-08 09:32 743次阅读
    基于FPGA的贪吃蛇<b class='flag-5'>小游戏</b>实现案例

    【Start_DSC28034PNT湖人开发板免费体验】(开源)控制机械臂小游戏3

    接上4篇:【Start_DSC28034PNT湖人开发板免费体验】(开源)控制机械臂小游戏2 【Start_DSC28034PNT湖人开发板免费体验】(开源)控制机械臂小游戏
    发表于 07-30 14:48

    西蒙小游戏开源构建

    电子发烧友网站提供《西蒙小游戏开源构建.zip》资料免费下载
    发表于 07-06 14:41 0次下载
    西蒙<b class='flag-5'>小游戏</b>开源构建

    通过C语言设计的贪吃蛇游戏(控制台终端)

    当前通过控制台终端实现一个贪吃蛇小游戏,实现游戏的绘制、更新、控制等功能。
    的头像 发表于 06-30 09:53 505次阅读
    通过C<b class='flag-5'>语言</b>设计的贪吃蛇<b class='flag-5'>游戏</b>(控制台终端)

    【CW32饭盒派开发板试用体验】+机械臂游戏项目(开源)(5)加红外游戏操控机

    接上几篇: 【CW32饭盒派开发板试用体验】+机械臂游戏项目(开源)(1)开箱试验舵机 - 武汉芯源MCU - 电子技术论坛 - 广受欢迎的专业电子论坛! 【CW32饭盒派开发板试用体验】+机械臂
    发表于 05-24 22:27

    #深入浅出学习eTs#(八)“猜大小”小游戏

    来实现,但是发现支持API8的设备都被抢光了(包括模拟器),而本地模拟器仅仅都支持API6,也是不能使用的,在之后的内容中咱们还是依托于预览器来实现,如果实现不了的或者有特定需求的,我会使用DAYU200真机来实现 一、基本需求 本章节给大家带来一个最基础的一个赌博小游戏,即
    的头像 发表于 05-17 15:08 728次阅读
    #深入浅出学习eTs#(八)“猜大小”<b class='flag-5'>小游戏</b>

    求分享使用OLED屏幕和按钮的游戏

    比我更擅长游戏逻辑。 如果有人感兴趣并且有一个小游戏可以分享,我会非常感兴趣。 -麦克风 代码:全选textbox bla$ interrupt d5, [left] interrupt d6
    发表于 05-10 07:20