Skip to content

Commit a072ac6

Browse files
committed
Initial commit after project setup
0 parents  commit a072ac6

38 files changed

+153
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
monos.jar
3+
pkg/

.rvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rvm use jruby

DIARY.txt

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
DECEMBER 17, 2011
2+
3+
03:00
4+
Let's get this baby on GitHub!
5+
6+
02:55
7+
Have a basic build on Windows now. Going to forget about Windows
8+
for quite some time and get on to actual work ;-)
9+
10+
02:51
11+
For some reason I've wasted a lot of time getting the build to run
12+
on Windows properly. I wanted to have the Slick and LWJGL stuff in
13+
vendor but once packaged up, Windows is not playing ball. So into
14+
lib/ they go!
15+
16+
02:00
17+
contest starts

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
group :development do
2+
gem 'warbler'
3+
end

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Codename Monos
2+
==============
3+
4+
'Monos' (Greek for alone) is the codename for my as-yet undesigned Ludum Dare 22 entry.
5+
6+
It's being written in JRuby and uses Slick and LWJGL for the magic.
7+
8+
DIARY.txt contains an updated diary about my progress.
9+
10+
Scripts
11+
-------
12+
13+
* `bin/run` - Runs game under JRuby directly
14+
* `bin/build_jar` - Removes old jar file (if any) and builds a new jar for packaging or running
15+
* `bin/run_jar` - Runs the jar file with Java
16+
17+
Technologies
18+
------------
19+
20+
* JRuby 1.6.5
21+
* Warbler (packages into jar file)
22+
* Launch4j (creates packed .exe for Windows)
23+
* Jar Bundler (comes with Xcode - makes .app file for OS X from jar)
24+
25+
Directories
26+
-----------
27+
28+
* `bin` - scripts and game runner
29+
* `data` - game data, sounds, fonts, images, etc.
30+
* `lib` - game code plus slick and LWJGL libraries
31+
* `misc` - miscellaneously, currently just a Launch4j build file
32+
* `native` - native libraries for OS X, Linux and Windows

Rakefile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require 'warbler'
2+
Warbler::Task.new

bin/build_jar

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
rm monos.jar
3+
warble

bin/monos.rb

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
ROOT_DIR = File.expand_path('../..', __FILE__)
2+
$: << ROOT_DIR + "/lib"
3+
$: << ROOT_DIR + "/vendor"
4+
5+
p $:
6+
7+
# Need a different root when inside the jar, luckily $0 is "<script>" in that case
8+
RELATIVE_ROOT = $0['<'] ? 'monos/' : ''
9+
10+
require 'java'
11+
require 'lwjgl.jar'
12+
require 'slick.jar'
13+
14+
require 'monos_game'
15+
MonosGame.main

bin/run

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
ruby -J-Djava.library.path=native bin/monos.rb

bin/run_jar

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
java -Dorg.lwjgl.opengl.allowSoftwareOpenGL=true -Djava.library.path=native -jar monos.jar

data/bg.png

80.1 KB
Loading

lib/hiero.jar

375 KB
Binary file not shown.

lib/ibxm.jar

36.8 KB
Binary file not shown.

lib/jinput.jar

204 KB
Binary file not shown.

lib/jnlp.jar

6.88 KB
Binary file not shown.

lib/jogg-0.0.7.jar

6.39 KB
Binary file not shown.

lib/jorbis-0.0.15.jar

57.5 KB
Binary file not shown.

lib/lwjgl.jar

487 KB
Binary file not shown.

lib/monos_game.rb

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
java_import org.newdawn.slick.BasicGame
2+
java_import org.newdawn.slick.GameContainer
3+
java_import org.newdawn.slick.Graphics
4+
java_import org.newdawn.slick.Image
5+
java_import org.newdawn.slick.Input
6+
java_import org.newdawn.slick.SlickException
7+
java_import org.newdawn.slick.AppGameContainer
8+
9+
class MonosGame < BasicGame
10+
VIEWPORT_WIDTH = 640
11+
VIEWPORT_HEIGHT = 480
12+
13+
def render(container, graphics)
14+
@bg.draw(0, 0)
15+
graphics.draw_string("MONOS (ESCAPE TO EXIT)", 8, 450)
16+
end
17+
18+
def self.main
19+
app = AppGameContainer.new(new)
20+
app.set_display_mode(VIEWPORT_WIDTH, VIEWPORT_HEIGHT, false)
21+
app.set_target_frame_rate 120
22+
app.set_always_render true
23+
app.set_show_fps true
24+
app.start
25+
end
26+
27+
def initialize
28+
super("ArrowGame")
29+
end
30+
31+
def init(container)
32+
@bg = Image.new(RELATIVE_ROOT + 'data/bg.png')
33+
end
34+
35+
def update(container, delta)
36+
input = container.get_input
37+
container.exit if input.is_key_down(Input::KEY_ESCAPE)
38+
end
39+
end

lib/packulike.jar

20.9 KB
Binary file not shown.

lib/pedigree.jar

100 KB
Binary file not shown.

lib/scalar.jar

14.4 KB
Binary file not shown.

lib/slick-util.jar

93.7 KB
Binary file not shown.

lib/slick.jar

628 KB
Binary file not shown.

lib/tinylinepp.jar

90.7 KB
Binary file not shown.

misc/launch4j-windows.xml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<launch4jConfig>
2+
<dontWrapJar>false</dontWrapJar>
3+
<headerType>console</headerType>
4+
<jar>/Users/peter/Dropbox/dev/monos/monos.jar</jar>
5+
<outfile>/Users/peter/Sandbox/ld22/monos-windows/monos.exe</outfile>
6+
<errTitle></errTitle>
7+
<cmdLine></cmdLine>
8+
<chdir></chdir>
9+
<priority>normal</priority>
10+
<downloadUrl>http://java.com/download</downloadUrl>
11+
<supportUrl></supportUrl>
12+
<customProcName>false</customProcName>
13+
<stayAlive>false</stayAlive>
14+
<manifest></manifest>
15+
<icon></icon>
16+
<singleInstance>
17+
<mutexName>onlyonepleaseblah</mutexName>
18+
<windowTitle></windowTitle>
19+
</singleInstance>
20+
<jre>
21+
<path></path>
22+
<minVersion>1.6.0</minVersion>
23+
<maxVersion></maxVersion>
24+
<jdkPreference>preferJre</jdkPreference>
25+
<opt>-Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true</opt>
26+
</jre>
27+
<messages>
28+
<startupErr>An error occurred while starting the application.</startupErr>
29+
<bundledJreErr>This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.</bundledJreErr>
30+
<jreVersionErr>This application requires a Java Runtime Environment</jreVersionErr>
31+
<launcherErr>The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.</launcherErr>
32+
<instanceAlreadyExistsMsg>An application instance is already running.</instanceAlreadyExistsMsg>
33+
</messages>
34+
</launch4jConfig>

native/OpenAL32.dll

160 KB
Binary file not shown.

native/jinput-dx8.dll

30.5 KB
Binary file not shown.

native/jinput-raw.dll

28.5 KB
Binary file not shown.

native/libjinput-linux.so

10.4 KB
Binary file not shown.

native/libjinput-linux64.so

13.5 KB
Binary file not shown.

native/libjinput-osx.jnilib

47.9 KB
Binary file not shown.

native/liblwjgl.jnilib

628 KB
Binary file not shown.

native/liblwjgl.so

219 KB
Binary file not shown.

native/liblwjgl64.so

270 KB
Binary file not shown.

native/libopenal.so

297 KB
Binary file not shown.

native/lwjgl.dll

124 KB
Binary file not shown.

native/openal.dylib

251 KB
Binary file not shown.

0 commit comments

Comments
 (0)