loading...
Play Button Pause Button

Delta-Eos (ASCII Detective Sci-fi game) - Starting to Play Like a Game

andrewbrown profile image Andrew Brown 🇨🇦 ・1 min read

delta-eos (3 Part Series)

1) Delta-Eos - ASCII Text-Heavy Murder Mystery Game 2) Delta-Eos - Starting to look like a game 3) Delta-Eos (ASCII Detective Sci-fi game) - Starting to Play Like a Game

I am getting close to having all the core functionality in the game:

  • skill system (working)
  • experience (working)
  • dialogue engine (almost complete)
  • object interactions (nearly complete)
  • inventory (just starting)

How to run the game

Its open-source so if you want to try whatever I'm working on you can just download the repo from GitHub at https://github.com/omenking/delta-eos

To run the game:

bundle install
bundle exec ruby main.rb

Experience and Skills

So for the experience, I decided to use square root. The level is dynamically calculated based on the collected experience.

  def level
    (0.08 * Math.sqrt(self.exp)).floor
  end

  def next_exp
    val = (self.level+1) / 0.08
    (val*val).floor
  end

  def prev_exp
    val = (self.level) / 0.08
    (val*val).floor
  end

Every level you points. I keep track of points_used to determine how many points you have avaliable eg.

(data.level - data.points_used)

I now have this cool overlay you can use to upgrade your skills when you have available points.

Cool New Rooms

I don't plan too far ahead, I just make rooms interesting and determine their purpose in the story after the fact.

So I will think "I want a big gate that opens as you approach it"

Dialogue Engine

I manage dialogue within JSON files. I've most or less define the structure for all possible outcomes.

delta-eos (3 Part Series)

1) Delta-Eos - ASCII Text-Heavy Murder Mystery Game 2) Delta-Eos - Starting to look like a game 3) Delta-Eos (ASCII Detective Sci-fi game) - Starting to Play Like a Game

Posted on by:

andrewbrown profile

Andrew Brown 🇨🇦

@andrewbrown

🚀 CEO of ExamPro 🚀 free AWS Certification courses on freeCodeCamp youtube 🚀 AWS Community Hero 🚀 DEV Moderator for AWS tag 🚀 Star Trek Obsessed

Discussion

markdown guide
 

Video opening screen first thought: why are there pants? ;)

I'm fond of ascii games, good luck!

 

(in-universe explanation) The space dynasty outlawed pants. Only the Space Emperor is allowed to wear pants or you face space execution.