Mercurial > molko
comparison README.md @ 594:e070fdcc592b
misc: various cleanups
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 24 Mar 2023 15:15:31 +0100 |
parents | e1fa1b867281 |
children |
comparison
equal
deleted
inserted
replaced
593:f9e85d0aca74 | 594:e070fdcc592b |
---|---|
1 Molko's Engine | 1 Molko's Engine |
2 ============== | 2 ============== |
3 | 3 |
4 The Molko's Engine is a C and framework to write 2D RPG games in a portable | 4 The Molko's Engine is a C framework to write 2D RPG games in a portable manner. |
5 manner. It is designed in mind to be flexible, simple and convenient to use. | 5 It is designed in mind to be flexible, simple and convenient to use. |
6 | 6 |
7 It has the following features: | 7 It has the following features: |
8 | 8 |
9 - Written in C99, | 9 - Written in C23, |
10 - Portable (Windows, macOS and UNIX likes systems), | 10 - Portable (Windows, macOS and UNIX likes systems), |
11 - Simple, flexible, | 11 - Simple, flexible, |
12 - Well documented, | 12 - Well documented, |
13 - Virtual file system support. | 13 - Virtual file system support. |
14 - Usable in both C or Javascript. | |
15 - Can embed resources using `mlk-bcc`. | 14 - Can embed resources using `mlk-bcc`. |
16 | |
17 Javascript quick startup | |
18 ------------------------ | |
19 | |
20 The `mlk-run` executable exposes the Javascript API and start a game from a | |
21 directory or a .mlk file (which is a .zip file with a .mlk extension). | |
22 | |
23 Hello world in Javascript: | |
24 | |
25 mkdir superluigi | |
26 | |
27 Add the following content in superluigi/main.js: | |
28 | |
29 ```js | |
30 var w = new Window("Super Luigi, number one", 640, 480); | |
31 var run = true; | |
32 | |
33 while (run) { | |
34 var ev; | |
35 | |
36 while ((ev = Event.poll())) { | |
37 switch (ev.type) { | |
38 case Event.Type.QUIT: | |
39 run = false; | |
40 break; | |
41 default: | |
42 break; | |
43 } | |
44 | |
45 Painter.color = 0xFFFFFFFF; | |
46 Painter.clear(); | |
47 Painter.present(); | |
48 } | |
49 } | |
50 ``` | |
51 | |
52 Finally run the game using `mlk-run superluigi`. | |
53 | |
54 You can also create a .zip file with a .mlk extension and `mlk-run` will be able | |
55 to use content from it. | |
56 | |
57 cd superluigi | |
58 zip -r ../superluigi.mlk . | |
59 cd .. | |
60 mlk-run superluigi.mlk | |
61 | 15 |
62 Documentation | 16 Documentation |
63 ------------- | 17 ------------- |
64 | 18 |
65 Use `mkdocs serve` inside the **doc** directory to see the user and developer | 19 Use the `doxygen` CMake target to build the documentation. |
66 documentation. | |
67 | 20 |
68 Author | 21 Author |
69 ------ | 22 ------ |
70 | 23 |
71 Molko's Engine was written by David Demelier <markand@malikania.fr>. | 24 Molko's Engine was written by David Demelier <markand@malikania.fr>. |