codetower/README.md

63 lines
2.2 KiB
Markdown
Raw Normal View History

2022-02-24 13:15:41 +01:00
# CodeTower
2022-07-21 00:19:48 +02:00
**Code your tower ! (coding tower defense)**
2022-04-06 18:40:27 +02:00
2022-07-21 00:19:48 +02:00
CodeTower is a Tower Defense coding game where the towers are driven by Python code.
2022-04-06 18:40:27 +02:00
2022-07-21 00:19:48 +02:00
**Stop the minions waves with your favorite editing software !**
2022-04-26 11:29:37 +02:00
2022-07-21 00:19:48 +02:00
[![CodeTower - Gameplay](img/screen-04-ytb.png)](https://www.youtube.com/watch?v=snZaTSre8FA "CodeTower - Gameplay")
2022-04-26 11:46:41 +02:00
2022-04-07 19:04:26 +02:00
2022-07-21 00:19:48 +02:00
It's a early prototype.
CodeTower is a open source software distributed under the terms of the [GPLv3 license](https://www.gnu.org/licenses/gpl-3.0.html).
The game engine is open source : [Blender](https://blender.org) / [UPBGE](https://upbge.org).
Assets (3D models, sounds, icons) : [Kenney]( https://www.kenney.nl/ ) and [Kaylousberg](https://www.kaylousberg.com).
2022-04-06 18:40:27 +02:00
2022-04-06 22:18:26 +02:00
### Download
2022-04-06 18:40:27 +02:00
2022-07-21 00:19:48 +02:00
* itch.io : [itch.io / codetower](https://phroy.itch.io/codetower)
* Source repository (Gitlab) : https://gitlab.com/phroy/codetower
* Binaries repository (GNU/Linux and Windows) : [www.phroy.org](http://www.phroy.org/cloud/index.php/s/nyoWT6xMkxAJ9Pm)
### Python script
2022-04-26 11:15:43 +02:00
2022-07-21 00:19:48 +02:00
The Python script is the file **"ct_cmd.py"** (in the game folder), you have to edit it with your favorite editing software (Spyder, Emacs, Atom, ...).
### Map commands
The level points will be spent for build or upgrade. So you have to know your level before action.
* **Get your level : ct_level ()**
- Return your level (integer)
* **Time management (temporization) : ct_sleep (delay)**
- delay : duration in seconds (float)
2022-04-06 22:30:03 +02:00
2022-04-06 22:18:26 +02:00
### Tower commands
2022-04-06 22:44:36 +02:00
With your Python script, you can build, remove and upgrade your towers.
2022-04-06 22:44:59 +02:00
2022-04-06 22:44:36 +02:00
For each tower, you will be able to choose dynamically most appropriate techno (archer tower) or spell (mage tower).
2022-04-06 22:44:59 +02:00
2022-04-06 22:33:16 +02:00
* **Build a tower : ct_build (x, y, category, name, color, style)**
2022-04-06 22:30:03 +02:00
- x position (integer)
- y position (integer)
- category (string) : "Archer tower", "Mage tower" or "Barrack" (not implemented)
- name (string)
- color (RGB model) : purple, turquoise, magenta, orange, yellow, green, red or [R, G, B, 1]
- style : square or round and version (A,B or C), exemple : 'square-A'
- Return boolean flag
2022-04-06 22:43:24 +02:00
- True : builded without error
2022-04-06 22:33:16 +02:00
- False : not builded (error)
- Exemple : ct_build(1,1, "Archer tower", "Tower \#1",yellow,"round-A")
2022-04-06 22:18:26 +02:00
2022-04-06 22:33:16 +02:00
* **Remove a tower : ct_remove (x, y)**
2022-04-06 22:30:03 +02:00
- x position (integer)
- y position (integer)