DEV Community

Play Button Pause Button
Andrew Brown 🇨🇦
Andrew Brown 🇨🇦

Posted on

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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

(data.level - data.points_used)
Enter fullscreen mode Exit fullscreen mode

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.

Top comments (2)

Collapse
 
bootcode profile image
Robin Palotai

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

I'm fond of ascii games, good luck!

Collapse
 
andrewbrown profile image
Andrew Brown 🇨🇦 • Edited

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