
游戏
作者感觉不错的游戏开源分享,部分借鉴,大部分原创,内容均为C++或HTML+JS+CSS。
蒟蒻一枚
qwq
展开
-
C++桌面贪吃蛇,能通关的都是大神(Windows可编译)
文章目录运行效果代码实现(详见注释)运行效果传送代码实现(详见注释)#include <bits/stdc++.h>#include <windows.h>#include <commctrl.h>#include <shlobj.h>#define get GetAsyncKeyState#define send SendMessageA#define LVM LVM_SETITEMPOSITION#define msg Message原创 2021-08-30 12:22:04 · 5699 阅读 · 90 评论 -
超酷超实用的登录/注册界面,保你看完不后悔(无套路提供源码)
还想什么?赶快点进来呀!!原创 2021-08-22 20:58:07 · 4850 阅读 · 84 评论 -
小白三个小时写出的打砖块游戏,小白自己也通关不了(无套路提供源码)
超酷的HTML打方块游戏原创 2021-08-19 12:47:42 · 1518 阅读 · 11 评论 -
html+js+css国际象棋,画面超精致!!
想要国际象棋代码的小伙伴们,快快点进来叭~原创 2021-07-30 18:06:07 · 2995 阅读 · 35 评论 -
小白都能看懂的游戏教程(C++版)第一章
概述做游戏,其实就是按照自己的想法模拟,游客做出操作A会怎样,操作B会怎样。这样就能实现一些最基本的小游戏了。这里就给出一个例子叭~#include <bits/stdc++.h>using namespace std;int main() {A: cout << "请输入一个1~1000的整数。"; srand(time(0)); int x, sum = 0, res = rand() % 1000 + 1; while (true) { cin >原创 2021-01-22 09:44:09 · 3325 阅读 · 19 评论 -
C++简易飞机大战游戏
游戏效果飞机可以前后移动,发射子弹击落敌机!具体见玩家须知(运行后)!游戏代码#include <iostream>#include <windows.h>#include <conio.h>#include <time.h>#include <string>#include <stdlib.h>using namespace std;typedef struct Frame { COORD position[2]原创 2021-01-19 09:37:05 · 1276 阅读 · 7 评论 -
C++三体星战小游戏
外星人正在侵入地球,需要一位勇者将他们打败!欢迎大家体验游戏“三体星战”!游戏代码#include<bits/stdc++.h>#include<bits/stdc++.h>#include<windows.h>#include<conio.h>using namespace std;int toint(double a){return ((int)(a*10+5))/10;}int rand(int a){return rand()%a;}原创 2021-01-17 10:35:36 · 1238 阅读 · 6 评论 -
C++简易单机贪吃蛇无尽模式
游戏效果贪吃蛇吃食物,每吃一个得一分,撞到墙或者撞到自己死。游戏代码#include <stdio.h>#include <windows.h>#include <time.h>#include <conio.h>#include <stdlib.h>using namespace std;int maxn;void BackGround(unsigned int ForeColor = 7, unsigned int Back原创 2021-01-12 20:50:18 · 946 阅读 · 2 评论 -
C++简易版扫雷小游戏
游戏功能扫雷。游戏代码#include<stdio.h>#include<Windows.h>#define YELLOW FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY#define CYAN FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY#define ORANGE FOREGROUND_RED | FOREGROUND_GREEN原创 2021-01-12 12:18:28 · 548 阅读 · 0 评论 -
C++推箱子小游戏
游戏效果简单易懂的推箱子闯关小游戏。游戏代码#include <bits/stdc++.h>#include <windows.h>#include <conio.h>using namespace std;#define VERSION "2.2"#define M 55int n, m, wall[M][M], hole[M][M], box[M][M];int step, dct, query, cross, rx[233], ry[233];原创 2021-01-12 09:59:05 · 525 阅读 · 1 评论 -
C++炸弹小游戏
游戏效果小人可以随便在一些元素(如石头,岩浆,水,宝石等)上跳跃,“地面”一直在上升,小人上升到顶部或者没有血的时候游戏结束(初始20点血),小人可以随意放炸弹,共有八种炸弹。但是被炸到或者碰到岩浆就要减一滴血,拿到宝石加一滴血炸弹炸掉石头可以得分,得到200分即可获胜、...原创 2021-01-10 09:16:21 · 3005 阅读 · 28 评论 -
俄罗斯方块游戏
简易的俄罗斯方块,希望大家满意。#include <iostream>#include <string>#include <ctime>#include <cstdlib>#include <windows.h>#include <conio.h>using namespace std;int block00[4][4] = { { 10, 0, 0, 0 }, { 1, 1, 1, 1 }, { 0, 0, 0,原创 2021-01-09 09:44:30 · 417 阅读 · 1 评论 -
C++超级迷宫游戏
游戏效果用钥匙、护盾等道具帮助你的小人通过大门、墙、怪物、岩浆等困难到达终点。游戏代码#include<bits/stdc++.h> #include<conio.h>#include<windows.h>using namespace std;void Color(int a){ if(a==0) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSIT原创 2021-01-09 13:15:40 · 887 阅读 · 5 评论 -
迷你愤怒的小鸟游戏
游戏功能控制弹弓和不同的小鸟,使用每个小鸟独有的技能,杀死小猪。游戏代码#include <bits/stdc++.h>#include <windows.h>#include <stdio.h>#include <conio.h>#include <time.h>using namespace std;const double pi = 3.1415926536;int toint (float a) { return ((原创 2021-01-07 19:57:34 · 1288 阅读 · 8 评论 -
吃豆子小游戏
#include <stdio.h>#include <iostream>#include <time.h>#include <conio.h>#include <windows.h> #include <stdlib.h> #include <string.h>using namespace std;const int n = 809;struct Point { int原创 2021-01-07 19:45:30 · 4734 阅读 · 11 评论 -
C++跑酷小游戏
直接上代码#include<bits/stdc++.h> #include<windows.h>#include<stdio.h>#include<conio.h>#include<time.h>#define Nor if(B[b].x<5) B[b].x=5;#define Out1 Bx1-Bvx1<=6||Bx1-Bvx1>=28||By1-Bvy1<=7||By1-Bvy1>=27#defin转载 2020-12-30 19:13:08 · 64426 阅读 · 95 评论