1 / 33

JMario

JMario. Equipe Augusto Cesar Neves Lima Filho. JMario. Jogo usando Java2D Fiel ao clássico Mario para snes. Feature Model. Feature Model. public void init(){ ... imagemInterfacePontuacao = resourceManager.loadImage( "interfacePontuacao.png");

casta
Download Presentation

JMario

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JMario Equipe Augusto Cesar Neves Lima Filho

  2. JMario Jogo usando Java2D Fiel ao clássico Mario para snes

  3. Feature Model

  4. Feature Model

  5. public void init(){ ... imagemInterfacePontuacao = resourceManager.loadImage( "interfacePontuacao.png"); imagemInterfaceTotal = resourceManager.loadImage( "interfaceTotal.png"); imagemInterfacePausa = resourceManager.loadImage( "interfacePausa.png" ); } Feature - Language

  6. Feature - Language

  7. Feature - Language privilegedabstractaspect LanguageSupport { ... private Image GameManager.loadImageLang (String name, String language) { ... } pointcut resourceInit(GameManager gm) : execution(* *.init()) && ... protectedabstract String getLanguageCode(); after(GameManager gm) returning : resourceInit(gm){ gm.imagemInterfacePontuacao = gm.loadImageLang("interfacePontuacao.png", getLanguageCode ()); ... } } ... aspect EnglishSupport extends LanguageSupport{ protected String getLanguage(){ return "US"; }

  8. Feature Model

  9. Feature Model

  10. Feature - Language

  11. Feature – Changeable Language

  12. Feature – Changeable Language privileged aspect ChangeLanguageAspect ... private LanguageStrategy GameManager.languageStrategy; private LanguageFactory GameManager.languageFactory = new LanguageFactory(); before(GameManager gm) : checkInput(gm){ if (gm.language.isPressed()) { ... } } ... privatevoid GameManager.changeLanguage() { languageStrategy = languageFactory.createLanguageStrategy(); imagemInterfacePontuacao = languageStratrategy.loadImageLang("interfacePontuacao.png"); ... }

  13. Feature Model

  14. Feature Model publicvoid loadCreatureSprites() { ... Image[][] imagensBat = new Image[4][]; Image[][] imagensTurtle = new Image[4][]; Image[][] imagensMummyTurtle = new Image[4][]; Image[][] imagensBlueDragon = new Image[4][]; ... imagensFlyGoomba[1] = new Image[imagensFlyGoomba[0].length]; imagensFlyGoomba[2] = new Image[imagensFlyGoomba[0].length]; imagensFlyGoomba[3] = new Image[imagensFlyGoomba[0].length]; imagensGoomba[1] = new Image[imagensGoomba[0].length]; imagensGoomba[2] = new Image[imagensGoomba[0].length]; imagensGoomba[3] = new Image[imagensGoomba[0].length]; imagensGreenKoopa[1] = new Image[imagensGreenKoopa[0].length]; imagensGreenKoopa[2] = new Image[imagensGreenKoopa[0].length]; imagensGreenKoopa[3] = new Image[imagensGreenKoopa[0].length]; ...

  15. Gráfico de Clones

  16. Gráfico de Clones

  17. Feature Model

  18. Feature Model

  19. Feature Model Técnica : Code Generation and Transformation (CGT)

  20. Feature – Static Enemy

  21. Feature – Static Enemy publicvoid loadCreatureSprites() { #foreach($enemy in $enemys) Image[][] imagens$enemy.Name = new Image[4][]; #end ... #foreach($enemy in $enemys) imagens$enemy.Name[ 1 ] = new Image[ imagens$enemy. Name[ 0 ].length ]; imagens$enemy.Name[ 2 ] = new Image[ imagens$enemy. Name[ 0 ].length ]; imagens$enemy.Name[ 3 ] = new Image[ imagens$enemy. Name[ 0 ].length ]; #end ...

  22. Feature – Static Enemy <?xml version="1.0"?> <Enemys> <Enemy NAME="Goomba" CODIGO="1" SPEED="0.1" FLYER="false"> <Frame NAME="goomba1.png"/> <Frame NAME="goomba2.png"/> </Enemy> <Enemy NAME="Fly Goomba" CODIGO="2" SPEED="0.1" FLYER="false"> <Frame NAME="flyGoomba1.png"/> <Frame NAME="flyGoomba2.png"/> </Enemy> ...

  23. Gráfico de Clones

  24. Gráfico de Clones

  25. Gráfico de Clones Redução : 54%

  26. Feature Model Técnica : Adaptive Object Model (AOM)

  27. Feature: User-Defined enemys

  28. Feature: User-Defined enemys

  29. Feature: User-Defined enemys publicvoid loadCreatureSprites() { XMLEnemyHandler handler = new XMLEnemyHandler(); ... List<EnemyDescription> enemys = handler.getEnemys(); for (int i = 0; i < enemys.size(); i++) { EnemyDescription enemyDescription = enemys.get(i); ... EnemyType enemyType = new EnemyType(enemyDescription.getCodigo(), enemyDescription.getName(), enemyDescription.getSpeed(), enemyDescription.isFlyer()); ...

  30. Feature: User-Defined enemys //#ifdef aom import variations.EnemyType; //#endif //#ifdef aom publicclass Creature extends Sprite { //#else //@public abstract class Creature extends Sprite { //#endif

  31. Dificuldades Uso de técnicas não definidas diretamente em decision models Flip-Pure-Variants

  32. Atividades – Tempo

  33. Conclusões • Uso de diversas técnicas em uma mesma variação • Uso extensivo de AO

More Related