# DRTS Game - Master The Art Of War

**URL:** <https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534>\
**Category:** Show and Tell\
**Created:** [July 21, 2018, 8:35am UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534 "2018-07-21T08:35:43Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Viir](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/viir/32/4103_2.png) [@Viir](https://discourse.elm-lang.org/u/Viir)\
**Post date:** [July 21, 2018, 8:35am UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534/1 "2018-07-21T08:35:43Z")

</div>

What I am showing here is a video game made with Elm.  
It is a real-time strategy game, you can play the game with bots or with other people online:

[https://play.drtsgame.com](https://play.drtsgame.com)

This project is work in progress, so not polished yet.

To give an overview of the tools used:

- So far, the client is entirely coded in Elm, there was no need for ports.
- On the server, the Elm app (Game Mechanics) is hosted in an [ASP.NET](http://ASP.NET) Core app which handles the interfacing (HTTP, Persistence, Auth)

---

<div class="post-metadata">

**Author:** ![mattpiz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/mattpiz/32/860_2.png) [@mattpiz](https://discourse.elm-lang.org/u/mattpiz)\
**Post date:** [July 21, 2018, 1:49pm UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534/2 "2018-07-21T13:49:20Z")

</div>

I just tested the tutorial, it’s really nice!

---

<div class="post-metadata">

**Author:** ![Viir](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/viir/32/4103_2.png) [@Viir](https://discourse.elm-lang.org/u/Viir)\
**Post date:** [July 21, 2018, 2:27pm UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534/3 "2018-07-21T14:27:43Z")

</div>

Thank you @mattpiz for the elm-pointer-events package. I used it in this game to implement the touch screen support.

---

<div class="post-metadata">

**Author:** ![rtfeldman](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/rtfeldman/32/50_2.png) [@rtfeldman](https://discourse.elm-lang.org/u/rtfeldman)\
**Post date:** [July 21, 2018, 7:18pm UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534/4 "2018-07-21T19:18:11Z")

</div>

This is so cool!!! 😻😻😻

---

<div class="post-metadata">

**Author:** ![G4BB3R](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/g4bb3r/32/4544_2.png) [@G4BB3R](https://discourse.elm-lang.org/u/G4BB3R)\
**Post date:** [July 22, 2018, 1:53am UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534/5 "2018-07-22T01:53:42Z")

</div>

This game is incredible! But I can’t beat bots 😱

---

<div class="post-metadata">

**Author:** ![Viir](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/viir/32/4103_2.png) [@Viir](https://discourse.elm-lang.org/u/Viir)\
**Post date:** [July 23, 2018, 6:45am UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534/6 "2018-07-23T06:45:20Z")

</div>

> [@G4BB3R](#):
>
> This game is incredible! But I can’t beat bots 😱

Thank you for testing! Looks like I should offer some easier levels after the tutorial 🤔

---

<div class="post-metadata">

**Author:** ![pdamoc](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/pdamoc/32/36_2.png) [@pdamoc](https://discourse.elm-lang.org/u/pdamoc)\
**Post date:** [July 23, 2018, 6:54am UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534/7 "2018-07-23T06:54:41Z")

</div>

> [@Viir](#):
>
> Thank you for testing! Looks like I should offer some easier levels after the tutorial

I’ve tried to play it a few times and the bot was overwhelmingly more powerful.

Thinking about the causes for my defeat, I developed this idea that the bot has a higher APM than me and it might be so high as to be impossible to beat. If the bot works like this, it might be interesting to provide the player with different levels of difficulty for the bot (different APMs).

Also I am very curious to see a youtube video of a good player beating the bot. 🙂

---

<div class="post-metadata">

**Author:** ![Viir](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/viir/32/4103_2.png) [@Viir](https://discourse.elm-lang.org/u/Viir)\
**Post date:** [July 23, 2018, 7:13pm UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534/8 "2018-07-23T19:13:41Z")

</div>

> [@pdamoc](#):
>
> I’ve tried to play it a few times and the bot was overwhelmingly more powerful.

Thank you, that is good to know. When I was working on the bot, I thought it might become boring for people too quickly as not enough of a challenge. But in light of the recent feedback, it seems boring bots are not a bottleneck at the moment.

> [@pdamoc](#):
>
> Thinking about the causes for my defeat, I developed this idea that the bot has a higher APM than me and it might be so high as to be impossible to beat.

That is interesting. I am trying to design the game so that frantic clicking is not required. If there is a case where sustained fast input is required to win, I want to change this.

> [@pdamoc](#):
>
> If the bot works like this, it might be interesting to provide the player with different levels of difficulty for the bot (different APMs).

The bot is not limited in this regard at the moment. I like the idea of having different levels of bot difficulty. I should try implement that 🤔

> [@pdamoc](#):
>
> Also I am very curious to see a youtube video of a good player beating the bot. 🙂

A video of beating the bot can be seen here:

[![](https://img.youtube.com/vi/CpjHhgj_8zc/hqdefault.jpg "2018 07 23 DRTS - Playing With Bot") ](https://www.youtube.com/watch?v=CpjHhgj_8zc&t=3m35s)

---

<div class="post-metadata">

**Author:** ![Hasimir](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/hasimir/32/2367_2.png) [@Hasimir](https://discourse.elm-lang.org/u/Hasimir)\
**Post date:** [July 23, 2018, 8:24pm UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534/9 "2018-07-23T20:24:48Z")

</div>

First of all… AWESOME JOB! 😃

Second, a couple of questions:  
Did you use any particular libraries or frameworks?  
Did you feel the lack of “gaming frameworks” such as Pixi?

---

<div class="post-metadata">

**Author:** ![joseph\_stevens](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/joseph_stevens/32/2377_2.png) [@joseph\_stevens](https://discourse.elm-lang.org/u/joseph_stevens)\
**Post date:** [July 23, 2018, 10:05pm UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534/10 "2018-07-23T22:05:53Z")

</div>

Amazing stuff! Very fun to play!!

---

<div class="post-metadata">

**Author:** ![Viir](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/viir/32/4103_2.png) [@Viir](https://discourse.elm-lang.org/u/Viir)\
**Post date:** [July 24, 2018, 7:46am UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534/11 "2018-07-24T07:46:40Z")

</div>

> [@Hasimir](#):
>
> Did you use any particular libraries or frameworks?

For sure, some important ones on the client side (omitting `elm-lang/*`):

- [mpizenberg/elm-pointer-events](https://discourse.elm-lang.org/t/package-for-mouse-touch-pointer-wheel-and-drag-apis/704)
- [eeue56/elm-all-dict](http://package.elm-lang.org/packages/eeue56/elm-all-dict/latest)
- [Zinggi/elm-webgl-math](http://package.elm-lang.org/packages/Zinggi/elm-webgl-math/latest)

On the server:

- [ChakraCore.NET](https://www.nuget.org/packages/ChakraCore.NET): For running Elm apps.
- [ASP.NET](http://ASP.NET) Core: For HTTP / websockets
- Azure Storage.

> [@Hasimir](#):
>
> Did you feel the lack of “gaming frameworks” such as Pixi?

No. When I look at lack of frameworks, I don’t find much lack that is specific to gaming.

Looking at this and other game projects, functionality that is most likely to move to framework(s) is working with SVG (both rendering and parsing).  
Also, functions to deal with the differences between web-browsers (chrome vs firefox) seem good candidates for moving them into a framework.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [August 3, 2018, 7:46am UTC](https://discourse.elm-lang.org/t/drts-game-master-the-art-of-war/1534/12 "2018-08-03T07:46:40Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
