Tweng - DEV Contest - Current status 
Tags: pushercontest, react, node, javascript
Published: 2018-05-22 19:32:18

---
title: Tweng - DEV Contest - Current status 
published: true
tags: #pushercontest,#react,#node,#javascript
---

# Idea

A few months ago I started playing _The Witcher 3: Wild Hunt_ and instantly fell in love with it. The amount of high quality content that's available is simply insane. Not only the main story but also the hundreds of side quests provide an awesome experience. However, there's one in-game feature (or more, a game) that was so successful that it is currently ported to a standalone game: _Gwent: The Witcher Card Game_.

> Gwent is a turn-based card game between two players, with each game taking three rounds. Each player must play one card each turn from a deck of twenty-five to forty cards. The deck can contain a maximum of four different gold cards and six different silver cards. Gold and silver cards usually have more powerful abilities than bronze cards. Decks can contain a maximum of three copies of bronze cards. Each deck belongs to a faction that offers different play styles. Each faction has different "leaders," which function as Gold cards that can be played at any time, who each have individual abilities. As Gwent does not use a mana system like most traditional CCGs, card advantage is often what wins you the game.

> The goal is to win two of three rounds by playing cards and spells to gain points called "power" on the board. A player wins a round by having more points on board than their opponent. Rounds end when either both players pass to the next round, or when both players run out of cards. The first to win two out of three rounds wins.

- [_Gwent: The Witcher Card Game_ (Wikipedia)](https://en.wikipedia.org/wiki/Gwent:_The_Witcher_Card_Game#Gameplay)

And this is where I got my idea for the first ever DEV Contest. Even before I became aware that there will be a standalone _Gwent_ I had the urge of creating a clone using web technologies. Just for fun. But I never actually took action - until two weeks ago! Since then I spent everyday an hour or two on creating a clone I call: _Tweng_.

_Tweng_ isn't supposed to be a 100% clone, but the basic gameplay should be the same: turn-based card game between two players where each player controls an army with different attributes.

# What's Pusher doing?

I use Pusher to share _actions_ with a payload between the players in a channel. An action would be for example _playCard_ and it's payload is the card that's being played. Another would be _passRound_ to tell your opponent that you're passing this round.

# Current status

There is a client written in React and a Node back-end which uses Express (for API endpoints) and PostgreSQL (persisting channels and users).

This past weekend I worked a lot on _Tweng_ and was able to create a first playable version! However, there's still a lot of features missing that I would like to add. With some luck before the DEV Contest deadline, but most likely soon afterward.

What I really want to finish before the deadline is a proper mobile version. During development I tried to keep an eye on both desktop and mobile. But after some time I focused on desktop only to meet the deadline.

The matchmaking system is currently invite-based. That means you can create a channel and share the invite link with a friend. After your friend joined, you two are ready to play a game of _Tweng_!

So, here it is. A first glance at the current desktop version:

![Tweng screenshot][tweng]

As you can guess, UI design is hard! So, for now, I only provide a basic layout with some very cool free icons by [Smashicons](https://smashicons.com/).

# Plan for delivery

As I already said before, I am trying to add at least a proper mobile version before the deadline. Also, there are still some minor bugs that need to be fixed.

Anyway, that's all for now. Thanks for reading and good luck to everyone participating in the contest!


[tweng]: https://thepracticaldev.s3.amazonaws.com/i/ap3l4p049xetclerv0le.png