SlideShare a Scribd company logo
1 of 30
.NET for fun: writing a Christmas videogame
Marco Parenzan, venerdì 17 dicembre 2021, ore 16.00
Platinum Sponsor
Gold Sponsor Technical Sponsor Community Partner
Marco Parenzan
• Senion SolutionArchitect @ beanTech
• 1nn0va Community Lead (Pordenone)
• MicrosoftAzure MVP
• Profiles
• Linkedin: https://www.linkedin.com/in/marcoparenzan/
• Slideshare: https://www.slideshare.net/marco.parenzan
• GitHub: https://github.com/marcoparenzan
The role of C# and .NET
• The language I like
• A style exercise. Make code elegant and simple (not so much time to spend to
maintain)
• «Code and Refactor: il bello dello scrivere il codice» (Lego my love)
• Lot of new games on retro hardware depends on modern tools
C64 Studio
How to start: choose a ‘80 game
• https://www.retrogames.cc/arcade-games/rally-x.html
• Not my preferred Commodore 64 game (not even a C64 game...until
2021! https://www.lemon64.com/forum/viewtopic.php?t=77960)
• But a game I like
• Almost «simple»
• With the cars I love
(some RPG)
Arkanoid
Bubble Bobble
Bump'n'Jump
C64 Emulator
Captured
Defender
Elite
F-Zero
Galaga
Hero
Impossible Mission
Lazy Jones
Le Mans
Lode Runner
Mario Bros
Minecraft
Outrun
Pacman
Pong
Rally X
Snake
Sokoban
Tetris
The Turk
Trust
Zak Mc Kraken
Find the graphics
Search for «spritesheet» or «tileset»
Rip the graphics
• Create tiles with custom app made by me 
Tiler!
• Tiled to check if tilemap is working
(https://www.mapeditor.org/)
• Check if spritesheet is ok with
https://www.piskelapp.com/
• Make some drawing and edit with Paint.net
Generated with Tiler
Checked with Tiled
Checked with piskelapp
The core of a game!
• While(true)
• Render(); // current frame from state
• Update(); // update state
• How many times?
• 30/50+ times per second, beyond the retina persistence
t T+0.033 T+0.066 T+0.099 T+0.132
Bitmaps, Flickering, «Raster» and Double Buffering
• Fast =Windows Forms (GDI)
• WPF has DirectX, but 2D painting is quite more complicated (never put my
mind on that)
• Raster=the CRT pencil
• Double Buffering=Prepare the new image offline and draw it in one command (if
possible)
• Sync in raster to avoid two frames in a single video refresh
• Support GPU native commands to be helped by GPU itself
‘80 limitations and style
• Arcade Physics=No Physics
• Screen Size is known and fixed (no native rescaling)
• Game dynamics depends on Graphics assets
• Game and graphic assets are written around fixed size
• ‘80 graphics look better on CRT!
• They use limitations on CRT to improve graphics
CRT (real)
LCD (unreal)
Some topics
• Sprites
• Spritesheets
• Tiles and levels
• Input
• Stage and Level
• Stage State
• Game State
Let’s look into code
No Xmas in this game!
Let’s see the gifts!
5 gifts for you
Gift #1.
Write your preferred ‘80s game
Xmas Holidays are the best time to do that!
Remember when you were a boy!
This session!
(some RPG)
Arkanoid
Bubble Bobble
Bump'n'Jump
C64 Emulator
Captured
Defender
Elite
F-Zero
Galaga
Hero
Impossible Mission
Lazy Jones
Le Mans
Lode Runner
Mario Bros
Minecraft
Outrun
Pacman
Pong
Rally X
Snake
Sokoban
Tetris
The Turk
Trust
Zak Mc Kraken
Gift #2.
I tell you a story...
First: get a Commodore 64!
• Obviously a Commodore 64 in any form
• Real
• Ultimate II+
• Cute32
• SD2IEC
• FPGA
• (Ultimate 64)
• TheC64 (orTheVic20 orThe C64mini)
• Raspberry PI 4 (+USB Joystick or Keyrah)
• BMC64  Bare Metal! No Raspbian
• Combian 64
• Or more simpler with an Emulator
• https://vice-emu.sourceforge.io/
• https://frodo.cebix.net/
• ...
• Emulators in .Net
• An example (https://github.com/RupertAvery/CS64)
https://emulation.gametechwiki.com/index.php/Commodore
_64_emulators
Name Platform(s) Latest Version Libretro Core Accuracy FLOSS Active Recommended
PC / x86
VICE (x64sc) 3.5 ✓ Very high ✓ ✓ ✓
Denise 1.1.2 ✗ Very high ✓ ✓ ✓
Hoxs64 1.1.0.5 ✗ Very high ✓ ✓ ✓
Z64K 2.0.0 (2021-07-27) ✗ Very high ✗ ✓ ✓
VirtualC64 4.3 ✗ High ✓ ✓ ✓
VICE (x64) 3.5[N 1]
✓ High ✓ ✓ ~
Emu64 git ✗ ? ✓ ✓ ~
Kernal64 1.7.1 ✗ ? ✓ ✓ ~
Micro64 1.00.2018.03.16 Build 719 ✗ High ✗ ✓ ~
BizHawk 2.7 ✗ ? ✓ ✓ ✗
CCS64 V3.9.2 ✗ High ✗ ✗ ✗
Hyper64 1.00.2008.08.08 Build 20 ✗ Mid ✗ ✗ ✗
MAME 0.238 ✓ Mid ✓ ✓ ✗
Power64 4.9.5 ✗ High ✗ ✗ ✗
Frodo 4.1b ✗ ? ✗ ✗ ✗
RallyX...storia interessante del Commodore 64
• Portato in Giappone sulVic 1001 e sulla Max Machine nel 1982 ma mai
licenziato, quindi ha cambiato nome e personaggio
• Radar Rat Race
• https://en.wikipedia.org/wiki/Radar_Rat_Race
• Ah! Non sapevate che i Commodore sono usciti prima di tutto in
Giappone con altro nome?
• VIC1001Vic20
• Max (non esattamente identico) C64
«L’Edicola» anni ‘80 per noi del Commodore 64 (e Spectrum
e MSX)
• https://www.edicola8bit.com/
• Copiavano il gioco, cambiavano il nome e la
schermata iniziale
• [magari un vostro amico smanettone nato
negli anni ‘70 era un piratone ]
https://www.edicola8bit.com/giochi.php?id_pare
nt=348
Tapuino
Gift #3. «Corsa contro il tempo»
• Non l’avevate capito?
• Un doppio senso...
Make a new graphics
DEMO
Gift #4.
The role of .NET (again)
The role of .NET (again)
• .NET everywhere
• We live in a web world
• We live in a mobile world
• .NET in web =Web Assembly and Blazor!
• Web allows to run on Mobile!
Patterns, Coupling and making things right!
• Using Canvas is always Javascript
• Interoperability is necessary
• 640/24=2626x26=676 tiles per screen
• 5 sprites at the same time
• 680 call per frame x 30times per second!!!! NO!
• I call per frame30 calls per second.
• So renderFrame to be rewritten in Javascript passing stage object (serializable in
javascript!)
Bring to the Web with Blazor
• https://www.rallysharp.it/
• Azure StaticWeb Site
• Improve it!
• Networking in Azure
• Make it more «casual gaming» (touch?)
Touch point dy>dxup > dxup
Javascript event back .net interop
Gift #5.
The code
https://github.com/marcoparenzan/rallysharp
Gift #6.
Other code for you
https://github.com/marcoparenzan/MissileSharp
https://github.com/marcoparenzan/Sharptris
https://github.com/marcoparenzan/Sokosharp
https://github.com/marcoparenzan/mariobros
DOMANDE E RISPOSTE
• BUON NATALEATUTTIVOI E ALLEVOSTRE FAMIGLIE!

More Related Content

What's hot

Presentation sanlab workshops
Presentation sanlab workshopsPresentation sanlab workshops
Presentation sanlab workshops
Artur Roszczyk
 
Motivating Player in Open Worlds
Motivating Player in Open WorldsMotivating Player in Open Worlds
Motivating Player in Open Worlds
Joel Burgess
 

What's hot (20)

Game Design for Middle School Students
Game Design for Middle School StudentsGame Design for Middle School Students
Game Design for Middle School Students
 
Introduction to Game Development and the Game Industry
Introduction to Game Development and the Game IndustryIntroduction to Game Development and the Game Industry
Introduction to Game Development and the Game Industry
 
Unlock your creative potential: 7 steps to becoming a game designer
Unlock your creative potential: 7 steps to becoming a game designerUnlock your creative potential: 7 steps to becoming a game designer
Unlock your creative potential: 7 steps to becoming a game designer
 
3. research
3. research3. research
3. research
 
Fail Fast: PopCap's Approach to Quality
Fail Fast: PopCap's Approach to QualityFail Fast: PopCap's Approach to Quality
Fail Fast: PopCap's Approach to Quality
 
Presentation sanlab workshops
Presentation sanlab workshopsPresentation sanlab workshops
Presentation sanlab workshops
 
Character Design
Character DesignCharacter Design
Character Design
 
Habitat Indie Game Development Pre-Post Mortem
Habitat Indie Game Development Pre-Post MortemHabitat Indie Game Development Pre-Post Mortem
Habitat Indie Game Development Pre-Post Mortem
 
Game project- initial plans
Game project- initial plansGame project- initial plans
Game project- initial plans
 
Introduction to Game Design
Introduction to Game DesignIntroduction to Game Design
Introduction to Game Design
 
Lecture 5 - Procedural Content Generation
Lecture 5 - Procedural Content GenerationLecture 5 - Procedural Content Generation
Lecture 5 - Procedural Content Generation
 
Intro to Game Development and the Game Industry (She Codes TLV)
Intro to Game Development and the Game Industry (She Codes TLV)Intro to Game Development and the Game Industry (She Codes TLV)
Intro to Game Development and the Game Industry (She Codes TLV)
 
FGS 2011: Keeping Yourself Honest in Game Design (SteamBirds)
FGS 2011: Keeping Yourself Honest in Game Design (SteamBirds)FGS 2011: Keeping Yourself Honest in Game Design (SteamBirds)
FGS 2011: Keeping Yourself Honest in Game Design (SteamBirds)
 
Game dev process
Game dev processGame dev process
Game dev process
 
Character design
Character designCharacter design
Character design
 
Motivating Player in Open Worlds
Motivating Player in Open WorldsMotivating Player in Open Worlds
Motivating Player in Open Worlds
 
Introduction To 3D Gaming
Introduction To 3D GamingIntroduction To 3D Gaming
Introduction To 3D Gaming
 
Case Study
Case StudyCase Study
Case Study
 
Blizzard
BlizzardBlizzard
Blizzard
 
Ninja rush pipeline
Ninja rush pipelineNinja rush pipeline
Ninja rush pipeline
 

Similar to .net for fun: write a Christmas videogame

Finalpowerpoint
FinalpowerpointFinalpowerpoint
Finalpowerpoint
cwang36
 
Powerpoint4
Powerpoint4Powerpoint4
Powerpoint4
cwang36
 
Cheatcodepowerpoint
CheatcodepowerpointCheatcodepowerpoint
Cheatcodepowerpoint
staynerk
 
4 the games industry – the institutions
4 the games industry – the institutions4 the games industry – the institutions
4 the games industry – the institutions
mrhoward12
 
4 the games industry – the institutions
4 the games industry – the institutions4 the games industry – the institutions
4 the games industry – the institutions
mrhoward12
 

Similar to .net for fun: write a Christmas videogame (20)

Finalpowerpoint
FinalpowerpointFinalpowerpoint
Finalpowerpoint
 
Powerpoint4
Powerpoint4Powerpoint4
Powerpoint4
 
Confrontation Pipeline and SCons
Confrontation Pipeline and SConsConfrontation Pipeline and SCons
Confrontation Pipeline and SCons
 
Masters of Doom by Depe
Masters of Doom by DepeMasters of Doom by Depe
Masters of Doom by Depe
 
Super Gun Kids: The Making Of by Iain Lobb
Super Gun Kids: The Making Of by Iain LobbSuper Gun Kids: The Making Of by Iain Lobb
Super Gun Kids: The Making Of by Iain Lobb
 
TiConf 2014 Game Dev with Titanium and Platino 5/10/14
TiConf 2014 Game Dev with Titanium and Platino 5/10/14TiConf 2014 Game Dev with Titanium and Platino 5/10/14
TiConf 2014 Game Dev with Titanium and Platino 5/10/14
 
History of Video Games 90s till 00
History of Video Games 90s till 00History of Video Games 90s till 00
History of Video Games 90s till 00
 
Life Begins at 40: 6 lessons we shouldn't forget from our 40 years of gaming ...
Life Begins at 40: 6 lessons we shouldn't forget from our 40 years of gaming ...Life Begins at 40: 6 lessons we shouldn't forget from our 40 years of gaming ...
Life Begins at 40: 6 lessons we shouldn't forget from our 40 years of gaming ...
 
Cheatcodepowerpoint
CheatcodepowerpointCheatcodepowerpoint
Cheatcodepowerpoint
 
JRC Seminar (History of Video Game Industry)
JRC Seminar (History of Video Game Industry)JRC Seminar (History of Video Game Industry)
JRC Seminar (History of Video Game Industry)
 
XNAPresentation
XNAPresentationXNAPresentation
XNAPresentation
 
The History of The 3DO Company
The History of The 3DO CompanyThe History of The 3DO Company
The History of The 3DO Company
 
4 the games industry – the institutions
4 the games industry – the institutions4 the games industry – the institutions
4 the games industry – the institutions
 
2004: Söldner - a Post Mortem
2004: Söldner - a Post Mortem2004: Söldner - a Post Mortem
2004: Söldner - a Post Mortem
 
4 the games industry – the institutions
4 the games industry – the institutions4 the games industry – the institutions
4 the games industry – the institutions
 
The Video Game R-Evolution
The Video Game R-EvolutionThe Video Game R-Evolution
The Video Game R-Evolution
 
Multiplayer Roguelike for the Commodore 64
Multiplayer Roguelike for the Commodore 64Multiplayer Roguelike for the Commodore 64
Multiplayer Roguelike for the Commodore 64
 
Amiga Cracktro Programming
Amiga Cracktro ProgrammingAmiga Cracktro Programming
Amiga Cracktro Programming
 
Ultimate Modded Commodore 64
Ultimate Modded Commodore 64Ultimate Modded Commodore 64
Ultimate Modded Commodore 64
 
Akshay-UNIT 20-LO-1,2,3&4-FINAL
Akshay-UNIT 20-LO-1,2,3&4-FINALAkshay-UNIT 20-LO-1,2,3&4-FINAL
Akshay-UNIT 20-LO-1,2,3&4-FINAL
 

More from Marco Parenzan

More from Marco Parenzan (20)

Azure IoT Central per lo SCADA engineer
Azure IoT Central per lo SCADA engineerAzure IoT Central per lo SCADA engineer
Azure IoT Central per lo SCADA engineer
 
Azure Hybrid @ Home
Azure Hybrid @ HomeAzure Hybrid @ Home
Azure Hybrid @ Home
 
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptxStatic abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
 
Azure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT SolutionsAzure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT Solutions
 
Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT Central Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT Central
 
Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT CentralPower BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT Central
 
Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT CentralPower BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT Central
 
Developing Actors in Azure with .net
Developing Actors in Azure with .netDeveloping Actors in Azure with .net
Developing Actors in Azure with .net
 
Math with .NET for you and Azure
Math with .NET for you and AzureMath with .NET for you and Azure
Math with .NET for you and Azure
 
Power BI data flow and Azure IoT Central
Power BI data flow and Azure IoT CentralPower BI data flow and Azure IoT Central
Power BI data flow and Azure IoT Central
 
Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...
Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...
Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...
 
Anomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETAnomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NET
 
Deploy Microsoft Azure Data Solutions
Deploy Microsoft Azure Data SolutionsDeploy Microsoft Azure Data Solutions
Deploy Microsoft Azure Data Solutions
 
Deep Dive Time Series Anomaly Detection in Azure with dotnet
Deep Dive Time Series Anomaly Detection in Azure with dotnetDeep Dive Time Series Anomaly Detection in Azure with dotnet
Deep Dive Time Series Anomaly Detection in Azure with dotnet
 
Azure IoT Central
Azure IoT CentralAzure IoT Central
Azure IoT Central
 
Anomaly Detection with Azure and .net
Anomaly Detection with Azure and .netAnomaly Detection with Azure and .net
Anomaly Detection with Azure and .net
 
Code Generation for Azure with .net
Code Generation for Azure with .netCode Generation for Azure with .net
Code Generation for Azure with .net
 
Running Kafka and Spark on Raspberry PI with Azure and some .net magic
Running Kafka and Spark on Raspberry PI with Azure and some .net magicRunning Kafka and Spark on Raspberry PI with Azure and some .net magic
Running Kafka and Spark on Raspberry PI with Azure and some .net magic
 
Time Series Anomaly Detection with Azure and .NETT
Time Series Anomaly Detection with Azure and .NETTTime Series Anomaly Detection with Azure and .NETT
Time Series Anomaly Detection with Azure and .NETT
 
Code Generation for Azure with .net
Code Generation for Azure with .netCode Generation for Azure with .net
Code Generation for Azure with .net
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Recently uploaded (20)

Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

.net for fun: write a Christmas videogame

  • 1. .NET for fun: writing a Christmas videogame Marco Parenzan, venerdì 17 dicembre 2021, ore 16.00
  • 2.
  • 3. Platinum Sponsor Gold Sponsor Technical Sponsor Community Partner
  • 4. Marco Parenzan • Senion SolutionArchitect @ beanTech • 1nn0va Community Lead (Pordenone) • MicrosoftAzure MVP • Profiles • Linkedin: https://www.linkedin.com/in/marcoparenzan/ • Slideshare: https://www.slideshare.net/marco.parenzan • GitHub: https://github.com/marcoparenzan
  • 5. The role of C# and .NET • The language I like • A style exercise. Make code elegant and simple (not so much time to spend to maintain) • «Code and Refactor: il bello dello scrivere il codice» (Lego my love) • Lot of new games on retro hardware depends on modern tools C64 Studio
  • 6. How to start: choose a ‘80 game • https://www.retrogames.cc/arcade-games/rally-x.html • Not my preferred Commodore 64 game (not even a C64 game...until 2021! https://www.lemon64.com/forum/viewtopic.php?t=77960) • But a game I like • Almost «simple» • With the cars I love (some RPG) Arkanoid Bubble Bobble Bump'n'Jump C64 Emulator Captured Defender Elite F-Zero Galaga Hero Impossible Mission Lazy Jones Le Mans Lode Runner Mario Bros Minecraft Outrun Pacman Pong Rally X Snake Sokoban Tetris The Turk Trust Zak Mc Kraken
  • 7. Find the graphics Search for «spritesheet» or «tileset»
  • 8. Rip the graphics • Create tiles with custom app made by me  Tiler! • Tiled to check if tilemap is working (https://www.mapeditor.org/) • Check if spritesheet is ok with https://www.piskelapp.com/ • Make some drawing and edit with Paint.net Generated with Tiler Checked with Tiled Checked with piskelapp
  • 9. The core of a game! • While(true) • Render(); // current frame from state • Update(); // update state • How many times? • 30/50+ times per second, beyond the retina persistence t T+0.033 T+0.066 T+0.099 T+0.132
  • 10. Bitmaps, Flickering, «Raster» and Double Buffering • Fast =Windows Forms (GDI) • WPF has DirectX, but 2D painting is quite more complicated (never put my mind on that) • Raster=the CRT pencil • Double Buffering=Prepare the new image offline and draw it in one command (if possible) • Sync in raster to avoid two frames in a single video refresh • Support GPU native commands to be helped by GPU itself
  • 11. ‘80 limitations and style • Arcade Physics=No Physics • Screen Size is known and fixed (no native rescaling) • Game dynamics depends on Graphics assets • Game and graphic assets are written around fixed size • ‘80 graphics look better on CRT! • They use limitations on CRT to improve graphics CRT (real) LCD (unreal)
  • 12. Some topics • Sprites • Spritesheets • Tiles and levels • Input • Stage and Level • Stage State • Game State Let’s look into code
  • 13. No Xmas in this game!
  • 14. Let’s see the gifts! 5 gifts for you
  • 15. Gift #1. Write your preferred ‘80s game Xmas Holidays are the best time to do that! Remember when you were a boy! This session! (some RPG) Arkanoid Bubble Bobble Bump'n'Jump C64 Emulator Captured Defender Elite F-Zero Galaga Hero Impossible Mission Lazy Jones Le Mans Lode Runner Mario Bros Minecraft Outrun Pacman Pong Rally X Snake Sokoban Tetris The Turk Trust Zak Mc Kraken
  • 16. Gift #2. I tell you a story...
  • 17. First: get a Commodore 64! • Obviously a Commodore 64 in any form • Real • Ultimate II+ • Cute32 • SD2IEC • FPGA • (Ultimate 64) • TheC64 (orTheVic20 orThe C64mini) • Raspberry PI 4 (+USB Joystick or Keyrah) • BMC64  Bare Metal! No Raspbian • Combian 64 • Or more simpler with an Emulator • https://vice-emu.sourceforge.io/ • https://frodo.cebix.net/ • ... • Emulators in .Net • An example (https://github.com/RupertAvery/CS64)
  • 18. https://emulation.gametechwiki.com/index.php/Commodore _64_emulators Name Platform(s) Latest Version Libretro Core Accuracy FLOSS Active Recommended PC / x86 VICE (x64sc) 3.5 ✓ Very high ✓ ✓ ✓ Denise 1.1.2 ✗ Very high ✓ ✓ ✓ Hoxs64 1.1.0.5 ✗ Very high ✓ ✓ ✓ Z64K 2.0.0 (2021-07-27) ✗ Very high ✗ ✓ ✓ VirtualC64 4.3 ✗ High ✓ ✓ ✓ VICE (x64) 3.5[N 1] ✓ High ✓ ✓ ~ Emu64 git ✗ ? ✓ ✓ ~ Kernal64 1.7.1 ✗ ? ✓ ✓ ~ Micro64 1.00.2018.03.16 Build 719 ✗ High ✗ ✓ ~ BizHawk 2.7 ✗ ? ✓ ✓ ✗ CCS64 V3.9.2 ✗ High ✗ ✗ ✗ Hyper64 1.00.2008.08.08 Build 20 ✗ Mid ✗ ✗ ✗ MAME 0.238 ✓ Mid ✓ ✓ ✗ Power64 4.9.5 ✗ High ✗ ✗ ✗ Frodo 4.1b ✗ ? ✗ ✗ ✗
  • 19. RallyX...storia interessante del Commodore 64 • Portato in Giappone sulVic 1001 e sulla Max Machine nel 1982 ma mai licenziato, quindi ha cambiato nome e personaggio • Radar Rat Race • https://en.wikipedia.org/wiki/Radar_Rat_Race • Ah! Non sapevate che i Commodore sono usciti prima di tutto in Giappone con altro nome? • VIC1001Vic20 • Max (non esattamente identico) C64
  • 20. «L’Edicola» anni ‘80 per noi del Commodore 64 (e Spectrum e MSX) • https://www.edicola8bit.com/ • Copiavano il gioco, cambiavano il nome e la schermata iniziale • [magari un vostro amico smanettone nato negli anni ‘70 era un piratone ] https://www.edicola8bit.com/giochi.php?id_pare nt=348 Tapuino
  • 21. Gift #3. «Corsa contro il tempo» • Non l’avevate capito? • Un doppio senso...
  • 22. Make a new graphics
  • 23. DEMO
  • 24. Gift #4. The role of .NET (again)
  • 25. The role of .NET (again) • .NET everywhere • We live in a web world • We live in a mobile world • .NET in web =Web Assembly and Blazor! • Web allows to run on Mobile!
  • 26. Patterns, Coupling and making things right! • Using Canvas is always Javascript • Interoperability is necessary • 640/24=2626x26=676 tiles per screen • 5 sprites at the same time • 680 call per frame x 30times per second!!!! NO! • I call per frame30 calls per second. • So renderFrame to be rewritten in Javascript passing stage object (serializable in javascript!)
  • 27. Bring to the Web with Blazor • https://www.rallysharp.it/ • Azure StaticWeb Site • Improve it! • Networking in Azure • Make it more «casual gaming» (touch?) Touch point dy>dxup > dxup Javascript event back .net interop
  • 29. Gift #6. Other code for you https://github.com/marcoparenzan/MissileSharp https://github.com/marcoparenzan/Sharptris https://github.com/marcoparenzan/Sokosharp https://github.com/marcoparenzan/mariobros
  • 30. DOMANDE E RISPOSTE • BUON NATALEATUTTIVOI E ALLEVOSTRE FAMIGLIE!