commit 443370f05640ebce4466f567321bc35358a725ed Author: Matt Soucy Date: Sun Apr 2 14:09:00 2023 -0400 Initialize with Squib template diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7598f0b --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +_output/*.png +_output/*.pdf +~$* +.DS_Store diff --git a/ABOUT.md b/ABOUT.md new file mode 100644 index 0000000..3c7b272 --- /dev/null +++ b/ABOUT.md @@ -0,0 +1,19 @@ +My Awesome Game +=============== + +Check out my awesome game! + + +Objective +--------- + + + +Gameplay +-------- + + + +Ending the Game +--------------- + diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..2ddf5a5 --- /dev/null +++ b/Gemfile @@ -0,0 +1,11 @@ +source 'https://rubygems.org' + +gem 'squib' +gem 'guard' +gem 'guard-rake' + +# If you do any simulation or anything fancy, you might want this +# gem 'rspec' # Unit testing with behavior-driven development + +# If you want to generate PDFs manually (e.g. rules) this is good +# gem 'prawn' diff --git a/Guardfile b/Guardfile new file mode 100644 index 0000000..91e471b --- /dev/null +++ b/Guardfile @@ -0,0 +1,21 @@ +group :default do + guard 'rake', :task => 'default' do + watch %r{data/.*\.xlsx$} + watch %r{data/.*\.csv$} + watch %r{src/.*\.rb$} + watch %r{.*\.yml} + watch %r{img/.*\.svg$} + watch %r{img/.*\.png$} + end +end + +group :deck do + guard 'rake', :task => 'default' do + watch %r{data/.*\.xlsx$} + watch %r{data/.*\.csv$} + watch %r{src/.*\.rb$} + watch %r{.*\.yml} + watch %r{img/.*\.svg$} + watch %r{img/.*\.png$} + end +end diff --git a/IDEAS.md b/IDEAS.md new file mode 100644 index 0000000..0adc549 --- /dev/null +++ b/IDEAS.md @@ -0,0 +1,22 @@ +# Title Ideas + +* First idea +* Second idea + + +# Things to Try + +* Idea +* Idea + +# Feedback Ideas + +* Feedback +* Feedback + +# Problems To Work On + +* Problem +* Problem + + diff --git a/PLAYTESTING.md b/PLAYTESTING.md new file mode 100644 index 0000000..844ff90 --- /dev/null +++ b/PLAYTESTING.md @@ -0,0 +1,26 @@ +# Playtesting Log + +# Playtest Report Survey + +## Basic Info + * Num. Players: + * How many sessions of this game have you played before? + * How long did you play? + * How did you prepare for teaching the rules? Read the sheet with everyone there, or did someone read it ahead of time? + * What types of players played with you? What are their favorite games? + * What version were you testing? + * What date did you play? + +## Did it work? + * Was there a moment that you felt the game was "broken"? Describe what happened. + * How close were the scores? Did everyone feel like they had a fair chance at winning? + * Were there any moments that you had to go back to the rules for clarification? What resulted of that - are you still unclear, or was it just a misunderstanding? + * Any ideas for clearer rules? + * Any ideas for clearer icons, artwork, in-game helps, etc? + +## Was it fun? + * Based on the description, artwork, branding, etc. was this game what you expected? + * Were the theme, artwork, and icons engaging? + * Did this game have the depth of strategy that you were expecting? + * What were the moments that people felt like they were having the most fun? The least fun? + * Assuming trivial issues are fixed, would you recommend this to someone else? diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..7872b00 --- /dev/null +++ b/Rakefile @@ -0,0 +1,27 @@ +require 'squib' +require 'irb' +require 'rake/clean' + +# Add Rake's clean & clobber tasks +CLEAN.include('_output/*').exclude('_output/gitkeep.txt') + +desc 'By default, just build the deck without extra options' +task default: [:deck] + +desc 'Build everything, with all the options' +task all: [:with_pnp, :with_proofs, :deck] + +desc 'Build the deck' +task(:deck) { load 'src/deck.rb' } + +desc 'Enable proof lines' +task(:with_proofs) do + puts "Enabling proofing lines." + Squib.enable_build_globally :proofs +end + +desc 'Enable print-and-play builds' +task(:with_pnp) do + puts "Enabling print-and-play builds." + Squib.enable_build_globally :pnp +end diff --git a/_output/.gitignore b/_output/.gitignore new file mode 100644 index 0000000..044bca6 --- /dev/null +++ b/_output/.gitignore @@ -0,0 +1 @@ +Keep this here so that Git knows to keep the _output directory on a fresh clone \ No newline at end of file diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..81f7d5f --- /dev/null +++ b/config.yml @@ -0,0 +1,50 @@ +# Settings in the config.yml are overriding Squib's defaults. Anything in the main script will override this. + +# Looking for DPI? It needs to be a parameter to Squib::Deck.new. See https://squib.readthedocs.io/en/latest/dsl/deck.html + +#antialias: best #recommended. Only about 10% slower than fast +#antialias: default # set the anti-aliasing algorithm. default defers to the underlying graphics device. See http://www.cairographics.org/manual/cairo-cairo-t.html#cairo-antialias-t + +# Text hints are used to show the boundaries of text boxes. +# Can be enabled/disabled at the command-level, or set globally with `set` +#text_hint: '#F00' + +# Show progress bars on the command line for potentially long-running operations +progress_bars: true + +#Enable some custom colors that can be used in any color +#custom_colors: +# foo: '#abc' + +#For reading image file command (e.g. png and svg), read from this directory instead +img_dir: img +#img_dir: img-bw + +# Use a SVG cairo back end, instead of an in-memory buffer +# backend: :memory # default +# backend: :svg # can create scalable pdfs, but rendering done at the printer level is not as good as Cairo. + +# Configure what text markup uses replace characters +# Below are the defaults +# lsquote: "\u2018" #note that Yaml wants double quotes here to use escape chars +# rsquote: "\u2019" +# ldquote: "\u201C" +# rdquote: "\u201D" +# em_dash: "\u2014" +# en_dash: "\u2013" +# ellipsis: "\u2026" + +# We can also disallow smart quotes and only allow explicit replacements with ``LaTeX-style'' quotes. +# smart_quotes: false + +# By default, Squib warns when a text box is ellipsized. This can get verbose +# and can be turned off here +warn_ellipsize: true # default +# warn_ellipsize: false # turn off entirely + +# By default, Squib will warn if a PNG is being up-scaled. +warn_png_scale: true # default +# warn_png_scale: false # turn off entirely + +# How many pixels are in a "cell"? +# cell_px: 37.5 # default \ No newline at end of file diff --git a/data/game.xlsx b/data/game.xlsx new file mode 100644 index 0000000..fadeff5 Binary files /dev/null and b/data/game.xlsx differ diff --git a/docs/PNP NOTES.md b/docs/PNP NOTES.md new file mode 100644 index 0000000..19c72c3 --- /dev/null +++ b/docs/PNP NOTES.md @@ -0,0 +1,4 @@ +Print and Play Notes +==================== + +Fill this out to give tips on how to play this with print and play. \ No newline at end of file diff --git a/docs/RULES.md b/docs/RULES.md new file mode 100644 index 0000000..5b37253 --- /dev/null +++ b/docs/RULES.md @@ -0,0 +1,21 @@ +# Intro + +What is this game about? How many players? + +# Objective + +What is the object of the game? + +# Components + +What are the components? List them out. + +# Gameplay + +What does each turn look like? Describe a turn. + +# Scoring + +How is victory assigned? + + diff --git a/img/example.svg b/img/example.svg new file mode 100644 index 0000000..8db2315 --- /dev/null +++ b/img/example.svg @@ -0,0 +1,60 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/layouts/deck.yml b/layouts/deck.yml new file mode 100644 index 0000000..e50d9e1 --- /dev/null +++ b/layouts/deck.yml @@ -0,0 +1,27 @@ +name: + x: 90 + y: 90 + width: 500 + height: 50 + font: Arial 18 + valign: middle + align: left + ellipsize: false + +ATK: + x: 90 + y: 190 + width: 200 + height: 50 + font: Arial 12 + valign: middle + align: left + ellipsize: false +DEF: + extends: ATK + y: += 75 + +version: + font: Arial 6 + x: 725 + y: 45 diff --git a/src/deck.rb b/src/deck.rb new file mode 100644 index 0000000..044fd02 --- /dev/null +++ b/src/deck.rb @@ -0,0 +1,34 @@ +require 'squib' +require_relative 'version' + +# Note: run this code by running "rake" at the command line +# To see full list of options, run "rake -T" + +data = Squib.xlsx file: 'data/game.xlsx', sheet: 0 + +Squib::Deck.new(cards: data.nrows) do + background color: :white + use_layout file: 'layouts/deck.yml' + + text str: data.name, layout: :name + + text str: data.atk.map { |s| "#{s} ATK" }, layout: :ATK + text str: data.def.map { |s| "#{s} DEF" }, layout: :DEF + + svg file: 'example.svg' + + text str: MySquibGame::VERSION, layout: :version + + build(:proofs) do + safe_zone + cut_zone + end + + save format: :png + + build(:pnp) do + save_sheet prefix: 'pnp_sheet_', + trim: '0.125in', + rows: 3, columns: 3 + end +end diff --git a/src/version.rb b/src/version.rb new file mode 100644 index 0000000..d017193 --- /dev/null +++ b/src/version.rb @@ -0,0 +1,3 @@ +module MySquibGame + VERSION = '1.0' +end