SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
HTML5 Spiele entwickeln mit ImpactJS




1. Indie Outpost Treffen              Michel Wacker
07.03.2013                               @starnut
Good job,
                                                                 Adobe!
                                                                   :-/


http://files.myopera.com/edwardpiercy/blog/Firing-Squad-4.jpg
?
    http://www.indygear.com/images/props/grail/grail2.jpg
•   Performanz
•   Mobile Audio
•   JavaScript



                   http://www.indygear.com/images/props/grail/grail2.jpg
Engines
 (Canvas/JS)




 und mehr ...
Engines
 (Canvas/JS)
Details


•   Entwickler: Dominic Szablewski
•   „Made in Hesse <3“
•   Lizenz: einmalig $99
Features

•   Einfache Konzepte
•   Performant (Minimized)
•   Bitmap Font-Tool
•   Starker Editor (Weltmeister)
•   Gute Dokumentation
•   Aktive Community
Basics

•   Spiel-Instanz ig.game

•   Grundobjekt: Entitäten
•   Standard Vererbung - Keine Components
•   Sprite Sheets aka Texture Atlases
•   Bitmap Fonts (Font-Tool)
Entitäten


•   Life-Cycle
    init() update() draw() kill()

•   Movement
    pos velocity friction gravityFactor

•   Collision Detection
    touches() health receiveDamage()
Entität
ig.module(
    'game.entities.badge' // Package
)
.requires(
    'impact.entity'       // Imports
)
.defines(function(){

EntityBadge = ig.Entity.extend({

        init: function ( x, y, settings ) {
            this.parent( x, y, settings );
        },

        update: function () {
            this.parent();
        },

        draw: function () {
            this.parent();
        },
    }
}
Fonts & Images

// Font
var font = new ig.Font( 'font.png' );

font.draw( 'Some text', x, y, ig.Font.ALIGN.RIGHT );



// Image
var img = new ig.Image( 'player.png' );

img.draw( x, y );

img.drawTile( x, y, 3, 16 );
Animation
EntityBadge = ig.Entity.extend({

      size: { x: 50, y: 52 },

      animSheet: new ig.AnimationSheet(
           'media/entities/badges.png',
           50, 52
        ),

      init: function ( x, y, settings ) {
          this.parent( x, y, settings );

           this.addAnim( 'idle', 1, [0] );
           this.addAnim( 'run', 0.3, [1,2,3], false );
      },

      update: function () {
           this.parent();

           if (someThingHappens) {
             this.currentAnim = this.anims.run;
           }
      },
  }
Input


// On game start
ig.input.bind( ig.KEY.UP_ARROW, 'jump' );

// In your game's or entity's update() method
if( ig.input.pressed('jump') ) {
    this.vel.y = -100;
}
Weltmeister Editor

•   Tile-Based
•    Mehrere Ebenen
    • Hintergrund
    • Collision
    • Entities
•    Automatisches Entity Loading
•   Freie Key-Value Definition
Nachteile

•   Entwicklung stagniert
•    Basics fehlen
    • Button
    • Spawning nur von Entitäten
    • Depth Sorting
•    Editor schränkt Code-Reuse ein

•   Manchmal unintuitiv: size.x

•   Mobile Sound (Browser Problem)
Beispiel: Stay Calm!




       http://staycalm.starnut.com
•   Wrapper
•   Mobile Deployment
•   Acceleration
•   Monetization (z.B. IAPs)
Construct 2
•   WYSIWYG Editor
•   Physik-Engine
•   Deployment Wrapper
•   Volle Dokumentation
•   Aktive Community
•   Lizenzen: Free, Personal, Business
Jesse Freeman, NYC




Für Einsteiger geeignet
Vielen Dank!
Links
•   ImpactJS: http://impactjs.com/

•   ImpactJS Font-Tool: http://impactjs.com/font-tool/

•   Construct 2: http://www.scirra.com/construct2

•   CAAT: http://labs.hyperandroid.com/static/caat/

•   Crafty: http://craftyjs.com/

•   PixiJS: http://www.goodboydigital.com/pixi-js-has-landed/

•   Quintus: http://html5quintus.com/

•   melonJS: http://www.melonjs.org/

•   LimeJS: http://www.limejs.com/

•   Breakouts: http://city41.github.com/breakouts/

•   CocoonJS: http://www.ludei.com/tech/cocoonjs

•   SoundManager 2: http://www.schillmania.com/projects/soundmanager2/

•   Stay Calm!: http://staycalm.starnut.com

Contenu connexe

Plus de IndieOutpost

Juice up your game feel!
Juice up your game feel!Juice up your game feel!
Juice up your game feel!IndieOutpost
 
Eye Tracking Studie in Amnesia the Dark Decent
Eye Tracking Studie in Amnesia the Dark DecentEye Tracking Studie in Amnesia the Dark Decent
Eye Tracking Studie in Amnesia the Dark DecentIndieOutpost
 
Games Bavaria - Spieleentwickler Förderung in Bayern
Games Bavaria - Spieleentwickler Förderung in BayernGames Bavaria - Spieleentwickler Förderung in Bayern
Games Bavaria - Spieleentwickler Förderung in BayernIndieOutpost
 
Amazon Web Services
Amazon Web ServicesAmazon Web Services
Amazon Web ServicesIndieOutpost
 
Postmortem: "Spellcreepers"
Postmortem: "Spellcreepers"Postmortem: "Spellcreepers"
Postmortem: "Spellcreepers"IndieOutpost
 
Algorithmische Grafik
Algorithmische GrafikAlgorithmische Grafik
Algorithmische GrafikIndieOutpost
 
Scaleform in Unity3D
Scaleform in Unity3DScaleform in Unity3D
Scaleform in Unity3DIndieOutpost
 
Location-based Games - Game Design für kaputte Controller
Location-based Games - Game Design für kaputte ControllerLocation-based Games - Game Design für kaputte Controller
Location-based Games - Game Design für kaputte ControllerIndieOutpost
 

Plus de IndieOutpost (11)

Juice up your game feel!
Juice up your game feel!Juice up your game feel!
Juice up your game feel!
 
Eye Tracking Studie in Amnesia the Dark Decent
Eye Tracking Studie in Amnesia the Dark DecentEye Tracking Studie in Amnesia the Dark Decent
Eye Tracking Studie in Amnesia the Dark Decent
 
Games Bavaria - Spieleentwickler Förderung in Bayern
Games Bavaria - Spieleentwickler Förderung in BayernGames Bavaria - Spieleentwickler Förderung in Bayern
Games Bavaria - Spieleentwickler Förderung in Bayern
 
Amazon Web Services
Amazon Web ServicesAmazon Web Services
Amazon Web Services
 
Postmortem: "Spellcreepers"
Postmortem: "Spellcreepers"Postmortem: "Spellcreepers"
Postmortem: "Spellcreepers"
 
Algorithmische Grafik
Algorithmische GrafikAlgorithmische Grafik
Algorithmische Grafik
 
Haxe & NME
Haxe & NMEHaxe & NME
Haxe & NME
 
Dreamfab
DreamfabDreamfab
Dreamfab
 
GameMaker:Studio
GameMaker:StudioGameMaker:Studio
GameMaker:Studio
 
Scaleform in Unity3D
Scaleform in Unity3DScaleform in Unity3D
Scaleform in Unity3D
 
Location-based Games - Game Design für kaputte Controller
Location-based Games - Game Design für kaputte ControllerLocation-based Games - Game Design für kaputte Controller
Location-based Games - Game Design für kaputte Controller
 

HTML5 Spiele entwickeln mit ImpactJS

  • 1. HTML5 Spiele entwickeln mit ImpactJS 1. Indie Outpost Treffen Michel Wacker 07.03.2013 @starnut
  • 2. Good job, Adobe! :-/ http://files.myopera.com/edwardpiercy/blog/Firing-Squad-4.jpg
  • 3. ? http://www.indygear.com/images/props/grail/grail2.jpg
  • 4. Performanz • Mobile Audio • JavaScript http://www.indygear.com/images/props/grail/grail2.jpg
  • 7.
  • 8. Details • Entwickler: Dominic Szablewski • „Made in Hesse <3“ • Lizenz: einmalig $99
  • 9. Features • Einfache Konzepte • Performant (Minimized) • Bitmap Font-Tool • Starker Editor (Weltmeister) • Gute Dokumentation • Aktive Community
  • 10. Basics • Spiel-Instanz ig.game • Grundobjekt: Entitäten • Standard Vererbung - Keine Components • Sprite Sheets aka Texture Atlases • Bitmap Fonts (Font-Tool)
  • 11. Entitäten • Life-Cycle init() update() draw() kill() • Movement pos velocity friction gravityFactor • Collision Detection touches() health receiveDamage()
  • 12. Entität ig.module( 'game.entities.badge' // Package ) .requires( 'impact.entity' // Imports ) .defines(function(){ EntityBadge = ig.Entity.extend({ init: function ( x, y, settings ) { this.parent( x, y, settings ); }, update: function () { this.parent(); }, draw: function () { this.parent(); }, } }
  • 13. Fonts & Images // Font var font = new ig.Font( 'font.png' ); font.draw( 'Some text', x, y, ig.Font.ALIGN.RIGHT ); // Image var img = new ig.Image( 'player.png' ); img.draw( x, y ); img.drawTile( x, y, 3, 16 );
  • 14. Animation EntityBadge = ig.Entity.extend({ size: { x: 50, y: 52 }, animSheet: new ig.AnimationSheet( 'media/entities/badges.png', 50, 52 ), init: function ( x, y, settings ) { this.parent( x, y, settings ); this.addAnim( 'idle', 1, [0] ); this.addAnim( 'run', 0.3, [1,2,3], false ); }, update: function () { this.parent(); if (someThingHappens) { this.currentAnim = this.anims.run; } }, }
  • 15. Input // On game start ig.input.bind( ig.KEY.UP_ARROW, 'jump' ); // In your game's or entity's update() method if( ig.input.pressed('jump') ) { this.vel.y = -100; }
  • 16. Weltmeister Editor • Tile-Based • Mehrere Ebenen • Hintergrund • Collision • Entities • Automatisches Entity Loading • Freie Key-Value Definition
  • 17. Nachteile • Entwicklung stagniert • Basics fehlen • Button • Spawning nur von Entitäten • Depth Sorting • Editor schränkt Code-Reuse ein • Manchmal unintuitiv: size.x • Mobile Sound (Browser Problem)
  • 18.
  • 19. Beispiel: Stay Calm! http://staycalm.starnut.com
  • 20. Wrapper • Mobile Deployment • Acceleration • Monetization (z.B. IAPs)
  • 21. Construct 2 • WYSIWYG Editor • Physik-Engine • Deployment Wrapper • Volle Dokumentation • Aktive Community • Lizenzen: Free, Personal, Business
  • 22. Jesse Freeman, NYC Für Einsteiger geeignet
  • 24. Links • ImpactJS: http://impactjs.com/ • ImpactJS Font-Tool: http://impactjs.com/font-tool/ • Construct 2: http://www.scirra.com/construct2 • CAAT: http://labs.hyperandroid.com/static/caat/ • Crafty: http://craftyjs.com/ • PixiJS: http://www.goodboydigital.com/pixi-js-has-landed/ • Quintus: http://html5quintus.com/ • melonJS: http://www.melonjs.org/ • LimeJS: http://www.limejs.com/ • Breakouts: http://city41.github.com/breakouts/ • CocoonJS: http://www.ludei.com/tech/cocoonjs • SoundManager 2: http://www.schillmania.com/projects/soundmanager2/ • Stay Calm!: http://staycalm.starnut.com