Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

phaedryx

2
Posts
1
Following
A member registered Apr 21, 2019

Recent community posts

(4 edits)

Try it out: https://ruby.github.io/TryRuby/

Simple introduction: https://pine.fm/LearnToProgram/

Documentation for review: https://ruby-doc.org/

Challenges to learn the fundamentals: http://rubykoans.com/

More advanced challenges: https://exercism.io/tracks/ruby

What about something like this:

class Sprite
  attr_accessor :x, :y, :width, :height, :color
  def initialize(options = {})
     # set values based on options, assign defaults?
  end
  def to_primitive
    # check to make sure all values make sense, then
    [@x, @y, @width, @height, @color]
  end
end

and have simple classes with  `.to_primitive` calls when you want to render them