Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411431 Posts in 69363 Topics- by 58417 Members - Latest Member: gigig987

April 20, 2024, 04:08:37 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsText Based Multiplayer RTS (Now on GitHub)
Pages: [1] 2
Print
Author Topic: Text Based Multiplayer RTS (Now on GitHub)  (Read 5914 times)
Eigen
Level 10
*****


Brobdingnagian ding dong


View Profile WWW
« on: September 26, 2013, 03:27:14 AM »

Text Based Multiplayer RTS

"Take an RTS game, drop the graphics and the mouse interface."

What's this?

It is as the title states - a text based multiplayer RTS similar to C&C. You build and upgrdade your base, train infantry and build vehicles to take on up to 4 other players in a real-time strategy game. Your tanks may be mighty but you are the key in combat. Can you out-type your opponent?


What ... why?

You see, ever since my Text Based Multiplayer Shooter from last year which people really seemed to love I've been wanting to make a sequel. Not a direct one, but more of spiritual and technical successor. The shooter game was a lot of fun to play but the depth of the game's mechanics was severely held back by the technical limitations of the backend.

I think I can do better, so this time I've opted for NodeJS on the backend. It may not be ideal for real-time games but that's what I'm here to learn and find out.

The game started out last weekend in IGDA Estonia's first ever 48h hackathon. Although the event was about monetization and how to make money even before conceiving an actually fun to play game, me and another guy decided to make this instead. Confused faces in the front row during demoing weren't going to stop us.

I feel the text-based genre has so much to offer and yet to explore and I really love mashing different game genres. It's far easier to go into depth with this sort of interface and representation than having to draw everything and implement increasingly complex UI. Plus, whatever you can imagine in your head is far better than anything I could represent graphically.


How far along is this?

Technically it's playable but has no win or lose state. It also has no backstory or proper unit and building types implemented. Everything's a placeholder. But I'm hoping to open this up for somewhat public testing soon.


What about, you know, Pioneers?

Don't worry, Pioneers is in development also. It's just that I occasionally need to take some time off and do something else.


Technical improvement over TBMS

As stated, the backend now uses NodeJS instead of running on MySQL queries. I've also redesigned the front-end upping the colours to 16 (IBM 5153, baby!) and writing a proper display class. Previously the content of the screen was a html element to which I appended new text. Now I use the HTML5 canvas and can do display.print(col, row, text, options) which is a lot more versatile and looks better as well.


Here's how it looks right now



Everything should be relatively comprehensible if you've played an RTS game before. You have map / different listings area and a sidebar showing info on selected object. The log area shows what's going on.




Click here to play



I've made the server and client-side code available on GitHub. Feel free to improve upon it or use it for whatever.
« Last Edit: November 03, 2013, 12:09:47 PM by Eigen » Logged

Belimoth
Level 10
*****


high-heeled cyberbully


View Profile
« Reply #1 on: September 26, 2013, 03:30:58 AM »

I will be the first to follow this.
Logged

Excy
Level 2
**



View Profile
« Reply #2 on: September 26, 2013, 05:18:47 AM »

And I the second.
Logged

Iso
Level 0
***



View Profile
« Reply #3 on: September 26, 2013, 07:18:29 AM »

This is unearthing some crazy nostalgic memories but I cannot place what. It was like a Civ game only really old and basic graphics. Following.
Logged

doihaveto
Level 2
**



View Profile
« Reply #4 on: September 26, 2013, 07:35:55 AM »

This sounds fascinating. I'm especially digging the natural-language-style command interface...   
Logged

Eigen
Level 10
*****


Brobdingnagian ding dong


View Profile WWW
« Reply #5 on: September 26, 2013, 11:58:22 AM »

Thanks guys. I'm glad you like the concept. Hopefully the play experience will be enjoyable as well.

This is unearthing some crazy nostalgic memories but I cannot place what. It was like a Civ game only really old and basic graphics. Following.

CIV never looked this bad, but the monitor itself and the ASCII characters really create an old feel. It looks like any game with ASCII graphics so I guess it's hard to pin-point exact similar game.


Anyway, in addition to the HTML5 canvas, the game uses WebSockets so it's really pushing the latest and greatest browser functionality even though it doens't look like it. So far my experciences have been great. All major browsers support WebSockets, at least on the most basic level since I'm not using any security features or sending data in binary. Even IE (surprisingly), so not much problems there.

I've stress tested the sockets and thousand of those active doesn't seem to be much of a problem. But I haven't been able to test the server with many active games running on it so there might be nasty surprises there. I'm not convinced NodeJS is the ideal solution for this anyway and if it doesn't work out I can always go pure C (or C++) since I have an Linux cloud server and I can run whatever I want on it. But I wanted to try NodeJS and this seemed like an ideal chance.

NodeJS is cool but JavaScript takes a bit to get used to. JS memory management is somewhat different from what I'm used to and I suspect it's leaking in places.

This has been an useful post ... especially the server hardware bit. I initally had only 256 MB of memory available which I later upgraded to 1 GB. The NodeJS process without any connected clients or game sessions already uses 35 megs .. I'm pretty sure with a C server application I could keep the memory usage way lower and it might be easier to manage it as well.
Logged

doihaveto
Level 2
**



View Profile
« Reply #6 on: September 26, 2013, 12:17:14 PM »

This has been an useful post ... especially the server hardware bit. I initally had only 256 MB of memory available which I later upgraded to 1 GB. The NodeJS process without any connected clients or game sessions already uses 35 megs .. I'm pretty sure with a C server application I could keep the memory usage way lower and it might be easier to manage it as well.

That is a good post, thanks for sharing! Node sounds like promising tech - these guys did a benchmark, and found it to be pretty decent perf-wise.

I'm also curious how recent versions of Go would compare. I only played with it a little bit, but I like what the language is doing, esp. with built in coroutines and message passing should make writing handlers much easier...
Logged

Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #7 on: September 26, 2013, 01:12:59 PM »

Nice
Logged
Razonjo
Level 0
*


Marcus Phoenix Wright


View Profile WWW
« Reply #8 on: September 26, 2013, 02:25:41 PM »

Following this. Love text based games and this concept seems good
Logged

                               
Eigen
Level 10
*****


Brobdingnagian ding dong


View Profile WWW
« Reply #9 on: September 28, 2013, 02:35:12 AM »

I'll post a link for testing the game later today, but until then I'm releasing the client-side display code. It's very simple and if you quickly want to prototype something with ASCII characters it should be perfect for you. You can literally get your game to display in minutes.

By default you have 80 by 29 characters to work with, each with separate background and foreground colors. I've also included text wrapping functionality.

Download link

Includes a quick demo (index.html), the display code, the monitor graphics and some wallpapers.
Logged

Eigen
Level 10
*****


Brobdingnagian ding dong


View Profile WWW
« Reply #10 on: September 28, 2013, 09:24:38 AM »

Okay, let's give this a try.

Hand Any Key

The link is temporary and will only stay up for a short while. I just want to see how it works and get some initial feedback.
« Last Edit: September 30, 2013, 08:42:55 AM by Eigen » Logged

doihaveto
Level 2
**



View Profile
« Reply #11 on: September 28, 2013, 08:01:03 PM »

The link is temporary and will only stay up for a short while. I just want to see how it works and get some initial feedback.

Hmm, I wanted to play, but got stuck in the lobby - nobody else was online, and it looked like it requires at least two players.

Is there any way to add a null player that doesn't do anything, but at least lets me check out the game?
Logged

Orymus
Level 3
***


View Profile WWW
« Reply #12 on: September 28, 2013, 08:35:26 PM »

Interesting, though I doubt I'd have the patience to micro-manage through text input...
Thinking about speech-to-text implementation? Tongue That'd be too awesome...
Logged
aberrantmind
Level 2
**


View Profile
« Reply #13 on: September 28, 2013, 08:39:37 PM »

eeeenteresting
Logged

Mittens
Level 10
*****

.


View Profile WWW
« Reply #14 on: September 28, 2013, 10:05:40 PM »

i really liked TBMFPS, so I'm sure i'll enjoy this, just need some people to play with...
Logged

Eigen
Level 10
*****


Brobdingnagian ding dong


View Profile WWW
« Reply #15 on: September 28, 2013, 11:31:12 PM »

You can open up another browser and login with test/test. Well, that's actually a security issue ..
Logged

Panurge
Level 5
*****



View Profile WWW
« Reply #16 on: September 29, 2013, 02:24:28 AM »

This is a really nice idea. It's like 'Mavis Beacon Conquers the World.' Unfortunately, there weren't any other players about when I tried the build but I'll keep checking back.
Logged

Eigen
Level 10
*****


Brobdingnagian ding dong


View Profile WWW
« Reply #17 on: September 29, 2013, 02:32:53 AM »

I can't play until 3-4 hours right now, sadly.
Logged

Eigen
Level 10
*****


Brobdingnagian ding dong


View Profile WWW
« Reply #18 on: October 27, 2013, 08:07:39 AM »

Now that new Pioneers build is out I can get back to this, at least for a bit. Tonight I implemented turrets because it wasn't possible to defend your base.

Now I'm pondering if I should add medics / engineers or field hospitals/garages instead. Or possibly both. I think both. Just move your unit(s) onto the hospital/garage tile and they will be healed/repaired. Field medics can go around healing wounded units (but only to a certain level) and engineers can repair vehicles (also only to a certain level) and buildings (fully repairable).
Logged

antoniodamala
Guest
« Reply #19 on: October 28, 2013, 05:43:03 AM »

 Blink
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic