Upgrade to Pro — share decks privately, control downloads, hide ads and more …

2017 TGDF - 從零開始的遊戲開發框架

2017 TGDF - 從零開始的遊戲開發框架

蒼時弦や

July 02, 2017
Tweet

More Decks by 蒼時弦や

Other Decks in Technology

Transcript

  1. 從零開始的
    遊戲開發框架
    Photo from https://www.pexels.com/

    View full-size slide

  2. WEB DEVELOPER
    GAME DEVELOPER


    䓛⛳
    @elct9620

    View full-size slide

  3. 想做個自己的遊戲引擎

    View full-size slide

  4. CG from http://www.rpgmakerweb.com/

    View full-size slide

  5. Magica & Seeker

    View full-size slide

  6. build :main do
    dynamic_library "sdl2"
    include_path "extra/include"
    define :debug
    flag "-Wall"
    source "src/**/*.cpp"
    dest "build"
    use :cxx
    end
    Magicafile

    View full-size slide

  7. Seeker
    Engine
    mruby
    Game (C++/Ruby)

    View full-size slide

  8. RubyVM GameObject
    C++
    GC
    Bad Address
    1
    2

    View full-size slide

  9. RubyVM
    GameObject
    (Ruby Object)
    C++
    GC
    2
    1
    Create Ruby Object

    View full-size slide

  10. Hiro Framework

    View full-size slide

  11. mruby
    Hiro Framework

    View full-size slide

  12. mruby
    Hiro Core
    Hiro Renderer

    View full-size slide

  13. Data_Get_Struct(
    mrb,
    self,
    &hiro_scene_type,
    data
    );
    Type Reference

    View full-size slide

  14. Premature
    Optimization
    Is the
    Root of all evil

    View full-size slide

  15. Hiro
    mruby
    Hiro.rb

    Core
    Engine

    View full-size slide

  16. Ruby Script
    Hiro
    RubyVM SDL
    inih …

    View full-size slide

  17. Domain
    Specific
    Language

    View full-size slide

  18. Character.define :aotoki do
    name 'Aotokitsuruya'
    animations(
    stand: animation('char/stand01.png'),
    walk: animation('char/walk01.png')
    )
    end
    DSL Sample

    View full-size slide

  19. Scene.define :starter do
    character(:aotoki).say 'Hi, Player'
    say 'Welcome to use DSL in your game'
    confirm 'Are you read to start?' do
    yes do
    goto :first_level
    end
    no do
    exit_game
    end
    end
    end
    DSL Sample

    View full-size slide

  20. Makes
    Programmers
    Happy

    View full-size slide