asset | ||
doc | ||
img | ||
AUTHORS.md | ||
codetower-20.blend | ||
codetower-21.blend | ||
codetower-22.blend | ||
codetower-23.blend | ||
codetower-25.blend | ||
codetower-27.blend | ||
codetower-33.blend | ||
codetower-34.blend | ||
codetower-35.blend | ||
codetower-36.blend | ||
codetower.png | ||
ct_cmd-exemple.py | ||
ct_cmd.py | ||
ct_comp.py | ||
ct_config.xml | ||
ct_doc.py | ||
ct_lib.py | ||
ct_map1.py | ||
ct.py | ||
IDEAS.md | ||
LICENSE | ||
README.md | ||
UML.xmi |
CodeTower
Code your tower ! (coding tower defense)
CodeTower is a Tower Defense coding game where the towers are driven by Python code.
Stop the minions waves with your favorite editing software !
It's a early prototype.
CodeTower is a open source software distributed under the terms of the GPLv3 license.
The game engine is open source : Blender / UPBGE.
Assets (3D models, sounds, icons) : Kenney and Kaylousberg.
Download
-
itch.io : itch.io / codetower
-
Source repository : https://forge.aeif.fr/phroy/codetower
-
Binaries repository (GNU/Linux and Windows) : www.phroy.org
Python script
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)
Tower commands
With your Python script, you can build, remove and upgrade your towers.
For each tower, you will be able to choose dynamically most appropriate techno (archer tower) or spell (mage tower).
-
Build a tower : ct_build (x, y, category, name, color, style)
- 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
- True : builded without error
- False : not builded (error)
- Exemple : ct_build(1,1, "Archer tower", "Tower #1",yellow,"round-A")
-
Remove a tower : ct_remove (x, y)
- x position (integer)
- y position (integer)