SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
FX Canvas2D: uma API de jogos
bidimensionais para auxiliar na
aprendizagem de programação
GUSTAVO RISSETTI¹ , FHABIANA THIELI MACHADO¹ , PAULINE VIELMO
MIRANDA²
Congresso Brasileiro de Informática na Educação - 2017
III Workshop de Ensino em Pensamento Computacional, Algoritmos e
Programação
¹ Instituto Federal Farroupilha – São Vicente do Sul – RS/ Brasil
² Universidade Federal de Santa Maria – Santa Maria – RS/ Brasil
Definição do problema
•Falta de capacidade de abstração e de transformação do problema
numa sequência lógica para desenvolvimento dos algoritmos de
programação [Rapkiewicz et al. 2006];
•Ensino de programação na disciplina Computação Gráfica;
•Alternativa ao uso de bibliotecas como OpenGL (Open Graphics
Library);
FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 2
Objetivos
▪Desenvolvimento de uma API (Application Programing Interface)
para programação de jogos 2D (bidimensionais) utilizando Java.
▪ Conceitos básicos: desenhos de primitivas gráficas, laço de renderização e
transformação geométrica
▪Motivar os estudantes para o processo de ensino aprendizagem
através de jogos
FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 3
Desenvolvimento da FX Canvas2D API
▪Uso da classe Canvas da tecnologia JavaFX;
▪Em linguagem Java, com métodos em português;
▪Apenas com conceitos básicos, tais como, programação estruturada
(ou orientação a objetos), noção espacial (plano cartesiano), desvios
condicionais e laços de repetição é possível programar um pequeno
jogo;
▪Também suporta a utilização de um controlador de jogo (gamepad)
para controlar a ação dos personagens criados.
FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 4
Desenvolvimento da FX Canvas2D API
▪Principais categorias de métodos
FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 5
Desenhos de
primitivas
• Linhas, círculos,
retângulos
Laços de
renderização
• Desenhar, atualizar
Transformações
geométricas
• Rotacionar,
transladar, escalar
Call-backs
• Ações de movimento
(mouse, teclado)
Desenvolvimento da FX Canvas2D API
ponto(double x, double y, double tam) circulo(int x, int y, int l, int a, Estilo estilo)
retangulo(int x, int y, int l, int a, Estilo estilo) preenchimento(Color cor)
linha(double xi, double yi, double xf, double yf, Estilo estilo) contorno(double expessura, Color cor)
texto(String texto, double x, double y, int tam, FontWeight tipo) imagem(Image img, double x, double y)
FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 6
Desenhos de
primitivas
• Linhas, círculos,
retângulos
Laços de
renderização
• Desenhar, atualizar
Transformações
geométricas
• Rotacionar,
transladar, escalar
Call-backs
• Ações de movimento
(mouse, teclado)
Desenvolvimento da FX Canvas2D API
colisao(double xP1, double yP1, double xP2, double yP2, double larguraP1, double alturaP1, double
larguraP2, double alturaP2)
Rotacionar (double ang)
transladar(double x, double y)
escalar(double x, double y)
FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 7
Desenhos de
primitivas
• Linhas, círculos,
retângulos
Laços de
renderização
• Desenhar, atualizar
Transformações
geométricas
• Rotacionar,
transladar, escalar
Call-backs
• Ações de movimento
(mouse, teclado)
Materiais e métodos
▪Aplicação com estudantes na disciplina de Computação Gráfica;
▪Alunos de Análise e Desenvolvimento de Sistemas, durante um
semestre, com aulas semanais;
▪Iniciando com um primeiro exemplo (desenhar um plano
cartesiano);
▪Trabalho final da disciplina desenvolver jogo semelhante ao
PacMan;
FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 8
Resultados e Discussões
FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 9
Resultados e Discussões
FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 10
Contato
FSANTOS@INF.UFSM.BR
FACEBOOK: HTTPS://WWW.FACEBOOK.COM/FHABIANATHIELI.SANTOS
FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 11

Mais conteúdo relacionado

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destaque (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

FX Canvas 2D

  • 1. FX Canvas2D: uma API de jogos bidimensionais para auxiliar na aprendizagem de programação GUSTAVO RISSETTI¹ , FHABIANA THIELI MACHADO¹ , PAULINE VIELMO MIRANDA² Congresso Brasileiro de Informática na Educação - 2017 III Workshop de Ensino em Pensamento Computacional, Algoritmos e Programação ¹ Instituto Federal Farroupilha – São Vicente do Sul – RS/ Brasil ² Universidade Federal de Santa Maria – Santa Maria – RS/ Brasil
  • 2. Definição do problema •Falta de capacidade de abstração e de transformação do problema numa sequência lógica para desenvolvimento dos algoritmos de programação [Rapkiewicz et al. 2006]; •Ensino de programação na disciplina Computação Gráfica; •Alternativa ao uso de bibliotecas como OpenGL (Open Graphics Library); FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 2
  • 3. Objetivos ▪Desenvolvimento de uma API (Application Programing Interface) para programação de jogos 2D (bidimensionais) utilizando Java. ▪ Conceitos básicos: desenhos de primitivas gráficas, laço de renderização e transformação geométrica ▪Motivar os estudantes para o processo de ensino aprendizagem através de jogos FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 3
  • 4. Desenvolvimento da FX Canvas2D API ▪Uso da classe Canvas da tecnologia JavaFX; ▪Em linguagem Java, com métodos em português; ▪Apenas com conceitos básicos, tais como, programação estruturada (ou orientação a objetos), noção espacial (plano cartesiano), desvios condicionais e laços de repetição é possível programar um pequeno jogo; ▪Também suporta a utilização de um controlador de jogo (gamepad) para controlar a ação dos personagens criados. FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 4
  • 5. Desenvolvimento da FX Canvas2D API ▪Principais categorias de métodos FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 5 Desenhos de primitivas • Linhas, círculos, retângulos Laços de renderização • Desenhar, atualizar Transformações geométricas • Rotacionar, transladar, escalar Call-backs • Ações de movimento (mouse, teclado)
  • 6. Desenvolvimento da FX Canvas2D API ponto(double x, double y, double tam) circulo(int x, int y, int l, int a, Estilo estilo) retangulo(int x, int y, int l, int a, Estilo estilo) preenchimento(Color cor) linha(double xi, double yi, double xf, double yf, Estilo estilo) contorno(double expessura, Color cor) texto(String texto, double x, double y, int tam, FontWeight tipo) imagem(Image img, double x, double y) FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 6 Desenhos de primitivas • Linhas, círculos, retângulos Laços de renderização • Desenhar, atualizar Transformações geométricas • Rotacionar, transladar, escalar Call-backs • Ações de movimento (mouse, teclado)
  • 7. Desenvolvimento da FX Canvas2D API colisao(double xP1, double yP1, double xP2, double yP2, double larguraP1, double alturaP1, double larguraP2, double alturaP2) Rotacionar (double ang) transladar(double x, double y) escalar(double x, double y) FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 7 Desenhos de primitivas • Linhas, círculos, retângulos Laços de renderização • Desenhar, atualizar Transformações geométricas • Rotacionar, transladar, escalar Call-backs • Ações de movimento (mouse, teclado)
  • 8. Materiais e métodos ▪Aplicação com estudantes na disciplina de Computação Gráfica; ▪Alunos de Análise e Desenvolvimento de Sistemas, durante um semestre, com aulas semanais; ▪Iniciando com um primeiro exemplo (desenhar um plano cartesiano); ▪Trabalho final da disciplina desenvolver jogo semelhante ao PacMan; FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 8
  • 9. Resultados e Discussões FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 9
  • 10. Resultados e Discussões FX CANVAS2D API - FHABIANA MACHADO - III WALGPROG 10