I've released this so that you can get a feel for what you are going to be working with. You will only *have* to code with this in about 2 weeks time but I would suggest familiarizing yourself with the code before that time.
There are Java-Docs of the API in the doc/ directory (it's mostly done though I still have to complete one or two things, ask on the forum if a function isn't documented). I suggest (i.e. i really really really suggest) you read the documentation for the Game class as it is the backbone of the game.
The documentation for JOGL is available on Vula but this is mainly for interests sake.
All source files are in the src/ directory
=============================================================================
How to play
=============================================================================
This is just a toy game, there is no winning conditions. If you shoot something that is not a wall it'll be destroyed.
You have to restart the game to restart. You are obviously required to change this (see the specifications on Vula)
NOTE: Sometimes the game creates you on top of an asteroid. In this case you will not be able to move. Restart that game. You need to address this in your final game.
Controls:
UP, DOWN, LEFT, RIGHT - move
mouse position - turn to mouse
SPACE or left mouse button - fire weapon
=============================================================================
How to setup, compile and run
=============================================================================
You can use an IDE (Eclipse, soon to be NetBeans and JCreator as well) or you can use the command line
Please you have the correct version of the API depending on your Operating System. The only difference is the Eclipse .classpath file and the "jogl-1.1.1-linux-i586/" and "jogl-1.1.1-windows-i586/" and "jogl-1.1.1-windows-amd64/" folders that contain the Operating System specific libraries
------------------------------------------------------------------------------
Eclipse 3.5 (Galileo):
------------------------------------------------------------------------------
Extract the files to the desired directory
Open Eclipse (if it asks to set a workspace just click OK)
If you are not so already, go to workbench (the arrow icon on the left)
Click File->Import...
Select "Existing Project into Workspace" and click next
Select "Browse" next to the "Select root directory" then click browse
Find the directory that you extracted the files to and click OK
Select "Copy Projects into Workspace" if you want it to copy the files to your workspace directory (obviously...)
Click Finish and you're done
------------------------------------------------------------------------------
Eclipse (complicated instructions if the above one doesn't work):
------------------------------------------------------------------------------
Extract the files to the desired directory
Open Eclipse (if it asks to set a workspace just click OK)
If you are not so already, go to workbench (the arrow icon on the left)
Click File->New->Project...
Click Java Project (should be the first option) and click Next
Select "Create project from existing source" then click browse
Find the directory that you extracted the files to and click OK
Type in the name "SurvivalGame" for your project name. Nameing it anything else will cause the project not to work (since the classpath variables will be wrong).
You can rename the project later by selecting the project and pressing F2 (this will adjust the classpaths accordingly)
------------------------------------------------------------------------------
Eclipse - Setting up the correct JDK
------------------------------------------------------------------------------
If this is your first time using eclipse the incorrect java JRE compliance might be set and there might be an error with some of the newer Java features. Like the generic classes (like Vector) here is how to fix it.
Right click your project.
Select Properties.
Select Java Compiler on the left
Select the tick-box labeled "Enable project specific options"
To the left of Compiler Compliance level there is a drop-down box
Select 5.0 or higher
Click OK (and yes if it prompts you)
From here on it should be working and you can run it as per normal for Eclipse Java applications
Again, post on the forums if you have a problem. Please be sure to specify exactly what is wrong and provide any relevant information that I might need.
------------------------------------------------------------------------------
NetBeans 6.7:
------------------------------------------------------------------------------
Extract the files to the desired directory
Open NetBeans
Click File->Import Project->Eclipse Project...
Click the "Import Project ignoring Project Dependencies" radio button
For "Project to Import:" choose the directory where you extracted the files to for the
For "Destination Folder:" choose the directory where you want your project
Click Finish
You should see the "SurvivalGame" project on the left now.
Right click on it and click "Properties"
Click on the "Run" tab on the left
In the textfield next to "VM Options" enter in ????
Click "OK" and you are ready to build and run
------------------------------------------------------------------------------
Command Line (Linux only):
------------------------------------------------------------------------------
Extract these file to the desired directory,
cd into the directory
in the main directory type "make" to compile
type "./run.sh" to run
I can only guarantee this works in the Senior Labs. Though, I will try my best to resolve any issues you might have on the forums.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
使用 JOGL 制作的基本 2D 游戏引擎,旨在让学生学习游戏编程的基础知识。 文件 2D-JOGL-Game-Engine-master.zip 包含以下条目。 .gitignore//from ww w . j a va 2s . c om OS_specific_files/linux-amd64/Makefile OS_specific_files/linux-amd64/libs/jogl-1.1.1-linux-amd64/CHANGELOG.txt OS_specific_files/linux-amd64/libs/jogl-1.1.1-linux-amd64/COPYRIGHT.txt OS_specific_files/linux-amd64/libs/jogl-1.1.1-linux-amd64/LICENSE-JOGL-1.1.1.txt OS_specific_files/linux-amd64/libs/jogl-1.1.1-linux-amd64/README.txt OS_specific_files/linux-amd64/libs/jogl
资源详情
资源评论
资源推荐
收起资源包目录
2D JOGL 游戏引擎Java 代码 (152个子文件)
jogl.dll 343KB
jogl.dll 308KB
jogl_cg.dll 128KB
jogl_cg.dll 112KB
gluegen-rt.dll 20KB
jogl_awt.dll 20KB
jogl_awt.dll 9KB
gluegen-rt.dll 8KB
spaceship_sm.gif 81KB
spaceship_sm0.gif 1KB
spaceship_sm2.gif 1KB
spaceship_sm1.gif 1KB
spaceship_sm54.gif 1KB
spaceship_sm4.gif 1KB
spaceship_sm8.gif 1KB
spaceship_sm13.gif 1KB
spaceship_sm70.gif 1KB
spaceship_sm5.gif 1KB
spaceship_sm64.gif 1KB
spaceship_sm31.gif 1KB
spaceship_sm10.gif 1KB
spaceship_sm16.gif 1KB
spaceship_sm67.gif 1KB
spaceship_sm20.gif 1KB
spaceship_sm38.gif 1KB
spaceship_sm41.gif 1KB
spaceship_sm3.gif 1KB
spaceship_sm71.gif 1KB
spaceship_sm62.gif 1KB
spaceship_sm46.gif 1KB
spaceship_sm35.gif 1KB
spaceship_sm9.gif 1KB
spaceship_sm59.gif 1KB
spaceship_sm7.gif 1KB
spaceship_sm37.gif 1KB
spaceship_sm12.gif 1KB
spaceship_sm11.gif 1KB
spaceship_sm52.gif 1KB
spaceship_sm23.gif 1KB
spaceship_sm44.gif 1KB
spaceship_sm66.gif 1KB
spaceship_sm39.gif 1KB
spaceship_sm65.gif 1KB
spaceship_sm61.gif 1KB
spaceship_sm69.gif 1KB
spaceship_sm63.gif 1KB
spaceship_sm21.gif 1KB
spaceship_sm58.gif 1KB
spaceship_sm15.gif 1KB
spaceship_sm30.gif 1KB
spaceship_sm19.gif 1KB
spaceship_sm47.gif 1KB
spaceship_sm40.gif 1KB
spaceship_sm49.gif 1KB
spaceship_sm51.gif 1KB
spaceship_sm53.gif 1KB
spaceship_sm25.gif 1KB
spaceship_sm57.gif 1KB
spaceship_sm68.gif 1KB
spaceship_sm27.gif 1KB
spaceship_sm60.gif 1KB
spaceship_sm55.gif 1KB
spaceship_sm42.gif 1KB
spaceship_sm50.gif 1KB
spaceship_sm32.gif 1KB
spaceship_sm6.gif 1KB
spaceship_sm17.gif 1KB
spaceship_sm45.gif 1KB
spaceship_sm14.gif 1KB
spaceship_sm43.gif 1KB
spaceship_sm48.gif 1KB
spaceship_sm24.gif 1KB
spaceship_sm29.gif 1KB
spaceship_sm22.gif 1KB
spaceship_sm34.gif 777B
spaceship_sm33.gif 773B
spaceship_sm36.gif 768B
spaceship_sm28.gif 764B
spaceship_sm26.gif 764B
spaceship_sm56.gif 762B
spaceship_sm18.gif 750B
.gitignore 57B
Userguide.html 37KB
Userguide.html 37KB
Userguide.html 37KB
Userguide.html 37KB
jogl.jar 1.07MB
jogl.jar 1.07MB
jogl.jar 1.07MB
jogl.jar 1.07MB
gluegen-rt.jar 18KB
gluegen-rt.jar 18KB
gluegen-rt.jar 18KB
gluegen-rt.jar 18KB
Game.java 38KB
GameObject.java 15KB
SurvivalGame.java 13KB
AsteroidGame.java 12KB
GameRenderer.java 6KB
PhysicalObject.java 4KB
共 152 条
- 1
- 2
南歌子™
- 粉丝: 0
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0