发布时间:2024-09-08作者:李德楷点击:
休闲类
跳一跳
合成大西瓜
2048
消消乐
羊了个羊
益智解谜类
纪念碑谷
皇家守卫军
神庙逃亡
阿瓦隆之王
保卫萝卜
动作冒险类
地铁跑酷
水果忍者
植物大战僵尸
Pou
弓箭手大作战
经营模拟类
摩尔庄园
我家乡院
贪吃蛇大作战
旅行青蛙
经营牧场
策略塔防类
部落冲突
皇室战争
三国志幻想大陆
率土之滨
阴阳师
棋牌类
斗地主
炸金花
欢乐斗地主
麻将
象棋
角色扮演类
梦想世界
梦幻西游
大话西游
神武
天下
射击类
和平精英
穿越火线
王者荣耀
使命召唤手游
荒野行动
其他类
同城游
谁是卧底
木头人
你画我猜
欢乐语音
1. 羊了个羊:一款简单又令人上瘾的消除类游戏,以其高难度和病毒式传播而著称。
2. 合成大西瓜:一款简单而休闲的合成类游戏,玩家通过合并相同水果来获得更大的水果。
3. 开心消消乐:一款经典的消除类游戏,拥有丰富的关卡和道具,深受各个年龄段玩家的喜爱。
4. 欢乐斗地主:一款经典的棋牌类游戏,拥有多种模式和玩法,是与朋友社交和娱乐的绝佳选择。
5. 跳一跳:一款休闲的跳跃类游戏,玩家控制一个小球在平台上跳跃,考验玩家的反应和节奏感。
6. 传奇之路:一款角色扮演类游戏,玩家创建自己的角色并踏上冒险之旅,击败怪物、完成任务并提升等级。
7. 我的小家:一款装饰类游戏,玩家可以设计和装饰自己的房屋,创造一个温馨舒适的家园。
8. 斗破苍穹·缘起:一款根据同名小说改编的卡牌类游戏,玩家收集并培养角色,组建阵容进行战斗。
9. 迷你世界:一款沙盒类游戏,玩家可以在其中自由创建和探索世界,发挥想象力建造各种建筑和设施。
10. 王者荣耀:一款竞技类游戏,玩家组队进行5v5对战,考验团队配合和个人操作技巧。
1. 微信小游戏开发框架
javascript
// 初始化微信小游戏
wx.init({
appId: 'your app id',
secret: 'your app secret'
});
// 创建游戏场景
const scene = wx.createScene({
id: 'main',
canvasId: 'gameCanvas'
});
// 添加精灵
const player = scene.createEntity('player');
player.addComponent(SpriteComponent, {
texture: 'player.png'
});
player.addComponent(PhysicsComponent, {
mass: 1,
friction: 0
});
// 游戏主循环
function update() {
// 更新游戏逻辑
player.rotation += 0.01;
// 渲染游戏画面
scene.render();
// 请求下一次更新
requestAnimationFrame(update);
// 开始游戏
update();
2. 微信小游戏示例代码
2.1 Flappy Bird 克隆
```javascript
// 初始化微信小游戏
wx.init({
appId: 'your app id',
secret: 'your app secret'
});
// 创建游戏场景
const scene = wx.createScene({
id: 'main',
canvasId: 'gameCanvas'
});
// 添加背景
const background = scene.createEntity('background');
background.addComponent(SpriteComponent, {
texture: 'background.png'
});
// 添加地板
const ground = scene.createEntity('ground');
ground.addComponent(SpriteComponent, {
texture: 'ground.png'
});
ground.addComponent(PhysicsComponent, {
mass: Infinity,
friction: 1
});
// 添加管道
const pipes = [];
for (let i = 0; i < 5; i++) {
const pipeTop = scene.createEntity('pipeTop');
pipeTop.addComponent(SpriteComponent, {
texture: 'pipe_top.png'
});
pipeTop.addComponent(PhysicsComponent, {
mass: Infinity,
friction: 1
});
const pipeBottom = scene.createEntity('pipeBottom');
pipeBottom.addComponent(SpriteComponent, {
texture: 'pipe_bottom.png'
});
pipeBottom.addComponent(PhysicsComponent, {
mass: Infinity,
friction: 1
});
pipes.push([pipeTop, pipeBottom]);
// 添加小鸟
const bird = scene.createEntity('bird');
bird.addComponent(SpriteComponent, {
texture: 'bird.png'
});
bird.addComponent(PhysicsComponent, {
mass: 1,
friction: 0
});
// 游戏主循环
function update() {
// 更新游戏逻辑
bird.rotation += 0.01;
// 鸟儿跳跃
if (wx.isTouchingScreen()) {
bird.velocity.y = -5;
}
// 移动管道
for (let i = 0; i < pipes.length; i++) {
const [pipeTop, pipeBottom] = pipes[i];
pipeTop.position.x -= 2;
pipeBottom.position.x -= 2;
if (pipeTop.position.x < -pipeTop.width / 2) {
pipeTop.position.x = scene.width + pipeTop.width / 2;
pipeBottom.position.x = scene.width + pipeBottom.width / 2;
}
}
// 碰撞检测
for (let i = 0; i < pipes.length; i++) {
const [pipeTop, pipeBottom] = pipes[i];
if (bird.isCollidingWith(pipeTop) || bird.isCollidingWith(pipeBottom)) {
// 游戏结束
}
}
if (bird.position.y < 0 || bird.position.y > scene.height) {
// 游戏结束
}
// 渲染游戏画面
scene.render();
// 请求下一次更新
requestAnimationFrame(update);
// 开始游戏
update();
```
2.2 2048 克隆
```javascript
// 初始化微信小游戏
wx.init({
appId: 'your app id',
secret: 'your app secret'
});
// 创建游戏场景
const scene = wx.createScene({
id: 'main',
canvasId: 'gameCanvas'
});
// 添加背景
const background = scene.createEntity('background
2023-08-31
2023-10-14
2023-08-05
2023-08-29
2023-09-25
2023-09-23
2023-09-23
2023-09-11
2023-09-23
2023-09-06