Giter VIP home page Giter VIP logo

psgg-go-sample's Introduction

psgg-go-sample

I'd like to introduce how to use StateGo with Go programming language.

Environment

Windows10
StateGo

Golang environment
ebiten (if you use ebiten framework.)

Folder Tree

--/  
  |   
  +- ebiten  : StateGo samples for 2D Framework Ebiten   
  |   
  +- general : a StateGo sample for general purposes.   
  |  
  +- test    : "try and error" tests to research.  
  |  
  +- test-ebiten : "try and error" ebiten tests to research.  
  |  
  +- wiki    :  etc.  
 

A sample for general purposes.

Folder /general
Open testControl.psgg using StateGo.
Without or with any framework, you may use this state machine as the template.

State Chart

Run

Open cmd.exe then type ...
go run testControl.go

ebiten samples

Folder /ebiten

ebiten is a 2d game library.
I created a sample framework to copolate with ebiten library.

Draw apis must be called at draw function in "ebiten framework". So, I prepared drawlists for pushing draw apis at update timing. Then call drawlist at "ebiten's draw timing".

sample #1

Folder /ebiten/sample1

mainCtonrol has a menu and five features. Four features are implementing simple features and ebiten's example.
The one feature is for calling general StateGo Control introduced above this section.

State Chart

mainControl

testControl (as is genaral's one)

Run

Sample #2

This sample only differs testControl from ''sample #1''

State Chart

testControl

Playground

Folder /ebiten/playground

This sample does not have testControl.
You may create and put testControl into this sample.

Gophers love ebiten

Folder /ebiten/gopherslove

This a sample game using ebiten and StateGo.

Go Gopher by Renee French is licensed under the Creative Commons Attribution 3.0 License.

Webasembly version

You can play it.

psgg-go-sample's People

Contributors

nnnic avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.