當前位置:首頁 » 網頁前端 » web游戲源碼
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

web游戲源碼

發布時間: 2022-03-08 07:34:49

① 怎麼運行 html5游戲的源代碼

1、打開任意一個網站,根據自己的需要選擇。

② 網頁游戲源碼的使用是什麼

第一步,安裝資料庫

方法1:打開sql企業管理器->新建資料庫->將DateBackUP目錄下的eie4.bak還原到新建的資料庫

第二步,修改注冊發送郵件email伺服器

打開inc目錄下的Jmail.asp->將17-21行的內容替換成你的email伺服器,否則新注冊用戶將收不到郵件。

第三步,修改數據備份及恢復資料

打開eiecjl目錄下的backup.asp->將默認的資料庫連接資料修改為你伺服器的連接字元串。

第四步,修改資料庫連接

打開inc目錄下的conn.asp->修改gConnection = "Provider=SQLOLEDB.1;Data Source=Richard;Initial Catalog=EIE_4;User。

第五步,注冊DLL

運行inc目錄下的RegDll.bat->提示eie4.dll注冊成功即可。

第六步,修改網站其它資料

使用網站默認管理員賬號和密碼登入網站進行其它修改。

③ 哪裡有網頁游戲的源碼可以下載

一般是flash的,或div\層+JS做的,flash可以找到一些源代碼,他們很摳門答案補充去cnzz,那裡有很多類型的網站源碼,不過有些需要自己調試一下才能用http://www.cnzz.cn答案補充那裡很多的,各種類型的都有WebForm/Winform

④ 用java web小游戲源代碼。期末結課老師讓做,急用,謝了

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;

@SuppressWarnings("serial")
public class MainClass extends JFrame {
ControlSnake control;

Toolkit kit;

Dimension dimen;

public static void main(String[] args) {
new MainClass("my snake");
}

public MainClass(String s) {
super(s);
control = new ControlSnake();
control.setFocusable(true);
kit = Toolkit.getDefaultToolkit();
dimen = kit.getScreenSize();

add(control);
setLayout(new BorderLayout());
setLocation(dimen.width / 3, dimen.height / 3);// dimen.width/3,dimen.height/3
setSize(FWIDTH, FHEIGHT);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setResizable(false);
setVisible(true);
}

public static final int FWIDTH = 315;

public static final int FHEIGHT = 380;
}

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.Random;

import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.Timer;

@SuppressWarnings("serial")
public class ControlSnake extends JPanel implements ActionListener {
Random rand;

ArrayList<Point> list, listBody;

String str, str1;

static boolean key;

int x, y, dx, dy, fx, fy, flag;

int snakeBody;

int speed;

public ControlSnake() {
snakeBody = 1;

str = "上下左右方向鍵控制 P鍵暫停...";
str1 = "現在的長度為:" + snakeBody;
key = true;
flag = 1;

speed = 700;
rand = new Random();
list = new ArrayList<Point>();
listBody = new ArrayList<Point>();

x = 5;
y = 5;
list.add(new Point(x, y));
listBody.add(list.get(0));

dx = 10;
dy = 0;

fx = rand.nextInt(30) * 10 + 5;// 2
fy = rand.nextInt(30) * 10 + 5;// 2

setBackground(Color.BLACK);
setSize(new Dimension(318, 380));

final Timer time = new Timer(speed, this);
time.start();

addKeyListener(new KeyAdapter(){
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == 37) {
dx = -10;
dy = 0;
} else if (e.getKeyCode() == 38) {
dx = 0;
dy = -10;
} else if (e.getKeyCode() == 39) {
dx = 10;
dy = 0;
} else if (e.getKeyCode() == 40) {
dx = 0;
dy = 10;
} else if (e.getKeyCode() == 80) {
if (flag % 2 == 1) {
time.stop();
}
if (flag % 2 == 0) {
time.start();
}
flag++;
}
}
});

}

public void paint(Graphics g) {
g.setColor(Color.WHITE);
g.fillRect(0, 0, 400, 400);
g.setColor(Color.DARK_GRAY);
g.drawLine(3, 3, 305, 3);
g.drawLine(3, 3, 3, 305);
g.drawLine(305, 3, 305, 305);
g.drawLine(3, 305, 305, 305);
g.setColor(Color.PINK);

for (int i = 0; i < listBody.size(); i++) {
g.fillRect(listBody.get(i).x, listBody.get(i).y, 9, 9);
}
g.fillRect(x, y, 9, 9);
g.setColor(Color.ORANGE);
g.fillRect(fx, fy, 9, 9);

g.setColor(Color.DARK_GRAY);
str1 = "現在的長度為:" + snakeBody;
g.drawString(str, 10, 320);
g.drawString(str1, 10, 335);
}

public void actionPerformed(ActionEvent e) {
x += dx;
y += dy;
if (makeOut() == false) {
JOptionPane.showMessageDialog(null, "重新開始......");

speed = 700;

snakeBody = 1;

x = 5;
y = 5;

list.clear();
list.add(new Point(x, y));
listBody.clear();
listBody.add(list.get(0));

dx = 10;
dy = 0;

}
addPoint(x, y);
if (x == fx && y == fy) {
speed = (int) (speed * 0.8);//速度增加參數
if (speed < 200) {
speed = 100;
}
fx = rand.nextInt(30) * 10 + 5;// 2
fy = rand.nextInt(30) * 10 + 5;// 2
snakeBody++;// 2
} // 2
repaint();
}

public void addPoint(int xx, int yy) {
// 動態的記錄最新發生的50步以內的移動過的坐標
// 並畫出最新的snakeBody
if (list.size() < 100) {//蛇身長度最長為100
list.add(new Point(xx, yy));
} else {
list.remove(0);
list.add(new Point(xx, yy));
}
if (snakeBody == 1) {
listBody.remove(0);
listBody.add(0, list.get(list.size() - 1));
} else {
listBody.clear();
if (list.size() < snakeBody) {
for (int i = list.size() - 1; i > 0; i--) {
listBody.add(list.get(i));
}
} else {
for (int i = list.size() - 1; listBody.size() < snakeBody; i--) {
listBody.add(list.get(i));
}
}
}
}

public boolean makeOut() {
if ((x < 3 || y < 3) || (x > 305 || y > 305)) {
return false;
}
for (int i = 0; i < listBody.size() - 1; i++) {
for (int j = i + 1; j < listBody.size(); j++) {
if (listBody.get(i).equals(listBody.get(j))) {
return false;
}
}
}
return true;
}
}

/*貪吃蛇代碼*/

⑤ 求一套網頁游戲網站源碼 要完整的帶後台的 ! 謝謝了!

完整代碼沒見過,什麼亂七八糟的一鍵端,各種修改過的網上一堆!我還以為是找網頁游戲運營平台呢

⑥ 網頁游戲的源代碼怎麼找

嗯,對於網頁游戲讓我失望的太多了,我玩了好多款,都感覺不行,人氣少,不公平,伺服器也不給力。如果你要是想找個好玩的游戲玩的話,可以去我現在玩的地方看看,那裡的游戲都還不錯,至少我覺得都比其他地方的好玩,你可以試玩下看看。
網址:www.bdc8.Com/yx.htm
【復制粘貼到瀏覽器即可】
。。。。。。

⑦ 傳奇網頁游戲源碼

嗯,玩網頁游戲的話,不妨去這里看看,我一直在這個平台上玩的,上面的網頁游戲比較不錯,全是網友評論最好的各大火爆網頁游戲,游戲人很多,畫面很漂亮的,但一點也不卡,新手有超級大禮包,有興趣去看看

網址:www.bdc8.Com/yx.htm
【復制粘貼到瀏覽器即可】
。。。。。。
。。。。

⑧ 網頁游戲的源碼怎麼獲得

單機的網頁游戲載入好後,在IE緩存中都會有文件的,後綴名是.swf 把他們復制出來雙擊用瀏覽器打開就可以了的 對了載入前先把IE緩存清除干凈會比較好找 我一般在樂趣網玩小游戲的。

⑨ 傾城網頁游戲源碼。。。。傾城網頁游戲源碼

嗯,要玩網頁游戲有興趣跟我一起去這里玩,這里網頁游戲 很火爆 ,裝備元寶什麼的 很容易 弄到,游戲也公平,伺服器也 給力 ,我玩了不下十多個平台,最後還是覺得這個平台頁游有意思,推薦你去 試玩下:^^

⑩ 誰有好玩一點的網頁游戲源碼

我有一個:摩爾庄園