-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathREADME.html
172 lines (131 loc) · 6.54 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<html>
<head>
<title>Ludus - Readme</title>
<style>
body { padding:32px; background:beige; }
pre { font-size:15px; width:640px; margin:auto; color:#664422; }
a { color:red; text-decoration:none; }
a:hover { text-decoration:underline; }
</style>
</head>
<body>
<pre>
LUDUS HTML5 Platformer Game Starter Kit for Windows8 Store
LLLL UUUU UUUU DDDDDDD UUUU UUUU SSSSSSSSSS
LLLL UUUU UUUU DDDDDDDDD UUUU UUUU SSSSSSSSSS
LLLL UUUU UUUU DDDD DDDD UUUU UUUU SSSS
LLLL UUUU UUUU DDDD DDDD UUUU UUUU SSSSSSSSSS
LLLL UUUU UUUU DDDD DDDD UUUU UUUU SSSSSSSSSS
LLLL UUUU UUUU DDDD DDDD UUUU UUUU SSSS
LLLLLLLLLL UUUUUUUUUU DDDDDDDDD UUUUUUUUUU SSSSSSSSSS
LLLLLLLLLL UUUUUUUUUU DDDDDDD UUUUUUUUUU SSSSSSSSSS
by Christer (McFunkypants) Kaitila <a href='http://mcfunkypants.com'>http://mcfunkypants.com</a>
Source:
<a href='https://github.com/mcfunkypants/ludus'>https://github.com/mcfunkypants/ludus</a>
Demos:
<a href='http://www.mcfunkypants.com/ludus'>http://www.mcfunkypants.com/ludus</a>
Welcome to Ludus, brave adventurer!
Ludus is a dirt-simple game engine that uses html5 canvas.
It was designed specifically for mario/sonic style platformer
games but could be used for any genre with minimal changes.
It boasts great performance, and requires only free tools.
The word Ludus means PLAY/GAME/TRAINING in latin. The Ludus engine
is designed to be a great way to learn to make games.
Sure, there are bigger and more complex game engines.
This one is designed to be easy to play around with.
Why? It was created to run real-world games that have a beginning,
middle, and end. It was optimized to run on less powerful systems
and touch-screen tablets. It is simple, but goes beyond the
level of a "tech demo" to encapsulate all the required functionality
you might need to make a polished game, such as GUI and sound.
PLAYING THE EXAMPLE GAMES
<a href='http://mcfunkypants.com/RubbaRabbit/'><img src='screenshots/RubbaRabbit.png' alt='Rubba Rabbit'></a> <a href='http://mcfunkypants.com/Gwendolynn/'><img src='screenshots/Gwendolynn.png' alt='gwendolynn the Lionhearted'></a>
There are two example games:
Rubba Rabbit, a bouncy, fast, bright platformer, and
Gwendolynn the Lionhearted, a dark, dangerous metroidvania.
<iframe width="640" height="360" src="http://www.youtube.com/embed/1DftXvXFTl8" frameborder="0" allowfullscreen></iframe>
Both games are available for play online in any browser
as well as a download on the Windows 8 store.
Play them in your web browser here:
<a href='http://mcfunkypants.com/RubbaRabbit/'>http://mcfunkypants.com/RubbaRabbit/</a>
<a href='http://mcfunkypants.com/Gwendolynn/'>http://mcfunkypants.com/Gwendolynn/</a>
Download the apps from the Windows 8 Store here:
<a href='http://mcfunkypants.com/rr/'>http://mcfunkypants.com/rr/</a>
<a href='http://mcfunkypants.com/g/'>http://mcfunkypants.com/g/</a>
You can also run the index.html files on a localhost
webserver (they have to be run using a web server due to
browser security sandboxing).
Finally, if you wish you can install the store apps by
right-clicking the .ps1 files inside a subfolder of
"apppackages" (if you are using an administrator account).
IT'S POSSIBLE TO MAKE A GAME USING LUDUS IN A WEEKEND.
You could make your own game just by changing the artwork:
it is possible to make a new game without ever touching a line
of code. All you would need to do is modify the .png and .mp3
art assets as well as the level#.js level data files.
The best tool to create in-game worlds is TILED
(<a href='http://www.mapeditor.org'>www.mapeditor.org</a>) which exports data in .json format.
Check out the example .tmx source files and see if you can
make your own game! Once you've made a level, export as .json
and then run the _buildlevels.bat file to convert JSON
to JSONP data to a new level#.js file.
The one important thing to remember is that each layer is
important. The order matters. The bottom-most layer is for
regular world tiles that the player will collide with. The
rest are for pickups, bouncy platforms, dangerous spikes,
and so on.
Additionally, you should modify the game settings in the
MAP MENU -> MAP PROPERTIES dialog. Gravity, speed and
the player's starting position are all stored there.
HACKING THE SOURCE CODE
The only source code file you will want to modify,
if you choose to start coding, is ludus.js. Inside,
you'll notice all sorts of variables at the top which you
can modify to your heart's content. Note that some
of these variables are overwritten by whatever is defined
inside the level data.
With regard to the structure of the code, the most important
thing to know is that the game is controlled by STATE objects.
Each state (title screen, in-game, and between level transitions)
is a class object that has a .setup(), .update() and .draw()
function. You could add new states for things like boss battles,
inventory screens or a high score table.
See these class constructors:
function TitleScreenState()
function LevelTransitionScreenState()
function PlayState()
HAVE FUN!
Christer Kaitila
<a href='http://twitter.com/McFunkypants'>@McFunkypants on twitter</a>
<a href='http://www.mcfunkypants.com'>http://www.mcfunkypants.com</a>
CREDITS:
I gratefully acknowledge the following open source projects:
JAWSJS canvas engine by Ippa Lix (LGPL license)
- Source: https://github.com/ippa/jaws
- Demos and documentation: http://www.jawsjs.com
HOWLERJS sound engine by James Simpson (MIT license)
- Source: (https://github.com/goldfire/howler.js)
- Demos and documentation: http://www.howlerjs.com
TWEENJS engine by sole, mrdoob, et al (MIT license)
- Source and demos: https://github.com/sole/tween.js
TILED map editor by Thorbjørn Lindeijer
- Source: https://github.com/bjorn/tiled
- Download: http://www.mapeditor.org
Informal summary of licenses: you can use/modify ludus.js
for any purpose, free or commercial, and do not have to
make your project open source. Enjoy! Please give credit.
The artwork in the example games is CC-BY (attribution)
Please refer to the main menu credits button for details.
If you reuse these assets, give credit - they deserve it!
Gwendolynn World Tiles: Richard "Jetrel" Kettering
Gwendolynn World Tiles: Carl "Surt" Olsson
Gwendolynn Characters: Richard "Jetrel" Kettering
Gwendolyn Music: Zero Project
Rubba Rabbit World Tiles: Carl "Surt" Olsson
Rubba Rabbit Character: Stephen "Redshrike" Challener
Rubba Rabbit Music: Christer "McFunkypants" Kaitila
Pickups (fruit/treasure) icons: Henrique "7Soul" Lazarini
GUI, Particles, other art: Christer "McFunkypants" Kaitila
</pre>
</body>
</html>