導航:首頁 > 編程語言 > Gamejava

Gamejava

發布時間:2022-08-11 16:35:15

『壹』 請問java游戲下載了放在手機的哪個文件夾

隨便放一個文件夾只要自己能找到就行。

然後用手機安裝。

在菜單----應用程序——>辦公工具——>文件管理
裡面

選擇你剛才放進去的安裝文件就行了

·

手機游戲下載安裝最佳方法:
1、把你手機的數據線插好,小端插手機,大端(也就是所謂的usb口)插電腦
2、進入d.cn
網(其它網也可以)
3、挑選你喜歡的手機游戲,不用太在乎機型的差別,手機游戲基本是通用的,格式一般是jar的
4、點擊下載鏈接,將手機游戲下載到你手機在電腦中所顯示的U盤中
5、下載完畢後,拔出數據線。在手機上找到該游戲,選擇,安裝(進入後菜單可見)
6、安裝完畢,可以玩了
············(希望ι
奈落。的回答對您有幫助)···············

『貳』 java游戲開發學習的方法有哪些

平時我們玩的大型游戲,無一不是基於C/C++,其效率、速度無其他語言能比。所以,

1、先學習C/C++

2、之後接觸學習WINDOWS API和VC++

3、需要掌握一個3D游戲SDK:Directx SDK,或者OPENGL SDK

4、美工和建模方面的知識適當了解

圍繞以上找相關資料或書,可能需要好幾本。更多交流可參考我空間主頁有關文章。

你可以參考參考一下青島雙碩程序員培訓學校網上課程大綱或技術論壇

『叄』 JAVA游戲是什麼

JAVA游戲就是用JAVA程序(編程語言)編寫的游戲
用java語言編寫的程序,關鍵是它的體積小,容量是用k衡量的,很小巧,所以也叫k—java一般用在手機上的,呵呵明白了嗎

『肆』 JAVA下載的東西可以弄到桌面或菜單上嗎可以該怎麼做

,然後將文件名改名成xx.bat
假設你的游戲類名為game.java,把它編譯成game.class 在xx.bat中這樣寫
set CLASSPATH=%CLASSPATH%;%JAVA安裝目錄%\lib\*;游戲.class所在路徑
set PATH=%PATH%;%JAVA安裝目錄%\bin\*
java game
寫完後右鍵xx.bat創建桌面快捷方式即可

最好是利用Eclipse的導出功能將游戲導出為jar包,然後放在CLASSPATH中
如果你的機器安裝了java TM,那麼指定用Eclipse導出的時候指定主類名就可以雙擊jar文件運行的
具體步驟:
右鍵工程--->>>Export--->>>Java--->>>JAR file--->>>Next--->>>選擇工程--->>>select the export destination:這里Browse選擇要導出的的jar文件路徑,例如C:\Users\XXX\Desktop\test.jar 其他的為默認---> Next--->>>Next--->>>select the class of the application entry point--->>> Main class:這里選擇游戲文件名,例如game.java--->>>Finish即可完成打包。

『伍』 java中Game game = new Game(this)中this指什麼越詳細越好

java中Game game = new Game(this)
可以看出this是一個參數, this在java中表示當前類,也就是這句語句他所在的類例如:
public class A{
public void function(){
Game game = new Game(this);
}
}
這里的this指的是A這個類,不過Game的構造方法一定要有一個
public Game(A a);

『陸』 java游戲開發流程

我從事JAVA工作已經有4年多了,對游戲也比較感興趣,不過java開發游戲的的確很少,主要偏向於WEB方面,C、C++
更接近底層,適合於游戲的編寫,如果你執意java的話可以研究android,因為這2者是互通的,可以編寫游戲開發,JAVA來做後台

『柒』 在Java游戲中讓一個人物走動的代碼是什麼

代碼主要為以下:

package com.lovo.game.frame;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.MediaTracker;
import javax.swing.JFrame;
import com.lovo.game.role.Fire;
import com.lovo.game.role.GameMap;
import com.lovo.game.role.ZhaoYun;
import com.lovo.game.util.TrackerInit;

public class GameStartFrame extends JFrame implements Runnable{

private Image memoryImage;

private Graphics memoryGraphics;

public static boolean isRun = true;

private static GameMap gameMap = new GameMap();

private ZhaoYun zy = new ZhaoYun();

private Fire fire = new Fire();

public GameStartFrame(){
this.setSize(900,700);
this.setVisible(true);
this.setDefaultCloseOperation(3);
//設置居中
this.setLocationRelativeTo(null);

//初始化雙緩沖畫布、畫筆
this.memoryImage = this.createImage(900,700);
this.memoryGraphics = this.memoryImage.getGraphics();

//媒體追蹤器
MediaTracker tracker = new MediaTracker(this);
TrackerInit.initImage(tracker);

//啟動線程
Thread th = new Thread(this);
th.start();
}

public static void main(String[] args) {
GameStartFrame game = new GameStartFrame();
}
public void run() {
while(isRun){
this.flushFrame();
try {
Thread.sleep(20);
} catch (InterruptedException e) {
e.printStackTrace();
}
}

}
private void flushFrame(){
gameMap.drawMap(memoryGraphics);
zy.drawImage(memoryGraphics);
fire.drawImage(memoryGraphics);
//將雙緩沖畫布中的圖片顯示在窗體
this.getGraphics().drawImage(this.memoryImage,0,0,this);
}
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
package com.lovo.game.role;
import java.awt.Graphics;
import java.awt.Image;

public class GameMap {

public static Image mapImg;

public static int mapx;

public void drawMap(Graphics memoryGraphics){
mapx -=5;
if(mapx <=-17100){
mapx = -17100;
}
memoryGraphics.drawImage(mapImg,mapx,0,null);
}

}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package com.lovo.game.role;
import java.awt.Graphics;
import java.awt.Image;
import com.lovo.game.util.MoveImageChange;

public class Fire {

public static Image[]fireImage;

private int x =100;

private int y =300;

private int width = 200;

private int height = 130;

private MoveImageChange moveChange = new MoveImageChange(3);

public void drawImage(Graphics memoryGraphics){
Image img = moveChange.imageChange(fireImage);
memoryGraphics.drawImage(img,this.x,this.y,this.width,this.height,null);
}
}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package com.lovo.game.util;
import java.awt.MediaTracker;
import com.lovo.game.role.Fire;
import com.lovo.game.role.GameMap;
import com.lovo.game.role.ZhaoYun;
public class TrackerInit {

public static void initImage(MediaTracker tracker){
//初始化地圖圖片
GameMap.mapImg = CutImage.getSingleImage("image/map.jpg", tracker);

//趙雲
ZhaoYun.zyImage = CutImage.cutOneImage("image/boss/playSpear.png",18, 236, 134,tracker);
//火
Fire.fireImage = CutImage.cutOneImage("image/fireImg.png", 6, 283, 161,tracker);
try {
//0組的圖片全部等待載入完畢後,在顯示
tracker.waitForID(0);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package com.lovo.game.util;

import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.image.CropImageFilter;
import java.awt.image.FilteredImageSource;
import java.awt.image.ImageProcer;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
public class CutImage {

public static Image[][] cutManyImage(String filePath, int row, int col,
int imageWidth, int imageHight,MediaTracker tracker) {

Image[][] img = new Image[row][col];
ImageIcon imIcon = new ImageIcon(filePath);// 創建圖像數組對象
Image imgTemp = imIcon.getImage();// 創建源圖像
// 為源 圖象獲取ImageProcer源
ImageProcer sourceProcer = imgTemp.getSource();
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
// 創建圖片分割圖像對象,第一、二個參數為分割圖像起始坐標。後兩個參數為圖像大小
CropImageFilter cropImg = new CropImageFilter(j * imageWidth, i * imageHight,imageWidth, imageHight);

ImageProcer imgProcer = new FilteredImageSource(sourceProcer, cropImg);

img[i][j] = new JFrame().createImage(imgProcer);
tracker.addImage(img[i][j], 0);
}
}
return img;
}

public static Image[] cutOneImage(String filePath,int col,
int imageWidth, int imageHight,MediaTracker tracker) {

Image[] img = new Image[col];
ImageIcon imIcon = new ImageIcon(filePath);// 創建圖像數組對象
Image imgTemp = imIcon.getImage();// 創建源圖像
// 為源 圖象獲取ImageProcer源
ImageProcer sourceProcer = imgTemp.getSource();

for (int j = 0; j < col; j++) {
// 創建圖片分割圖像對象,第一、二個參數為分割圖像起始坐標。後兩個參數為圖像大小
CropImageFilter cropImg = new CropImageFilter(j * imageWidth, 0,imageWidth, imageHight);

ImageProcer imgProcer = new FilteredImageSource(sourceProcer, cropImg);

img[j] = new JFrame().createImage(imgProcer);
tracker.addImage(img[j], 0);
}

return img;
}

public static Image getSingleImage(String imgPath,MediaTracker tracker){
Image img = new ImageIcon(imgPath).getImage();
tracker.addImage(img, 0);
return img;
}
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package com.lovo.game.util;
import java.awt.Image;

public class MoveImageChange {

private int count;

private Image img;

private int frequency;

private int loopCount;

public MoveImageChange(int frequency){
this.frequency=frequency;
}

public MoveImageChange(int frequency,int count){
this.frequency=frequency;
this.count = count;
}

public Image imageChange(Image[] images){
if(img==null){//初始圖片為第一張圖片
img=images[0];
}
count++;
if(count>frequency){//當記數器大於頻率時
count=0;
loopCount++;

if(loopCount >= images.length){//圖片下標越界時
loopCount=0;
}
img=images[loopCount];
}

return img;
}

public void setLoopCount(int loopCount){
this.loopCount = loopCount;
}
}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package com.lovo.game.role;
import java.awt.Graphics;
import java.awt.Image;
import com.lovo.game.util.MoveImageChange;

public class ZhaoYun {

public static Image[] zyImage;

private int x =600;

private int y =300;

private int width =200;

private int height =130;

private MoveImageChange moveChange = new MoveImageChange(3);

public void drawImage(Graphics memoryGraphics){
Image img = moveChange.imageChange(zyImage);
memoryGraphics.drawImage(img,this.x,this.y,this.width,this.height,null);

『捌』 Java實現的趣味游戲

連連看java源代碼
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class lianliankan implements ActionListener
{
JFrame mainFrame; //主面板
Container thisContainer;
JPanel centerPanel,southPanel,northPanel; //子面板
JButton diamondsButton[][] = new JButton[6][5];//游戲按鈕數組
JButton exitButton,resetButton,newlyButton; //退出,重列,重新開始按鈕
JLabel fractionLable=new JLabel("0"); //分數標簽
JButton firstButton,secondButton; //分別記錄兩次被選中的按鈕
int grid[][] = new int[8][7];//儲存游戲按鈕位置
static boolean pressInformation=false; //判斷是否有按鈕被選中
int x0=0,y0=0,x=0,y=0,fristMsg=0,secondMsg=0,validateLV; //游戲按鈕的位置坐標
int i,j,k,n;//消除方法控制
public void init(){
mainFrame=new JFrame("JKJ連連看");
thisContainer = mainFrame.getContentPane();
thisContainer.setLayout(new BorderLayout());
centerPanel=new JPanel();
southPanel=new JPanel();
northPanel=new JPanel();
thisContainer.add(centerPanel,"Center");
thisContainer.add(southPanel,"South");
thisContainer.add(northPanel,"North");
centerPanel.setLayout(new GridLayout(6,5));
for(int cols = 0;cols < 6;cols++){
for(int rows = 0;rows < 5;rows++ ){
diamondsButton[cols][rows]=new JButton(String.valueOf(grid[cols+1][rows+1]));
diamondsButton[cols][rows].addActionListener(this);
centerPanel.add(diamondsButton[cols][rows]);
}
}
exitButton=new JButton("退出");
exitButton.addActionListener(this);
resetButton=new JButton("重列");
resetButton.addActionListener(this);
newlyButton=new JButton("再來一局");
newlyButton.addActionListener(this);
southPanel.add(exitButton);
southPanel.add(resetButton);
southPanel.add(newlyButton);
fractionLable.setText(String.valueOf(Integer.parseInt(fractionLable.getText())));
northPanel.add(fractionLable);
mainFrame.setBounds(280,100,500,450);
mainFrame.setVisible(true);
}
public void randomBuild() {
int randoms,cols,rows;
for(int twins=1;twins<=15;twins++) {
randoms=(int)(Math.random()*25+1);
for(int alike=1;alike<=2;alike++) {
cols=(int)(Math.random()*6+1);
rows=(int)(Math.random()*5+1);
while(grid[cols][rows]!=0) {
cols=(int)(Math.random()*6+1);
rows=(int)(Math.random()*5+1);
}
this.grid[cols][rows]=randoms;
}
}
}
public void fraction(){
fractionLable.setText(String.valueOf(Integer.parseInt(fractionLable.getText())+100));
}
public void reload() {
int save[] = new int[30];
int n=0,cols,rows;
int grid[][]= new int[8][7];
for(int i=0;i<=6;i++) {
for(int j=0;j<=5;j++) {
if(this.grid[i][j]!=0) {
save[n]=this.grid[i][j];
n++;
}
}
}
n=n-1;
this.grid=grid;
while(n>=0) {
cols=(int)(Math.random()*6+1);
rows=(int)(Math.random()*5+1);
while(grid[cols][rows]!=0) {
cols=(int)(Math.random()*6+1);
rows=(int)(Math.random()*5+1);
}
this.grid[cols][rows]=save[n];
n--;
}
mainFrame.setVisible(false);
pressInformation=false; //這里一定要將按鈕點擊信息歸為初始
init();
for(int i = 0;i < 6;i++){
for(int j = 0;j < 5;j++ ){
if(grid[i+1][j+1]==0)
diamondsButton[i][j].setVisible(false);
}
}
}
public void estimateEven(int placeX,int placeY,JButton bz) {
if(pressInformation==false) {
x=placeX;
y=placeY;
secondMsg=grid[x][y];
secondButton=bz;
pressInformation=true;
}
else {
x0=x;
y0=y;
fristMsg=secondMsg;
firstButton=secondButton;
x=placeX;
y=placeY;
secondMsg=grid[x][y];
secondButton=bz;
if(fristMsg==secondMsg && secondButton!=firstButton){
xiao();
}
}
}
public void xiao() { //相同的情況下能不能消去。仔細分析,不一條條注釋
if((x0==x &&(y0==y+1||y0==y-1)) || ((x0==x+1||x0==x-1)&&(y0==y))){ //判斷是否相鄰
remove();
}
else{
for (j=0;j<7;j++ ) {
if (grid[x0][j]==0){ //判斷第一個按鈕同行哪個按鈕為空
if (y>j) { //如果第二個按鈕的Y坐標大於空按鈕的Y坐標說明第一按鈕在第二按鈕左邊
for (i=y-1;i>=j;i-- ){ //判斷第二按鈕左側直到第一按鈕中間有沒有按鈕
if (grid[x][i]!=0) {
k=0;
break;
}
else{ k=1; } //K=1說明通過了第一次驗證
}
if (k==1) {
linePassOne();
}
}
if (y<j){ //如果第二個按鈕的Y坐標小於空按鈕的Y坐標說明第一按鈕在第二按鈕右邊
for (i=y+1;i<=j ;i++ ){ //判斷第二按鈕左側直到第一按鈕中間有沒有按鈕
if (grid[x][i]!=0){
k=0;
break;
}
else { k=1; }
}
if (k==1){
linePassOne();
}
}
if (y==j ) {
linePassOne();
}
}
if (k==2) {
if (x0==x) {
remove();
}
if (x0<x) {
for (n=x0;n<=x-1;n++ ) {
if (grid[n][j]!=0) {
k=0;
break;
}
if(grid[n][j]==0 && n==x-1) {
remove();
}
}
}
if (x0>x) {
for (n=x0;n>=x+1 ;n-- ) {
if (grid[n][j]!=0) {
k=0;
break;
}
if(grid[n][j]==0 && n==x+1) {
remove();
}
}
}
}
}
for (i=0;i<8;i++ ) { //列
if (grid[i][y0]==0) {
if (x>i) {
for (j=x-1;j>=i ;j-- ) {
if (grid[j][y]!=0) {
k=0;
break;
}
else { k=1; }
}
if (k==1) {
rowPassOne();
}
}
if (x<i) {
for (j=x+1;j<=i;j++ ) {
if (grid[j][y]!=0) {
k=0;
break;
}
else { k=1; }
}
if (k==1) {
rowPassOne();
}
}
if (x==i) {
rowPassOne();
}
}
if (k==2){
if (y0==y) {
remove();
}
if (y0<y) {
for (n=y0;n<=y-1 ;n++ ) {
if (grid[i][n]!=0) {
k=0;
break;
}
if(grid[i][n]==0 && n==y-1) {
remove();
}
}
}
if (y0>y) {
for (n=y0;n>=y+1 ;n--) {
if (grid[i][n]!=0) {
k=0;
break;
}
if(grid[i][n]==0 && n==y+1) {
remove();
}
}
}
}
}
}
}
public void linePassOne(){
if (y0>j){ //第一按鈕同行空按鈕在左邊
for (i=y0-1;i>=j ;i-- ){ //判斷第一按鈕同左側空按鈕之間有沒按鈕
if (grid[x0][i]!=0) {
k=0;
break;
}
else { k=2; } //K=2說明通過了第二次驗證
}
}
if (y0<j){ //第一按鈕同行空按鈕在與第二按鈕之間
for (i=y0+1;i<=j ;i++){
if (grid[x0][i]!=0) {
k=0;
break;
}
else{ k=2; }
}
}
}
public void rowPassOne(){
if (x0>i) {
for (j=x0-1;j>=i ;j-- ) {
if (grid[j][y0]!=0) {
k=0;
break;
}
else { k=2; }
}
}
if (x0<i) {
for (j=x0+1;j<=i ;j++ ) {
if (grid[j][y0]!=0) {
k=0;
break;
}
else { k=2; }
}
}
}
public void remove(){
firstButton.setVisible(false);
secondButton.setVisible(false);
fraction();
pressInformation=false;
k=0;
grid[x0][y0]=0;
grid[x][y]=0;
}
public void actionPerformed(ActionEvent e) {
if(e.getSource()==newlyButton){
int grid[][] = new int[8][7];
this.grid = grid;
randomBuild();
mainFrame.setVisible(false);
pressInformation=false;
init();
}
if(e.getSource()==exitButton)
System.exit(0);
if(e.getSource()==resetButton)
reload();
for(int cols = 0;cols < 6;cols++){
for(int rows = 0;rows < 5;rows++ ){
if(e.getSource()==diamondsButton[cols][rows])
estimateEven(cols+1,rows+1,diamondsButton[cols][rows]);
}
}
}
public static void main(String[] args) {
lianliankan llk = new lianliankan();
llk.randomBuild();
llk.init();
}
}

//old 998 lines
//new 318 lines
請採納答案,支持我一下。

『玖』 java游戲怎麼安裝,怎麼打開,在哪裡可以下載java游戲

JAVA游戲、軟體安裝方法:
1、首先把要安裝的軟體或游戲文件(文件格式為Jar,通常顯示圖標為壓縮文件,但不可解壓,否則無法安裝)通過數據線或者通過手機藍牙上傳到手機里,或者記憶卡里.最好新建一個文件夾,比如「game」或「Java程序文件」。
2、從手機工具箱進入文件管理欄目,找到你新建的游戲或軟體存放的文件夾,開啟後找到要安裝的游戲或軟體,按手機左軟鍵,就會提示安裝。
3、等待片刻,提示安裝完畢打開Java,就可運行游戲和軟體了.
4、有的手機需要將jar和jad文件一並下載復制到手機中才可安裝。
5、不是每款Java游戲或軟體,手機都能支持,所以要多找多試。
http://www.gamezero.cn/這個手機游戲網站非常好

閱讀全文

與Gamejava相關的資料

熱點內容
linuxtab輸入 瀏覽:932
小說網盤資源 瀏覽:502
全免費影視投屏網站 瀏覽:250
娘娘懷孕快生了忍著不生 瀏覽:804
git拉取代碼的命令 瀏覽:993
程序員節西安市 瀏覽:687
單片機的閃燈 瀏覽:965
phpmime映射 瀏覽:583
關鍵特徵分析python 瀏覽:992
linux粘滯位 瀏覽:137
安卓如何把備忘錄調成黑色 瀏覽:862
dhcp伺服器手動分配ip地址 瀏覽:308
阿里雲國內伺服器數量 瀏覽:455
壓縮機安全裕度 瀏覽:226
android交叉編譯環境 瀏覽:775
美團雲伺服器質量怎麼樣 瀏覽:396
蘋果手機游戲解壓包怎麼安裝 瀏覽:446
java程序員面試流程 瀏覽:681
遼寧圖片加密軟體地址 瀏覽:932
程序員35後應該學些啥技術 瀏覽:724