Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411500 Posts in 69373 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 12:06:06 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Advice for a turn, text based Rails multiplayer game
Pages: [1]
Print
Author Topic: Advice for a turn, text based Rails multiplayer game  (Read 784 times)
separatio
Level 0
*


View Profile
« on: September 08, 2019, 03:46:23 AM »

Hello there!

First of all, there is a tl;dr version at the end.

Secondly, I am here because I'm looking some advice on architecture for <see thread title>.
My language of choice(Ruby) and framework(Rails) was done because I am familiar the most with both.
However, I come from a QA background and I more familiar with test automation frameworks rather than creating stuff from scratch. This is an attempt at learning, for the most part.

At the moment, all I want is to implement a battle state between two actors(either AI vs. AI, AI vs. Player, Player vs. Player). The easiest, I think, would be to start from AI vs AI and then evolve it from there. The issue I have is that I don't really have a good idea on the structure I should be making and I need a little advice.
I think I can sort it out with the MVC framework if I have a good grasp of what is traditionally made in other games, if there is no one here that can advice this implementation in an MVC framework.

tl;dr: Can someone please provide an overview of MVC framework or traditional turn, text based architecture in order for two actors to fight?

Thank you for reading and I hope a good discussion will come out of this.
Logged
qMopey
Level 6
*


View Profile WWW
« Reply #1 on: September 08, 2019, 07:57:29 PM »

I don't know anything about Rails, but I did want to point out you don't need to use MVC if you don't want to. It's not a necessary paradigm, unless you like it/are comfortable with it.

Logged
separatio
Level 0
*


View Profile
« Reply #2 on: September 08, 2019, 08:28:41 PM »

Thank you. That is actually great advice.
Rails IS an MVC framework and I feel that would fit best because of it. That is also the reason why I chose that structure. I also think I can both: 1. Make it work properly. 2. Have clean code.

Do you happen to have any advice on some reading material(articles or books are just fine) on common architectures for text, turn based games?
Logged
qMopey
Level 6
*


View Profile WWW
« Reply #3 on: September 10, 2019, 02:37:30 AM »

Text turn-based means you can use whatever architecture you like, especially since you're just learning. I myself don't really know MVC so I can't really help you there. I don't think you will need anything beyond a state machine, which means you have a loop representing your game, and control structures (like if statements) that look at the game state to pick which code to run.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic