DEV Community

0 seconds of 7 minutes, 41 secondsVolume 90%
Press shift question mark to access a list of keyboard shortcuts
00:00
00:00
07:41
 
Andrew Brown πŸ‡¨πŸ‡¦
Andrew Brown πŸ‡¨πŸ‡¦

Posted on

26 5

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.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

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.

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay