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 Slide

  2. WEB DEVELOPER
    GAME DEVELOPER


    䓛⛳
    @elct9620

    View Slide

  3. View Slide

  4. View Slide

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

    View Slide

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

    View Slide

  7. View Slide

  8. View Slide

  9. View Slide

  10. View Slide

  11. Magica & Seeker

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  16. Hiro Framework

    View Slide

  17. mruby
    Hiro Framework

    View Slide

  18. mruby
    Hiro Core
    Hiro Renderer

    View Slide

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

    View Slide

  20. Premature
    Optimization
    Is the
    Root of all evil

    View Slide

  21. Hiro
    mruby
    Hiro.rb

    Core
    Engine

    View Slide

  22. Ruby Script
    Hiro
    RubyVM SDL
    inih …

    View Slide

  23. Domain
    Specific
    Language

    View Slide

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

    View Slide

  25. 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 Slide

  26. Makes
    Programmers
    Happy

    View Slide

  27. Q&A

    View Slide