SlideShare une entreprise Scribd logo
1  sur  45
Criando Jogos para o
Windows 8

José Antonio “jalf” Leal de Farias
CEO – Stairs Game Studio
Microsoft Most Valuable Professional
http://www.stairs.com.br

http://www.sharpgames.net
Introdução
• Aplicações estilo Metro focadas
  em Tablet / toque
• Roda em processadores ARM,
  Intel, e AMD
• GUI 100% acelerada via
  hardware
• Desktop clássico ainda vive
• Se seu PC roda o Windows 7
  ele pode rodar o Windows 8
• $10B em games por ano

• 145M de jogadores ativos somente nos EUA

• Mais de 50% de todas as „apps‟ são games

• Windows está se espalhando por uma gama maior de
  dispositivos
Top Questões sobre o Windows 8

• Qual a Diferença entre o Windows 8 o Windows 8 Pro e
  o Windows RT?
• WinRT API
• Ainda vai rodar o Battlefield??
• Usar o que? HTML5, XAML, C++, DirectX, Javascript,
  C#,…..
• E o Flash??

• E a Top Top Question: E   O XNA???
Metro style Apps                        Desktop App
  View




                              XAML                      HTML / CSS
Controller




                        C                C#
 Model




                                                        JavaScript    HTML         C
                       C++               VB                           JavaScrip
                                                                          t       C++
                                    WinRT APIs
  System Services




                    Communication      Graphics &         Devices &
                       & Data            Media             Printing

                                    Application Model                 Internet
                                                                      Explorer
                                                                                  Win32
Kern




                         Windows Kernel Services
 el
Game Components Típicos

                                     Seu Jogo


             Game                                Local      Connected
Graphics                 Audio     Cut Scenes                             Tools
             Input                              Services     Services

                                                Activatio                Compiler
  3-D        Touch      Sound FX   Streaming                 User ID
                                                    n                       s
                                                            Distributi   Debugger
2-D, Text   Sensors      Music      Effects     Storage
                                                               on            s
             Game                               Search &                   Asset
  UI
            Controlle                           Settings    Roaming      Processo
Controls
               rs                                  …                        rs
ref class MyApp : public IFrameworkView
{
public:

   MyApp();

   // IFrameworkView Methods
   virtual void Initialize(CoreApplicationView^ applicationView);
   virtual void SetWindow(CoreWindow^ window);
   virtual void Load(String^ entryPoint);
   virtual void Run();
   virtual void Uninitialize();
void MyApp::Run()
{
    auto dispatcher = CoreWindow::GetForCurrentThread()->Dispatcher;

    while (!m_windowClosed)
    {
        dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessAllIfPresent);
        m_renderer->Update();
        m_renderer->Render();
        m_renderer->Present();
    }
}
Full    Filled    Snapped
screen   4x3      Phone-like
16 x 9
void MyApp::SetWindow(CoreWindow^ window)
{
    window->SizeChanged +=
      ref new TypedEventHandler<CoreWindow^, WindowSizeChangedEventArgs^>(
        this, &MyApp::OnWindowSizeChanged);

    ApplicationView::GetForCurrentView()->ViewStateChanged +=
      ref new TypedEventHandler
        <ApplicationView^, ApplicationViewStateChangedEventArgs^>(
          this, &MyApp::OnViewStateChanged);
}
{{
     DisplayOrientations::None;            // Habilita a rotação pelo S.O./Acelerômetro
     DisplayOrientations::Landscape;       // Trava a rotação pelo S.O./Acelerômetro
     DisplayOrientations::LandscapeFlipped; // E habilita esta orientação
     DisplayOrientations::Portrait;
     DisplayOrientations::PortraitFlipped;
}

using namespace Windows::Graphics::Display;

DisplayProperties::AutoRotationPreferences = DisplayOrientations::Landscape
                                            | DisplayOrientations::LandscapeFlipped;
void MyApp::OnSuspending(Object^ sender, SuspendingEventArgs^ args)
{
    SuspendingDeferral^ deferral = args->SuspendingOperation->GetDeferral();

    task<void>([=]()
    {
        auto localState = ApplicationData::Current->LocalSettings->Values;
        auto roamingState = ApplicationData::Current->RoamingSettings->Values;
        localState->Insert(
          "GameTime", PropertyValue::CreateSingle(m_gameTime));
        roamingState->Insert(
          "MaxLevel", PropertyValue::CreateUInt32(m_maxLevelUnlocked));
    }).then([=]()
    {
        deferral->Complete();
    });
}
void MyApp::Load(String^ entryPoint)
{
    LoadMyGameStateAsync().then([=]()
    {
        auto localState = ApplicationData::Current->LocalSettings->Values;
        auto roamingState = ApplicationData::Current->RoamingSettings->Values;
        m_gameTime = safe_cast<IPropertyValue^>
             (localState->Lookup("GameTime"))->GetSingle();
        m_maxLevelUnlocked = safe_cast<IPropertyValue^>
             (roamingState->Lookup("MaxLevel"))->GetUInt32();
    }).then([=]()
    {
        m_loadingComplete = true;
    });
}
task<byte*> LoadSkyAsync()
{
    auto folder = Package::Current->InstalledLocation;
    return task<StorageFile^>(
    folder->GetFileAsync("sky.dds")).then([](StorageFile^ file){
        return FileIO::ReadBufferAsync(file);
    }).then([](IBuffer^ buffer){
        auto fileData = ref new Array<byte>(buffer->Length);
        DataReader::FromBuffer(buffer)->ReadBytes(fileData);
        return fileData->Data;
    });
}
...
LoadSkyAsync().then([=](byte* skyTextureData)
{
    CreateTexture(skyTextureData);
    m_loadingComplete = true;
});
// Setas ou WASD
auto upKeyState = window->GetKeyAsyncState(VirtualKey::Up);
auto wKeyState = window->GetAsyncKeyState(VirtualKey::W);

if (upKeyState & CoreVirtualKeyStates::Down ||
    wKeyState & CoreVirtualKeyStates::Down)
{
    m_playerPosition.y += 1.0f;
}
if ( m_xinputState.Gamepad.wButtons & XINPUT_GAMEPAD_A )
{
    m_aButtonWasPressed = true;
}
else if ( m_aButtonWasPressed )
{
    m_aButtonWasPressed = false;       // Dispare uma vez, quando soltar o botão
    TriggerSoundEffect();
}
// Cria o XAudio2 engine e o mastering voice na placa de audio default



// Carrega todo o audio e efeitos em memória
                          new


// Cria um único source voice para o som



// Dispara o som: enfileira na memória da placa e deixa pronto para tocar…
• Opções para Servidor
  • WNS, ASP, WCF, Azure
  • WebSockets – agora é um web standard o/
• Opções para Cliente
  • IPv4 TCP/UDP
  • IPv6 – é o futuro!
• Cenários
  • Nuvem, peer to peer, etc.
• Melhores Práticas
•   1   60Hz 16.66666ms
  •   2   30Hz 33.33333ms
  •   3   20Hz 50ms
  •   4   15Hz 66.66666ms

Present1( /* SyncInterval = */ 2, … );   // set to 30Hz
• Interoperável com o DirectX
  • <SwapChainBackgroundPanel>
  • <ImageBrush ImageSource=[DXGI Surface]>
José Antonio “jalf” Leal de Farias
Microsoft Most Valuable Professional
jalf@sharpgames.net
www.sharpgames.net
www.stairs.com.br
Twitter: @sharpgames

Contenu connexe

En vedette

PARTICIPACION EN EL BLOG
PARTICIPACION EN EL BLOGPARTICIPACION EN EL BLOG
PARTICIPACION EN EL BLOGpatricia sierra
 
Criando aplicativos para Windows 8 com HTML5 e JavaScript - InfoTech 2012
Criando aplicativos para Windows 8 com HTML5 e JavaScript - InfoTech 2012Criando aplicativos para Windows 8 com HTML5 e JavaScript - InfoTech 2012
Criando aplicativos para Windows 8 com HTML5 e JavaScript - InfoTech 2012André Paulovich
 
Apresentacao sem titulo
Apresentacao sem tituloApresentacao sem titulo
Apresentacao sem tituloliliana6895
 

En vedette (8)

la neige au_dakota
 la neige au_dakota la neige au_dakota
la neige au_dakota
 
Apresentaçãorochas
ApresentaçãorochasApresentaçãorochas
Apresentaçãorochas
 
Canes
CanesCanes
Canes
 
Imágenes de nuestro Colegio
Imágenes de nuestro ColegioImágenes de nuestro Colegio
Imágenes de nuestro Colegio
 
Jjddbenj2
Jjddbenj2Jjddbenj2
Jjddbenj2
 
PARTICIPACION EN EL BLOG
PARTICIPACION EN EL BLOGPARTICIPACION EN EL BLOG
PARTICIPACION EN EL BLOG
 
Criando aplicativos para Windows 8 com HTML5 e JavaScript - InfoTech 2012
Criando aplicativos para Windows 8 com HTML5 e JavaScript - InfoTech 2012Criando aplicativos para Windows 8 com HTML5 e JavaScript - InfoTech 2012
Criando aplicativos para Windows 8 com HTML5 e JavaScript - InfoTech 2012
 
Apresentacao sem titulo
Apresentacao sem tituloApresentacao sem titulo
Apresentacao sem titulo
 

Similaire à Criando jogos para o windows 8

Shape12 6
Shape12 6Shape12 6
Shape12 6pslulli
 
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!David Isbitski
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOSfpatton
 
[1D6]RE-view of Android L developer PRE-view
[1D6]RE-view of Android L developer PRE-view[1D6]RE-view of Android L developer PRE-view
[1D6]RE-view of Android L developer PRE-viewNAVER D2
 
InduSoft VBScript Webinar
 InduSoft VBScript Webinar InduSoft VBScript Webinar
InduSoft VBScript WebinarAVEVA
 
Windows 8 and windows phone 8 developer story anders bratland
Windows 8 and windows phone 8 developer story anders bratlandWindows 8 and windows phone 8 developer story anders bratland
Windows 8 and windows phone 8 developer story anders bratlandAnastasia Kladova
 
Catan world and Churchill
Catan world and ChurchillCatan world and Churchill
Catan world and ChurchillGrant Goodale
 
Implementation
ImplementationImplementation
Implementationhcicourse
 
Introduction to Windows 8 Development
Introduction to Windows 8 Development
Introduction to Windows 8 Development
Introduction to Windows 8 Development Naresh Kumar
 
ArcReady - Architecting For The Client Tier
ArcReady - Architecting For The Client TierArcReady - Architecting For The Client Tier
ArcReady - Architecting For The Client TierMicrosoft ArcReady
 
A lap around mango
A lap around mangoA lap around mango
A lap around mangoAndy Chiang
 
Windows 8 App Developer Day
Windows 8 App Developer DayWindows 8 App Developer Day
Windows 8 App Developer DayPatric Boscolo
 
WPF - the future of GUI is near
WPF - the future of GUI is nearWPF - the future of GUI is near
WPF - the future of GUI is nearBartlomiej Filipek
 
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...Paris Open Source Summit
 
There's more than web
There's more than webThere's more than web
There's more than webMatt Evans
 
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...Ted Chien
 

Similaire à Criando jogos para o windows 8 (20)

Shape12 6
Shape12 6Shape12 6
Shape12 6
 
Win8 ru
Win8 ruWin8 ru
Win8 ru
 
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 
Abc2011 2 yagi
Abc2011 2 yagiAbc2011 2 yagi
Abc2011 2 yagi
 
[1D6]RE-view of Android L developer PRE-view
[1D6]RE-view of Android L developer PRE-view[1D6]RE-view of Android L developer PRE-view
[1D6]RE-view of Android L developer PRE-view
 
InduSoft VBScript Webinar
 InduSoft VBScript Webinar InduSoft VBScript Webinar
InduSoft VBScript Webinar
 
Windows 8 and windows phone 8 developer story anders bratland
Windows 8 and windows phone 8 developer story anders bratlandWindows 8 and windows phone 8 developer story anders bratland
Windows 8 and windows phone 8 developer story anders bratland
 
Kinect de-theremin
Kinect de-thereminKinect de-theremin
Kinect de-theremin
 
Catan world and Churchill
Catan world and ChurchillCatan world and Churchill
Catan world and Churchill
 
Implementation
ImplementationImplementation
Implementation
 
Introduction to Windows 8 Development
Introduction to Windows 8 Development
Introduction to Windows 8 Development
Introduction to Windows 8 Development
 
ArcReady - Architecting For The Client Tier
ArcReady - Architecting For The Client TierArcReady - Architecting For The Client Tier
ArcReady - Architecting For The Client Tier
 
A lap around mango
A lap around mangoA lap around mango
A lap around mango
 
Windows 8 App Developer Day
Windows 8 App Developer DayWindows 8 App Developer Day
Windows 8 App Developer Day
 
WPF - the future of GUI is near
WPF - the future of GUI is nearWPF - the future of GUI is near
WPF - the future of GUI is near
 
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
 
There's more than web
There's more than webThere's more than web
There's more than web
 
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
 
Eco system apps
Eco system appsEco system apps
Eco system apps
 

Plus de José Farias

Introdução ao cocos sharp
Introdução ao cocos sharpIntrodução ao cocos sharp
Introdução ao cocos sharpJosé Farias
 
Por dentro do ID@Xbox
Por dentro do ID@XboxPor dentro do ID@Xbox
Por dentro do ID@XboxJosé Farias
 
10 questões sobre o futuro dos Games
10 questões sobre o futuro dos Games10 questões sobre o futuro dos Games
10 questões sobre o futuro dos GamesJosé Farias
 
Introdução do DirectX com C++
Introdução do DirectX com C++Introdução do DirectX com C++
Introdução do DirectX com C++José Farias
 
É Hora de criar sua própria engine de jogos?
É Hora de criar sua própria engine de jogos?É Hora de criar sua própria engine de jogos?
É Hora de criar sua própria engine de jogos?José Farias
 
Playstation Mobile - Campus Party 2013
Playstation Mobile - Campus Party 2013Playstation Mobile - Campus Party 2013
Playstation Mobile - Campus Party 2013José Farias
 
Criando Jogos com HTML5
Criando Jogos com HTML5Criando Jogos com HTML5
Criando Jogos com HTML5José Farias
 
Criando Jogos Sofisticados com DirectX
Criando Jogos Sofisticados com DirectXCriando Jogos Sofisticados com DirectX
Criando Jogos Sofisticados com DirectXJosé Farias
 
Criando aplicativos para o windows 8
Criando aplicativos para o windows 8Criando aplicativos para o windows 8
Criando aplicativos para o windows 8José Farias
 
Introdução ao XNA
Introdução ao XNAIntrodução ao XNA
Introdução ao XNAJosé Farias
 
Oportunidades com o XNA
Oportunidades com o XNAOportunidades com o XNA
Oportunidades com o XNAJosé Farias
 
Publicando jogos na Xbox Live Arcade
Publicando jogos na Xbox Live ArcadePublicando jogos na Xbox Live Arcade
Publicando jogos na Xbox Live ArcadeJosé Farias
 
Como ganhar dinheiro com games
Como ganhar dinheiro com gamesComo ganhar dinheiro com games
Como ganhar dinheiro com gamesJosé Farias
 
Criando jogos com xna para o windows phone
Criando jogos com xna para o windows phoneCriando jogos com xna para o windows phone
Criando jogos com xna para o windows phoneJosé Farias
 
Criando jogos com o kinect
Criando jogos com o kinectCriando jogos com o kinect
Criando jogos com o kinectJosé Farias
 
Xna Touch Campus Party
Xna Touch  Campus PartyXna Touch  Campus Party
Xna Touch Campus PartyJosé Farias
 
IntroduçãO Ao Xna Campus Party
IntroduçãO Ao Xna  Campus PartyIntroduçãO Ao Xna  Campus Party
IntroduçãO Ao Xna Campus PartyJosé Farias
 

Plus de José Farias (20)

Introdução ao cocos sharp
Introdução ao cocos sharpIntrodução ao cocos sharp
Introdução ao cocos sharp
 
Por dentro do ID@Xbox
Por dentro do ID@XboxPor dentro do ID@Xbox
Por dentro do ID@Xbox
 
10 questões sobre o futuro dos Games
10 questões sobre o futuro dos Games10 questões sobre o futuro dos Games
10 questões sobre o futuro dos Games
 
Radioino
RadioinoRadioino
Radioino
 
MonoGame business
MonoGame businessMonoGame business
MonoGame business
 
Introdução do DirectX com C++
Introdução do DirectX com C++Introdução do DirectX com C++
Introdução do DirectX com C++
 
É Hora de criar sua própria engine de jogos?
É Hora de criar sua própria engine de jogos?É Hora de criar sua própria engine de jogos?
É Hora de criar sua própria engine de jogos?
 
Playstation Mobile - Campus Party 2013
Playstation Mobile - Campus Party 2013Playstation Mobile - Campus Party 2013
Playstation Mobile - Campus Party 2013
 
Criando Jogos com HTML5
Criando Jogos com HTML5Criando Jogos com HTML5
Criando Jogos com HTML5
 
Criando Jogos Sofisticados com DirectX
Criando Jogos Sofisticados com DirectXCriando Jogos Sofisticados com DirectX
Criando Jogos Sofisticados com DirectX
 
Criando aplicativos para o windows 8
Criando aplicativos para o windows 8Criando aplicativos para o windows 8
Criando aplicativos para o windows 8
 
Network com XNA
Network com XNANetwork com XNA
Network com XNA
 
Introdução ao XNA
Introdução ao XNAIntrodução ao XNA
Introdução ao XNA
 
Oportunidades com o XNA
Oportunidades com o XNAOportunidades com o XNA
Oportunidades com o XNA
 
Publicando jogos na Xbox Live Arcade
Publicando jogos na Xbox Live ArcadePublicando jogos na Xbox Live Arcade
Publicando jogos na Xbox Live Arcade
 
Como ganhar dinheiro com games
Como ganhar dinheiro com gamesComo ganhar dinheiro com games
Como ganhar dinheiro com games
 
Criando jogos com xna para o windows phone
Criando jogos com xna para o windows phoneCriando jogos com xna para o windows phone
Criando jogos com xna para o windows phone
 
Criando jogos com o kinect
Criando jogos com o kinectCriando jogos com o kinect
Criando jogos com o kinect
 
Xna Touch Campus Party
Xna Touch  Campus PartyXna Touch  Campus Party
Xna Touch Campus Party
 
IntroduçãO Ao Xna Campus Party
IntroduçãO Ao Xna  Campus PartyIntroduçãO Ao Xna  Campus Party
IntroduçãO Ao Xna Campus Party
 

Dernier

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Dernier (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Criando jogos para o windows 8

  • 1. Criando Jogos para o Windows 8 José Antonio “jalf” Leal de Farias CEO – Stairs Game Studio Microsoft Most Valuable Professional
  • 3. Introdução • Aplicações estilo Metro focadas em Tablet / toque • Roda em processadores ARM, Intel, e AMD • GUI 100% acelerada via hardware • Desktop clássico ainda vive • Se seu PC roda o Windows 7 ele pode rodar o Windows 8
  • 4. • $10B em games por ano • 145M de jogadores ativos somente nos EUA • Mais de 50% de todas as „apps‟ são games • Windows está se espalhando por uma gama maior de dispositivos
  • 5. Top Questões sobre o Windows 8 • Qual a Diferença entre o Windows 8 o Windows 8 Pro e o Windows RT? • WinRT API • Ainda vai rodar o Battlefield?? • Usar o que? HTML5, XAML, C++, DirectX, Javascript, C#,….. • E o Flash?? • E a Top Top Question: E O XNA???
  • 6.
  • 7. Metro style Apps Desktop App View XAML HTML / CSS Controller C C# Model JavaScript HTML C C++ VB JavaScrip t C++ WinRT APIs System Services Communication Graphics & Devices & & Data Media Printing Application Model Internet Explorer Win32 Kern Windows Kernel Services el
  • 8. Game Components Típicos Seu Jogo Game Local Connected Graphics Audio Cut Scenes Tools Input Services Services Activatio Compiler 3-D Touch Sound FX Streaming User ID n s Distributi Debugger 2-D, Text Sensors Music Effects Storage on s Game Search & Asset UI Controlle Settings Roaming Processo Controls rs … rs
  • 9.
  • 10.
  • 11.
  • 12. ref class MyApp : public IFrameworkView { public: MyApp(); // IFrameworkView Methods virtual void Initialize(CoreApplicationView^ applicationView); virtual void SetWindow(CoreWindow^ window); virtual void Load(String^ entryPoint); virtual void Run(); virtual void Uninitialize();
  • 13.
  • 14. void MyApp::Run() { auto dispatcher = CoreWindow::GetForCurrentThread()->Dispatcher; while (!m_windowClosed) { dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessAllIfPresent); m_renderer->Update(); m_renderer->Render(); m_renderer->Present(); } }
  • 15.
  • 16.
  • 17.
  • 18. Full Filled Snapped screen 4x3 Phone-like 16 x 9
  • 19. void MyApp::SetWindow(CoreWindow^ window) { window->SizeChanged += ref new TypedEventHandler<CoreWindow^, WindowSizeChangedEventArgs^>( this, &MyApp::OnWindowSizeChanged); ApplicationView::GetForCurrentView()->ViewStateChanged += ref new TypedEventHandler <ApplicationView^, ApplicationViewStateChangedEventArgs^>( this, &MyApp::OnViewStateChanged); }
  • 20. {{ DisplayOrientations::None; // Habilita a rotação pelo S.O./Acelerômetro DisplayOrientations::Landscape; // Trava a rotação pelo S.O./Acelerômetro DisplayOrientations::LandscapeFlipped; // E habilita esta orientação DisplayOrientations::Portrait; DisplayOrientations::PortraitFlipped; } using namespace Windows::Graphics::Display; DisplayProperties::AutoRotationPreferences = DisplayOrientations::Landscape | DisplayOrientations::LandscapeFlipped;
  • 21.
  • 22. void MyApp::OnSuspending(Object^ sender, SuspendingEventArgs^ args) { SuspendingDeferral^ deferral = args->SuspendingOperation->GetDeferral(); task<void>([=]() { auto localState = ApplicationData::Current->LocalSettings->Values; auto roamingState = ApplicationData::Current->RoamingSettings->Values; localState->Insert( "GameTime", PropertyValue::CreateSingle(m_gameTime)); roamingState->Insert( "MaxLevel", PropertyValue::CreateUInt32(m_maxLevelUnlocked)); }).then([=]() { deferral->Complete(); }); }
  • 23. void MyApp::Load(String^ entryPoint) { LoadMyGameStateAsync().then([=]() { auto localState = ApplicationData::Current->LocalSettings->Values; auto roamingState = ApplicationData::Current->RoamingSettings->Values; m_gameTime = safe_cast<IPropertyValue^> (localState->Lookup("GameTime"))->GetSingle(); m_maxLevelUnlocked = safe_cast<IPropertyValue^> (roamingState->Lookup("MaxLevel"))->GetUInt32(); }).then([=]() { m_loadingComplete = true; }); }
  • 24. task<byte*> LoadSkyAsync() { auto folder = Package::Current->InstalledLocation; return task<StorageFile^>( folder->GetFileAsync("sky.dds")).then([](StorageFile^ file){ return FileIO::ReadBufferAsync(file); }).then([](IBuffer^ buffer){ auto fileData = ref new Array<byte>(buffer->Length); DataReader::FromBuffer(buffer)->ReadBytes(fileData); return fileData->Data; }); } ... LoadSkyAsync().then([=](byte* skyTextureData) { CreateTexture(skyTextureData); m_loadingComplete = true; });
  • 25.
  • 26.
  • 27. // Setas ou WASD auto upKeyState = window->GetKeyAsyncState(VirtualKey::Up); auto wKeyState = window->GetAsyncKeyState(VirtualKey::W); if (upKeyState & CoreVirtualKeyStates::Down || wKeyState & CoreVirtualKeyStates::Down) { m_playerPosition.y += 1.0f; }
  • 28. if ( m_xinputState.Gamepad.wButtons & XINPUT_GAMEPAD_A ) { m_aButtonWasPressed = true; } else if ( m_aButtonWasPressed ) { m_aButtonWasPressed = false; // Dispare uma vez, quando soltar o botão TriggerSoundEffect(); }
  • 29.
  • 30.
  • 31. // Cria o XAudio2 engine e o mastering voice na placa de audio default // Carrega todo o audio e efeitos em memória new // Cria um único source voice para o som // Dispara o som: enfileira na memória da placa e deixa pronto para tocar…
  • 32.
  • 33. • Opções para Servidor • WNS, ASP, WCF, Azure • WebSockets – agora é um web standard o/ • Opções para Cliente • IPv4 TCP/UDP • IPv6 – é o futuro! • Cenários • Nuvem, peer to peer, etc. • Melhores Práticas
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40. 1 60Hz 16.66666ms • 2 30Hz 33.33333ms • 3 20Hz 50ms • 4 15Hz 66.66666ms Present1( /* SyncInterval = */ 2, … ); // set to 30Hz
  • 41. • Interoperável com o DirectX • <SwapChainBackgroundPanel> • <ImageBrush ImageSource=[DXGI Surface]>
  • 42.
  • 43.
  • 44.
  • 45. José Antonio “jalf” Leal de Farias Microsoft Most Valuable Professional jalf@sharpgames.net www.sharpgames.net www.stairs.com.br Twitter: @sharpgames

Notes de l'éditeur

  1. Disclaimers
  2. Disclaimers
  3. Disclaimers
  4. Disclaimers