This is a documentation for Board Game Arena: play board games online !
BGA Code Sharing: Difference between revisions
m (Add 2 alernatives to BGA components) |
|||
(16 intermediate revisions by 5 users not shown) | |||
Line 17: | Line 17: | ||
| Die: 4 sided | | Die: 4 sided | ||
| https://codepen.io/mrkiffie/pen/doVZgW | | https://codepen.io/mrkiffie/pen/doVZgW | ||
| code pen | |||
|- | |||
| Die: 4 sided | |||
| https://codepen.io/VictoriaLa/pen/JjZNezr | |||
| code pen | | code pen | ||
|- | |- | ||
Line 50: | Line 54: | ||
|- | |- | ||
|Hex grid | |Hex grid | ||
|tapestry, | |tapestry,Tumbleweed,gaia project,Gold West | ||
| | | | ||
|- | |- | ||
Line 73: | Line 77: | ||
|Find intersecting hexes on a line between two cells | |Find intersecting hexes on a line between two cells | ||
|- | |- | ||
! colspan="3" | Alternative implementations of BGA modules | |||
|- | |||
|Scrollmap with zoom | |||
|cacao | |||
| | |||
|- | |||
|Scrollmap Plus | |||
|patchwork | |||
|Implementation with some bugs fixed, improved drag support and ability to use only one direction (i.e. only horizontal like carousel). Found in modules/extscrollmap.js | |||
|- | |||
|Zoom | |||
|[https://github.com/thoun/bga-zoom/ Repo]<nowiki> | </nowiki>[https://thoun.github.io/bga-zoom/demo/index.html Demo] (visible on Azul, Abyss, ...) | |||
|Allow the user to zoom on the game board. Include the controls to zoom, and handle the scale applied to the HTML element. | |||
|- | |||
|Cards | |||
|[https://github.com/thoun/bga-cards/ Repo]<nowiki> | </nowiki>[https://thoun.github.io/bga-cards/demo/index.html Demo] (visible on King of Tokyo, Abyss, ...) | |||
|Alternative to BGA Stock component, using CSS transitions instead of dojo animations. | |||
|- | |||
|Dice | |||
|The next project | |||
|- | |||
| | |||
|} | |} | ||
== Projects | == Projects == | ||
Add the game name, a link to repository and nickname of the developer on bga (same as used for dev forum), and short description. See [[Tools_and_tips_of_BGA_Studio#Version_Control]] for some suggestions on how and where to publish your code externally. Also see the [https://github.com/topics/boardgamearena boardgamearena] topic on github. | |||
'''Important notice about artwork on BGA Open Source projects: original hi-resolution images from publishers must not be published on the repositories. In addition, it is better to specify that the images derivated from publishers artwork are copyrighted and cannot be licensed under a free license like Creative Commons. | '''Important notice about artwork on BGA Open Source projects: original hi-resolution images from publishers must not be published on the repositories. In addition, it is better to specify that the images derivated from publishers artwork are copyrighted and cannot be licensed under a free license like Creative Commons. | ||
Line 93: | Line 119: | ||
| Victoria_La | | Victoria_La | ||
| Examples of various game components and PHP stubs of framework code to make IDE happy | | Examples of various game components and PHP stubs of framework code to make IDE happy | ||
|- | |||
| Vanilla Typescipt template (not a game) | |||
| https://github.com/elaskavaia/bga-dojoless | |||
| Victoria_La | |||
| Project template for typescript and using minimal dojo, good for vscode - type checking, auto-complete, navigation | |||
|- | |- | ||
| BoardGameArena Workbench (not a game) | | BoardGameArena Workbench (not a game) | ||
Line 106: | Line 137: | ||
| https://github.com/ekelly/bga-ninetynine | | https://github.com/ekelly/bga-ninetynine | ||
| QuasarDukeDev | | QuasarDukeDev | ||
|- | |||
| Abandon All Artichokes | |||
| https://github.com/0-wiz-0/bga-abandonallartichokes | |||
| __wiz__, rojomojo | |||
|- | |- | ||
| Assyria | | Assyria | ||
Line 218: | Line 253: | ||
| https://github.com/ishermandom/bga-42 | | https://github.com/ishermandom/bga-42 | ||
| Stardust Spikes, Jason Turner-Maier, Ilya Sherman | | Stardust Spikes, Jason Turner-Maier, Ilya Sherman | ||
|- | |||
| Tic Tac Match | |||
| https://github.com/leocaseiro/bga-tictacmatch | |||
| Leo Caseiro | |||
|- | |- | ||
| Uptown | | Uptown | ||
Line 250: | Line 289: | ||
| https://github.com/eoincos/bga-dicesummoners | | https://github.com/eoincos/bga-dicesummoners | ||
| eoincos | | eoincos | ||
|- | |||
| Trick of the Rails | |||
| https://github.com/Fnordistan/trickoftherails | |||
| AmadanNaBriona | |||
|- | |||
| The Lady and the Tiger (Doors) | |||
| https://github.com/Fnordistan/ladyandthetiger | |||
| AmadanNaBriona | |||
|- | |||
| For-Ex | |||
| https://github.com/Fnordistan/forex | |||
| AmadanNaBriona | |||
|- | |||
| In the Year of the Dragon (10th Anniversary Edition) | |||
| https://github.com/Fnordistan/ityotd | |||
| AmadanNaBriona | |||
|- | |||
| Perikles | |||
| https://github.com/Fnordistan/perikles | |||
| AmadanNaBriona | |||
|- | |- | ||
|} | |} | ||
Line 257: | Line 316: | ||
Any developer can add themselves to a project as read-only from https://studio.boardgamearena.com/#!projects page (almost any project). | Any developer can add themselves to a project as read-only from https://studio.boardgamearena.com/#!projects page (almost any project). | ||
If it is not visible: a) it has no bgg id b) it is already published (use radio button to switch) c) it is an old game not developed on studio. | |||
== Other useful resources == | == Other useful resources == | ||
Moved to [[Tools_and_tips_of_BGA_Studio]] | Moved to [[Tools_and_tips_of_BGA_Studio]] | ||
[[Category:Studio]] |
Revision as of 21:05, 6 February 2023
This page is for listing of externally hosted bga projects, tools and resources, as well as internal project intended for sharing
NAME | CODE LINK | DESCRIPTION |
---|---|---|
Dice models and animation | ||
Die: 4 sided | https://codepen.io/mrkiffie/pen/doVZgW | code pen |
Die: 4 sided | https://codepen.io/VictoriaLa/pen/JjZNezr | code pen |
Die: 6 sided | https://github.com/elaskavaia/bga-sharedcode | Code can be found in project |
Die: 12 sided (dodecahedron) | https://codepen.io/VictoriaLa/pen/xxLLxOP | Code pen |
Die: 20 sided | https://codepen.io/vicentemundim/details/cenIh | Code pen |
Moving object using CSS animation (mostly) | ||
Phantom object move on oversurface | https://codepen.io/VictoriaLa/pen/gORvdJo | This technique creates clone of the object it moves it on another surface. It works well when parents that css transform applies such as scale and rotate |
Move object directly using positioning | https://codepen.io/VictoriaLa/pen/dyzgKVX | This technique is modification of BGA framework method to allow mobile object not to have absolute position before or after the move (and uses css animation not dojo). Methods slideToObjectRelative, attachToNewObjectNoDestroy |
Responsive layout for game boards | ||
Flex Layout | https://codepen.io/VictoriaLa/pen/XWjJJgG | Example on how to create flexible layout just by using css |
Algorithms | ||
Hex grid | tapestry,Tumbleweed,gaia project,Gold West | |
Shortest path on hex grid | memoir 44 | Disjktra |
Largest area on hex grid | tapestry, ... | |
Largest area on square grid | king domino, ... | |
Tetris pieces | patchwork, ... | Matrix manupations to rotate, flip and fit tetris pieces |
Line of sights on hex grid | memoir 44 | Find intersecting hexes on a line between two cells |
Alternative implementations of BGA modules | ||
Scrollmap with zoom | cacao | |
Scrollmap Plus | patchwork | Implementation with some bugs fixed, improved drag support and ability to use only one direction (i.e. only horizontal like carousel). Found in modules/extscrollmap.js |
Zoom | Repo | Demo (visible on Azul, Abyss, ...) | Allow the user to zoom on the game board. Include the controls to zoom, and handle the scale applied to the HTML element. |
Cards | Repo | Demo (visible on King of Tokyo, Abyss, ...) | Alternative to BGA Stock component, using CSS transitions instead of dojo animations. |
Dice | The next project | |
Projects
Add the game name, a link to repository and nickname of the developer on bga (same as used for dev forum), and short description. See Tools_and_tips_of_BGA_Studio#Version_Control for some suggestions on how and where to publish your code externally. Also see the boardgamearena topic on github.
Important notice about artwork on BGA Open Source projects: original hi-resolution images from publishers must not be published on the repositories. In addition, it is better to specify that the images derivated from publishers artwork are copyrighted and cannot be licensed under a free license like Creative Commons.
Projects on studio
Any developer can add themselves to a project as read-only from https://studio.boardgamearena.com/#!projects page (almost any project).
If it is not visible: a) it has no bgg id b) it is already published (use radio button to switch) c) it is an old game not developed on studio.
Other useful resources
Moved to Tools_and_tips_of_BGA_Studio