Skip to content

Instantly share code, notes, and snippets.

@brine
brine / gist:8967794
Created February 13, 2014 01:05
octgn updates
Update Release Notes
Spectator Support
- Players can join in-progress games as a spectator
- As a spectator, you can see everything that is visible by everyone, any hidden information will be kept hidden
- Players can be set as a spectator in the pre-game lobby
- Spectators may participate in the game chat
- The host player can mute spectators.
Host Options
@brine
brine / new def
Last active August 29, 2015 14:01 — forked from kellyelton/new def
<!--
Any game section that is required outside of the game window needs to be global across all game modes, and should be
included only in the root definition xml:
- All tags in the <game> element
- <fonts>
- <proxygen>
- <gameModes>
- <card>
- <deck>
- <sharedDeck>
@brine
brine / octgngames.com game developer agreement
Last active August 29, 2015 14:05
octgngames.com game developer agreement
(last updated Feb 15, 2015)
Game Developer,
Thank you for your interest in the OCTGN Game Directory at www.octgngames.com. Before we can accept the game into the directory, there are some guidelines that you must agree to follow (note that this document may be updated in the future). If you accept these terms, then please send us a copy of the game definition package for review.
- 10 MB size limit on the game definition. Automatic game updates should be fast for the user to install, especially if the game gets updates frequently.
- No copyrighted card images in game package. The feed is hosted on an external service and we do not want to create any trouble for them or for us. Images also contribute towards that 10 MB size cap. You should be creating image packs for all card images, which is kept external from the game definition on the feed.
@brine
brine / 3.1.0.2events.md
Last active September 15, 2015 19:46
Python 3.1.0.2 API changes

GAME EVENTS:

All event names have been changed to follow a past tense subject-verb naming convention. In addition, all events now simply pass an args argument as its only argument, which act as an object type. So instead of having many different arguments for the OnCardsMoved event, you will now do something like this:

def MoveCardsEvent(args):
    card = args.card
    x, y = args.xs, args.ys
@brine
brine / brineshuffle.txt
Created March 14, 2012 22:51
brine's quantum shuffling
OK so as discussed in the chat, this is a rather unconventional "shuffle" method based on the classic
"marbles in a bag" mathematics problem. I'm not a pro at cardidentity and the various card model types so
you'll need to fill in the blanks on that aspect :)
All card piles in OCTGN will consist of two components: an empty ordered list I'll dub 'the Pile' and an
unordered group consisting of all the cards in the deck which I'll call 'the Bag'.
When you load your deck, OCTGN assigns its identity/model/whatever to all cards in the deck (as normal),
then dumps the cards into the bag. The Pile starts out as an empty list with an index equal to the number
of cards you loaded. The empty objects in the Pile represent individual cards whose identity is unknown to
@brine
brine / tags.xml
Created April 17, 2012 00:26
MTG autoscript tag submit form
<?xml version="1.0" encoding="utf-8"?>
<tags>
<classes>
<class name="initcast">
<action name="cost" />
<action name="token" />
<action name="marker" />
<action name="smartmarker" />
<action name="highlight" />
<action name="tapped" />
@brine
brine / welcome.html
Created May 10, 2013 21:21
Games Feed Welcome Page
<div id="accordion">
<h3>Section 1</h3>
<div>
<p>
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
@brine
brine / gist:5679952
Last active December 17, 2015 22:09
1. paste this def below in the dev console
def setup(group):
starting = group[0]._id
count = 0
group.shuffle()
for c in group:
c.moveToTable(c.width()*(c._id - starting), c.height()*count)
count += 1
@brine
brine / gist:5861740
Created June 25, 2013 19:46
bunch of quick stuff to fix
918 player summary tab hard to read
113 hide marker count when n = 1
021 right-click menu accessible in pile view windows
??? figure out why shuffling takes so freakin long after viewing the pile
631 allow players to add more packs to a sealed pool
??? allow players to choose different sealed packs than other players
114 rapidly clicking on counters or manipulating markers suffers from lag
143 allow game def to assign card/group functions to cards you dont control
159 manually edit number of markers on a card via clicking the number
919 sealed editor - hide sets that dont have sealed packs
@brine
brine / gist:5864619
Created June 26, 2013 03:47
save states
def saveState():
mute()
playerList = []
for p in players:
playerList.append(p.name)
saveState = "|".join(playerList) + "\n"
counterList = []
for counter in me.counters:
counterList.append(str(me.counters[counter].value))
saveState += "|".join(counterList) + "\n"