Read this in other languages: English, Русский
See presentation (ru) here
On behalf of our entire team, we would like to say huge thanks to Vitaly Selishchev, our mentor, for his invaluable contribution to the project. In addition to the main duties of the mentor, Vitaly held online meetings for us, where he helped us solve problems that we encountered as we developed, Vitaly also conducted an online code review, where he pointed out our mistakes and suggested possible alternatives for writing code that would facilitate the development process for us. And even that's not all: at almost every online meeting, Vitaly showed us various OOP patterns and methods for solving classical problems related to the creation of project architecture.
Enchanted Towers is a medieval fantasy mobile game in which players compete by capturing and holding towers on a real map while casting spells on their smartphone screen or on real paper.
There are markers (towers) on the map, players must live to get to the towers in order to be able to capture them and subsequently set their defensive spells. Tower owners can thwart attackers from anywhere in the world by taking a picture of one of the available defensive spells with a unique effect on paper.
Enchantments and spells, improving the mage's skills:
The mage, having a certain set of spells (patterns), forms an enchantment on the canvass, then this enchantment is installed on the tower defense wall.
Attacker:
The attacker must guess the enchantment based on the list of elements used when enchanting this wall. The attacker must repeat the enchantment by drawing it with >= N%
overlap with what is set on the wall of defense. The attacker must be in close proximity to the tower to begin its capture.
Defender:
The defender to defend the tower during the attack can draw a special pattern on a piece of paper that will respond to a special defensive spell, then he loads it through the camera into our game. The pattern is matched to the defensive spell, and if the match is >= N%
correct, it triggers, and some action is performed on the attacking mages:
- Inverting the canvas to draw on the X-axis
- Inverting the canvas for drawing on the Y axis
- Phone vibration
Towers:
A tower can have multiple walls of defense. To capture it, you must destroy all defense walls one at a time.
- Registration / authorization
- Tower capture and defense session
- Session for installing enchantments on the walls of the tower
- Recognition of the contours of spells and substitution for existing templates
- Use the camera to capture pictures in high quality
- Image processing and contour selection
- Special effects of defensive spells: invert attacker's canvases vertically, horizontally and enable vibration on their devices.
Technology | Description |
---|---|
Android SDK | Game client + UI |
gRPC | Network communication |
Google Map API | Maps functionality |
PostgreSQL | Database |
JBcrypt | Passwords hashing (related to authentication service) |
Hibernate | Database ORM |
OpenCV (quickbirds) | Image recognition |
- Project builds and dependencies setup
- Game UI development
- Service for defensive enchantments creation
- Service of attacking protection walls
- Service of spectating tower attackers
- Authorization, registration and request interceptors (the latter are used to attach (client) and validate (server) GameSessionToken)
- Interaction functionality on the canvas
- Pattern matching: searching for patterns similar to the one drawn
- Service of attacking protection walls
- Service of spectating tower attackers
- Image recognition: getting and preprocessing a photo
- Service of defensive spells casting
- Spellbook drawing
- Connecting Google Maps API and processing interactions with the map
- Requesting and processing geolocation rights
- Drawing towers and player on the map and processing click events
- Request of towers coordinates at map start
- Connecting and configuring Hibernate and Database
- Authorization and registration
- Request interceptors for game session token transfer
Youtube gameplay video (click the image):
Enchanted Towers - gameplay footage
- PostgreSQL
- GRPC
- OpenCV (quickbirds)
- jts
- Google Maps API
- Hibernate ORM
- JWT
git clone https://github.com/Giga-Chad-LLC/Enchanted-Towers.git
- Building proto-models:
- Run task:
gradle :common:utils:build
- And then:
gradle :common:utils:SyncProtobufFiles :common:utils:SyncProtoGrpcDependencies
- Delete folder
/common/build/generated/source
- When rebuilding models, you must manually delete the previous folder with generated files
- Run task:
- Run the docker database image:
cd /docker && docker-compose up
- After that, the clients (target:
client.app
) are launched first, then the server (target:server
)