当前位置:首页 » 游戏种类 » 安卓小游戏源码

安卓小游戏源码

发布时间: 2022-01-13 20:11:18

⑴ 求几个基于android开发的小游戏源码

package com.fiveChess;

import android.app.Activity;
import android.os.Bundle;
import android.view.Display;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.view.WindowManager;

public class MainActivity extends Activity {
GameView gameView = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
Display display = this.getWindowManager().getDefaultDisplay();
gameView = new GameView(this,display.getWidth(),display.getHeight());
setContentView(gameView);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add("重新开始").setIcon(android.R.drawable.ic_menu_myplaces);
menu.add("退出");
return super.onCreateOptionsMenu(menu);
}

⑵ 求一个类似五子棋酱紫简单的java安卓游戏。要源代码嗯、所有钱钱都给你。

必须要是安桌吗?
我的是在 eclipse上运行的e

⑶ 有没有国外的下载android游戏源代码的网址

干嘛请国外?
上wap地带,那有很多android源码,方便快捷,绿色安全

塔防游戏源码都有很多个

⑷ 能把android小游戏和源代码发给我吗 新手 我的邮箱是[email protected] 谢谢

什么游戏?

⑸ 用Eclipse制作Android小游戏,求一些代码方面的指导.

Compass\.classpath
.......\.project
.......\AndroidManifest.xml
.......\bin\classes.dex
.......\...\.om\mh_compass\Compass$1.class
.......\...\...\..........\Compass$SampleView.class
.......\...\...\..........\Compass.class
.......\...\...\..........\PictureLayout.class
.......\...\...\..........\R$attr.class
.......\...\...\..........\R$drawable.class
.......\...\...\..........\R$layout.class
.......\...\...\..........\R$string.class
.......\...\...\..........\R.class
.......\...\Compass.apk
.......\...\resources.ap_
.......\default.properties
.......\gen\com\mh_compass\R.java
.......\res\drawable\bg.jpg
.......\...\........\compass_degree.png
.......\...\........\icon.png
.......\...\........\needle.png
.......\...\........\panel.png
.......\...\layout\main.xml
.......\...\values\strings.xml
.......\src\com\mh_compass\Compass.java
.......\...\...\..........\PictureLayout.java
.......\bin\com\compass
.......\...\...\mh_compass
.......\gen\com\compass
.......\...\...\mh_compass
.......\src\com\mh_compass
.......\bin\com
.......\gen\com
.......\res\drawable
.......\...\drawable-hdpi
.......\...\drawable-ldpi
.......\...\drawable-mdpi
.......\...\layout
.......\...\values
.......\src\com
.......\assets
.......\bin
.......\gen
.......\res
.......\src
Compass 求采纳

⑹ 求安卓版吃豆人游戏源码

你好,你说的这个吃豆人小游戏我还真玩过,是在应用宝里面

看到的,很经典的一个小游戏,名字叫做经典吃豆人,很好玩的,你要是感兴趣的话,

可以先在你的电脑上下载一个电脑版的应用宝,再把你的手机连接到电脑上,

连接成功后,你在手机应用界面中找到右上角的搜索栏,搜索这几个游戏,

找到这之后,点击游戏名字,就可以直接下载就可以安到你的手机上了,

希望可以帮到你!

⑺ 需要一份android的魔塔游戏源码

魔塔太多。。 我也是个魔塔迷 收集了一些可以下载的

胖老鼠魔塔1.12
http://www.divshare.com/download/156405-8b1

魔塔五十层中文
http://www.divshare.com/download/156406-403

新新魔塔1.1

新新魔塔1.33

魔塔2000

英文原版

AK47游魔塔

RPG迷宫

幻影魔塔

古怪魔塔

伋之魔塔

宇宙魔塔

网络魔塔

我去杀魔王

原始怪物魔塔一

原始怪物魔塔二

暑期危机夏令营

新年休闲魔塔

警察抓小偷

魔塔病毒塔

魔塔风光

夺回金钻石

蓝色魔塔

虚拟城市

24层修改版

天王级魔塔

太阳魔塔

夏令营3-1

夏令营3-2

暑假危机夏令营二

王者对决

游戏魔塔20

新新魔塔二

灌水魔塔

魔塔2008_2

魔塔2008

魔塔七

历程

史莱姆魔塔

王彩臻游魔塔

肉肉魔塔

命运的羁绊

秋月魔塔

螟蛉魔塔

魔法之塔(新版)

魔法之塔

魔塔废话

魔塔颠峰

魔魔塔塔我的家

绿钥匙的危机

落叶之歌

中国版魔塔小试牛刀

中国版魔塔第二战斗区

宋末英雄传25

魔界迷踪1.1

魔塔吧的战争1接受使命

魔灵神塔第一部

幻影魔域V1.5

圣诞节魔塔

原始怪物魔塔11

鬼魂灵地

新年魔塔

魔塔九23

魔塔-磨练

魔塔2006--圣魔王

魔塔2007

魔塔外传--shurufa

天顶魔塔1--xhwkcj

魔塔复刻.强化.恶搞版--魔神之影

黑石怪人

魔塔乐园--黑石怪人

魔塔-灵--黑石怪人

魔塔-灵--黑石怪人

三强魔塔争霸赛--黑衣战士

月光魔塔--黑衣战士

星月魔塔--黑衣战士

魔塔机关谜题游戏魔塔--黑衣战士

sxdan--sxdan

用鼠标控制的魔塔--sxdan

日月传说--水骑士

骑士物语--水骑士

白银slm之魔塔--白银史莱姆

魔塔30层新手版--白银史莱姆

勇士要自杀--快乐是永恒

热血马拉松乱斗--快乐是永恒

冬令营-我是杜哉

魔塔十一-我是杜哉

米老鼠魔塔--我是杜哉

老鼠魔塔--我是杜哉

魔塔和平--把魔塔砸烂

开心辞典版--把魔塔砸烂

天魔降临--风魔卡卡西

秋季危机--风魔卡卡西

新月魔塔--魔法杰克

暗月魔塔测试版--魔法杰克

30层第二部--逻辑电路

30层新手版--逻辑电路

史莱姆历险记--逻辑电路

小魔塔--金色史莱姆

光芒魔塔--光芒魔王

沼泽魔塔--龙炎弹

星月魔塔

神之传说

神圣传说-白银黄金史莱姆

秘密魔塔--攻防比你高1

密室魔塔-灵魂战士

智商魔塔-魔王黄金史莱姆

智慧的象征-名侦探小柯

超级魔塔--黑苹爱魔塔

暗火魔塔--暗夜冥卫兵

魔法之宫--蓝蓝小雪

魔族复仇--超级冰骑士

魔塔50层--魔界战士

魔塔999

魔塔.极限--凌波骑士

谜题魔塔

魔塔XP2--黑衣魔王

魔塔之月亮塔修正版--黄头怪

魔塔之暗杀魔王计划

魔塔世界

魔塔吧之战--D调的爱恋

魔塔传说

魔塔无题--oksh.rar

魔塔疯狂--神之骑士

魔窟危机灌水王归来--江云天

创世魔塔--魔塔创世主

变态魔塔--绿衣警卫

无敌黑暗剑王

绝对计划--魔塔M4

虚拟城市-1

炎之魔塔--瑟地

魔塔08--瑟地 后面的给分再发

⑻ 哪里有APP、Android游戏开发及商业等源代码

github:各种源码都有。
国内其他网站的源码,大部分比较栏,但大部分都收费。游戏的源码你就别想了,烂的一点也没法用,只有app的源码,可以参考一些技术点的实现。

⑼ 求一个安卓开发小游戏源代码,临时交作业用

package com.fiveChess;

import android.app.Activity;
import android.os.Bundle;
import android.view.Display;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.view.WindowManager;

public class MainActivity extends Activity {
GameView gameView = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
Display display = this.getWindowManager().getDefaultDisplay();
gameView = new GameView(this,display.getWidth(),display.getHeight());
setContentView(gameView);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add("重新开始").setIcon(android.R.drawable.ic_menu_myplaces);
menu.add("退出");
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if(item.getTitle().equals("重新开始")){
gameView.canPlay = true;
gameView.chess = new int[gameView.row][gameView.col];
gameView.invalidate();
}else if(item.getTitle().equals("退出")){
finish();
}
return super.onOptionsItemSelected(item);
}
}

package com.fiveChess;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.view.MotionEvent;
import android.view.View;

public class GameView extends View {
Context context = null;
int screenWidth,screenHeight;
String message = "";//提示轮到哪个玩家
int row,col; //划线的行数和列数
int stepLength = 30;//棋盘每格间距
int[][] chess = null;//0代表没有棋子,1代表是黑棋,2代表白旗
boolean isBlack = true;
boolean canPlay = true;
public GameView(Context context,int screenWidth,int screenHeight) {
super(context);
this.context = context;
this.screenWidth = screenWidth;
this.screenHeight = screenHeight;
this.message = "黑棋先行";
row = (screenHeight-50)/stepLength+1;
col = (screenWidth-10)/stepLength+1;
chess = new int[row][col];

}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
Paint paint = new Paint();
paint.setColor(Color.WHITE);
canvas.drawRect(0, 0, screenWidth, screenHeight, paint);//画背景
paint.setColor(Color.BLUE);
paint.setTextSize(25);
canvas.drawText(message, (screenWidth-100)/2, 30, paint);//画最顶层的字
paint.setColor(Color.BLACK);
//画棋盘
for(int i=0;i<row;i++){
canvas.drawLine(10, 50+i*stepLength, 10+(col-1)*stepLength, 50+i*stepLength, paint);
}
for(int i=0;i<col;i++){
canvas.drawLine(10+i*stepLength,50,10+i*stepLength,50+(row-1)*stepLength, paint);
}

for(int r=0;r<row;r++){
for(int c=0;c<col;c++){
if(chess[r][c] == 1){
paint.setColor(Color.BLACK);
paint.setStyle(Style.FILL);
canvas.drawCircle(10+c*stepLength, 50+r*stepLength, 10, paint);
}else if(chess[r][c] == 2){
//画白棋
paint.setColor(Color.WHITE);
paint.setStyle(Style.FILL);
canvas.drawCircle(10+c*stepLength, 50+r*stepLength, 10, paint);

paint.setColor(Color.BLACK);
paint.setStyle(Style.STROKE);
canvas.drawCircle(10+c*stepLength, 50+r*stepLength, 10, paint);
}
}
}
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if(!canPlay){return false;}
float x = event.getX();
float y = event.getY();
int r = Math.round((y-50)/stepLength);
int c = Math.round((x-10)/stepLength);
if(r<0 || r>row-1 || c<0 || c>col-1){return false;}
if(chess[r][c]!=0){return false;}//若有棋子则不再画棋子了
if(isBlack){
chess[r][c] = 1;
isBlack = false;
message = "轮到白棋";
}else{
chess[r][c] = 2;
isBlack = true;
message = "轮到黑棋";
}
invalidate();
if(judge(r, c,0,1)) return false;
if(judge(r, c,1,0)) return false ;
if(judge(r, c,1,1)) return false;
if(judge(r, c,1,-1)) return false;

return super.onTouchEvent(event);
}
private boolean judge(int r, int c,int x,int y) {//r,c表示行和列,x表示在y方向上的偏移,y表示在x方向上的偏移
int count = 1;
int a = r;
int b = c;
while(r>=0 && r<row && c>=0 && c<col && r+x>=0 && r+x<row && c+y>=0 && c+y<col && chess[r][c] == chess[r+x][c+y]){
count++;
if(y>0){
c++;
}else if(y<0){
c--;
}
if(x>0){
r++;
}else if(x<0){
r--;
}
}
while(a>=0 && a<row && b>=0 && b<col && a-x>=0 && a-x<row && b-y>=0 && b-y<col && chess[a][b] == chess[a-x][b-y]){
count++;
if(y>0){
b--;
}else if(y<0){
b++;
}
if(x>0){
a--;
}else if(x<0){
a++;
}
}
if(count>=5){
String str = "";
if(isBlack){
str = "白棋胜利";
}else{
str = "黑棋胜利";
}
new AlertDialog.Builder(context).setTitle("游戏结束").setMessage(str).setPositiveButton("重新开始", new DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface dialog, int which) {
chess = new int[row][col];
invalidate();

}
}).setNegativeButton("观看棋局", new DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface dialog, int which) {
canPlay = false;

}
}).show();
return true;
}

return false;
}
}
PS:五子棋,无需图片,直接在程序里画出来的。注意我发的是两个文件,一个activity,一个类文件,别把它当成一个文件了

热点内容
绝地求生未来之役比赛为什么进不去 发布:2023-08-31 22:07:08 浏览:1051
dota2位置什么意思 发布:2023-08-31 22:00:04 浏览:455
lol电竞是什么样子 发布:2023-08-31 21:58:40 浏览:959
绝地求生八倍镜的那个圆圈怎么弄 发布:2023-08-31 21:58:31 浏览:987
lol龙龟一个多少金币 发布:2023-08-31 21:55:07 浏览:412
王者如何改游戏内名称 发布:2023-08-31 21:55:06 浏览:696
游戏主播打广告是什么意思 发布:2023-08-31 21:55:06 浏览:1311
绝地求生如何免费拿到ss7赛季手册 发布:2023-08-31 21:52:13 浏览:567
pgg是哪个国家的战队lol 发布:2023-08-31 21:52:07 浏览:454
一个人的时候才发现游戏很没意思 发布:2023-08-31 21:49:24 浏览:1041