• Content count

  • Joined

  • Last visited

Community Reputation

204 Neutral

About Vanz

  • Rank
  1. Unity Unity Engine

    What decent games were made using game maker studio? Or what are the best selling ones...
  2. Unity Unity Engine

    Yes, I believe you are right on both accounts kburkhart84, I think I'm just being stubborn about wanting to use what I am more familiar with. If I use a game engine I should stick to it 100%, I'm just worried I'll get to a point and there will be an error in the engine or something I can't over come using the engine where as coding with c++ I feel like I can overcome almost any obstacle.    Looking more closely at the solution file your right just dll's...   I'll take a closer look at GMStudio per your recommendation, I just though Unity had a bigger user base and was more established even though it wasn't focused on 2d...
  3. Unity Unity Engine

    Unity just recently added full 2d support:   When I choose "Build and Run" under Windows Store Apps I can select "D3D11 C++ solution" and get a full solution file that I can pull up and edit in VS 2013, haven't looked at it closely though, could be a completely garbled mess...
  4. Anyone use the Unity Engine much, any cons or issues?   Been playing around with and it seems pretty cool... I'm into making a 2d physics type game to run in Windows Store and work on Surface Pro and RT. Want my game to be like the game "Cut the Rope" in terms of nice clean and smooth moving graphics and object movements defined by real world physics, but my concept is totally different.   At this point I'm thinking of using Unity to export the c++ code after I get the sprites moving smoothly, mouse, sound and the touch portion working. Then continue on in c++. So basically use Unity to create a Windows Store compatible template with smooth graphics and all the input/outputs then jump back to c++ for all the rest...   At any rate would be interested in your experience and comments...   Thanks,,   Vanz
  5. I don't have a team or a team foundation server...
  6. Trying to get some Windows 8.0 Visual Studio 2012 C++ solution files to work on Visual Studio 2013 C++ and Windows 8.1, when I go to open the solution file it says I need to "Retarget your Windows Store app to Windows 8.1"   okay what the frick, I'll play along... Now I need to open the folder that contains the solution file, okay I finally found the "Source Control Explorer" but it won't let me open anything, it's all greyed out except for the refresh button?? Do I need to sign up for something to use this feature just so I can open my older project? I really hate signing up for stuff, plus it's not even clear what exactly I need to sign up for...   Finding working in Visual Studio 2013 C++ and Windows 8.1 to be pretty frustrating so far...   Vanz        
  7. Direct3D Sprites

    Nope, C++/CLI. It's .NET for C++. The [tt]operator::[/tt], is the scope resolution operator. The single colon afterwards is the member initializer list. This line of code basically reads: Here follows the constructor of [tt]SimpleSprites[/tt], initialize [tt]m_numParticlesToDraw[/tt] to the [tt]InitialParticleCount[/tt] of [tt]Performance[/tt] in [tt]SampleSettings[/tt].     what about the double double colon:   SampleSettings::Performance::InitialParticleCoun
  8. Direct3D Sprites

    Also for this command:   "BasicLoader^ loader = ref new BasicLoader(m_d3dDevice.Get(), m_wicFactory.Get());"   What does the "ref new" and "^" exactly do, is this allocating memory for a pointer function?
  9. Direct3D Sprites

    Learning C++, can someone please explain how the following works or point me to on-line tutorial or book covering topic:     SimpleSprites::SimpleSprites() : m_numParticlesToDraw(SampleSettings::Performance::InitialParticleCount)   How does f::f: work and f::f::f ?   Basically I'm trying to really understand the following code, it's from an sdk: //// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF //// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO //// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A //// PARTICULAR PURPOSE. //// //// Copyright (c) Microsoft Corporation. All rights reserved #include "pch.h" #include "SimpleSprites.h" #include "BasicLoader.h" using namespace Microsoft::WRL; using namespace Windows::Foundation; using namespace Windows::Foundation::Collections; using namespace Windows::UI::Core; using namespace BasicSprites; SimpleSprites::SimpleSprites() : m_numParticlesToDraw(SampleSettings::Performance::InitialParticleCount) { } void SimpleSprites::CreateDeviceIndependentResources() { DirectXBase::CreateDeviceIndependentResources(); // Create the performance throttler. m_autoThrottle = ref new AutoThrottle(SampleSettings::Performance::TargetFrameTime); } void SimpleSprites::CreateDeviceResources() { DirectXBase::CreateDeviceResources(); // Create the sprite batch. m_spriteBatch = ref new SpriteBatch(); unsigned int capacity = SampleSettings::Performance::ParticleCountMax + SampleSettings::NumAsteroids + 1; if (m_featureLevel < D3D_FEATURE_LEVEL_9_3) { capacity = min(Parameters::MaximumCapacityCompatible, capacity); } m_spriteBatch->Initialize( m_d3dDevice.Get(), capacity ); // Load the sprite textures. BasicLoader^ loader = ref new BasicLoader(m_d3dDevice.Get(), m_wicFactory.Get()); loader->LoadTexture( "m31.png", &m_background, nullptr ); m_spriteBatch->AddTexture(m_background.Get()); loader->LoadTexture( "", &m_asteroid, nullptr ); m_spriteBatch->AddTexture(m_asteroid.Get()); loader->LoadTexture( "", &m_particle, nullptr ); m_spriteBatch->AddTexture(m_particle.Get()); // Create the Sample Overlay. m_sampleOverlay = ref new SampleOverlay(); m_sampleOverlay->Initialize( m_d2dDevice.Get(), m_d2dContext.Get(), m_wicFactory.Get(), m_dwriteFactory.Get(), "Direct3D SpriteBatch sample" ); } void SimpleSprites::CreateWindowSizeDependentResources() { DirectXBase::CreateWindowSizeDependentResources(); // Randomly generate some non-interactive asteroids to fit the screen. m_asteroidData.clear(); for (int i = 0; i < SampleSettings::NumAsteroids; i++) { AsteroidData data; data.pos.x = RandFloat(0.0f, m_windowBounds.Width); data.pos.y = RandFloat(0.0f, m_windowBounds.Height); float tempRot = RandFloat(-PI_F, PI_F); float tempMag = RandFloat(0.0f, 17.0f); data.vel.x = tempMag * cosf(tempRot); data.vel.y = tempMag * sinf(tempRot); data.rot = RandFloat(-PI_F, PI_F); data.scale = RandFloat(0.1f, 1.0f); data.rotVel = RandFloat(-PI_F, PI_F) / (7.0f + 3.0f * data.scale); m_asteroidData.push_back(data); } if (m_particleData.size() == 0) { // Initialize the interactive particle buffer to fill the window if it is empty. for (int i = 0; i < SampleSettings::Performance::ParticleCountMax; i++) { ParticleData data; data.pos.x = RandFloat(0.0f, m_windowBounds.Width); data.pos.y = RandFloat(0.0f, m_windowBounds.Height); data.vel = float2(0.0f, 0.0f); m_particleData.push_back(data); } } else { // Otherwise, move the interactive particles to fit within the screen. for (auto particle = m_particleData.begin(); particle != m_particleData.end(); particle++) { if (particle->pos.x > m_windowBounds.Width) { particle->pos.x = m_windowBounds.Width; } if (particle->pos.y > m_windowBounds.Height) { particle->pos.y = m_windowBounds.Height; } } } m_sampleOverlay->UpdateForWindowSizeChange(); } void SimpleSprites::Update(float timeTotal, float timeDelta) { // Update the performance throttler. auto control = m_autoThrottle->Update(timeDelta); if (control == FrameWorkload::Increase) { m_numParticlesToDraw += SampleSettings::Performance::ParticleCountDelta; } if (control == FrameWorkload::Decrease) { m_numParticlesToDraw -= SampleSettings::Performance::ParticleCountDelta; } if (control != FrameWorkload::Maintain) { m_numParticlesToDraw = max(SampleSettings::Performance::ParticleCountMin, min(SampleSettings::Performance::ParticleCountMax, m_numParticlesToDraw)); if (m_featureLevel < D3D_FEATURE_LEVEL_9_3) { m_numParticlesToDraw = min(static_cast<int>(Parameters::MaximumCapacityCompatible - SampleSettings::NumAsteroids - 1), m_numParticlesToDraw); } } // Update the non-interactive asteroids. // Their behavior is to drift across the window with a fixed translational and rotational // velocity. Upon crossing a boundary outside the window, their position wraps. for (auto asteroid = m_asteroidData.begin(); asteroid != m_asteroidData.end(); asteroid++) { static const float border = 100.0f; asteroid->pos = asteroid->pos + asteroid->vel * timeDelta; if (asteroid->vel.x < 0) { if (asteroid->pos.x < -border) { asteroid->pos.x = m_windowBounds.Width + border; } } else { if (asteroid->pos.x > m_windowBounds.Width + border) { asteroid->pos.x = -border; } } if (asteroid->vel.y < 0) { if (asteroid->pos.y < -border) { asteroid->pos.y = m_windowBounds.Height + border; } } else { if (asteroid->pos.y > m_windowBounds.Height + border) { asteroid->pos.y = -border; } } asteroid->rot += asteroid->rotVel * timeDelta; if (asteroid->rot > PI_F) { asteroid->rot -= 2.0f * PI_F; } if (asteroid->rot < -PI_F) { asteroid->rot += 2.0f * PI_F; } } // Update the interactive particles. // Their behavior is to be gravitationally attracted to two oscillating gravity // wells and repelled by any pressed pointer points. Upon reaching the edge of // the window, the particles bounce. // Add two gravity wells that move throughout the window. float2 wellPositions[] = { float2( (1.0f + 0.8f * cosf(timeTotal / (2.0f * PI_F) + 3.0f)) * m_windowBounds.Width / 2.0f, (1.0f + 0.8f * sinf(timeTotal / 5.0f)) * m_windowBounds.Height / 2.0f ), float2( (1.0f + 0.8f * cosf(timeTotal / (PI_F * PI_F) + 1.0f)) * m_windowBounds.Width / 2.0f, (1.0f + 0.8f * sinf(timeTotal / PI_F)) * m_windowBounds.Height / 2.0f ) }; for (auto particle = m_particleData.begin(); particle != m_particleData.begin() + m_numParticlesToDraw; particle++) { if (particle->pos.x < 0) { particle->vel.x = abs(particle->vel.x); } if (particle->pos.x > m_windowBounds.Width) { particle->vel.x = -abs(particle->vel.x); } if (particle->pos.y < 0) { particle->vel.y = abs(particle->vel.y); } if (particle->pos.y > m_windowBounds.Height) { particle->vel.y = -abs(particle->vel.y); } for (auto repulsor = m_repulsors.begin(); repulsor != m_repulsors.end(); repulsor++) { float2 delta = particle->pos - repulsor->second; float deltaLength = length(delta) + 24.0f; // Offset length to avoid division by zero. float deltaLengthCubed = deltaLength * deltaLength * deltaLength; particle->vel = particle->vel + SampleSettings::Physics::Gravity * timeDelta * delta / deltaLengthCubed; } for (int i = 0; i < ARRAYSIZE(wellPositions); i++) { float gravitySign = 1.0f; if ((static_cast<int>(timeTotal / 2.0f) + 1) % 10 == 0) { // Every 20 seconds, "explode" the gravity wells for 2 seconds. gravitySign = -1.0f; } float2 delta = wellPositions[i] - particle->pos; float deltaLength = length(delta) + 24.0f; float deltaLengthCubed = deltaLength * deltaLength * deltaLength; particle->vel = particle->vel + gravitySign * 0.2f * SampleSettings::Physics::Gravity * timeDelta * delta / deltaLengthCubed; } particle->vel = particle->vel * (1.0f - SampleSettings::Physics::Damping); // Add random noise to the velocity to prevent particles from locking together. particle->vel.x += RandFloat(-0.5f, 0.5f); particle->vel.y += RandFloat(-0.5f, 0.5f); particle->pos = particle->pos + particle->vel * timeDelta; } } void SimpleSprites::Render() { m_d3dContext->OMSetRenderTargets( 1, m_d3dRenderTargetView.GetAddressOf(), nullptr ); m_d3dContext->ClearRenderTargetView( m_d3dRenderTargetView.Get(), reinterpret_cast<float*>(&D2D1::ColorF(D2D1::ColorF::MidnightBlue)) ); m_spriteBatch->Begin(); // Draw the background. m_spriteBatch->Draw( m_background.Get(), float2(0.5f, 0.5f), PositionUnits::Normalized, float2(1.0f, 1.0f), SizeUnits::Normalized ); // Draw the non-interactive asteroids. for (auto asteroid = m_asteroidData.begin(); asteroid != m_asteroidData.end(); asteroid++) { m_spriteBatch->Draw( m_asteroid.Get(), asteroid->pos, PositionUnits::DIPs, float2(1.0f, 1.0f) * asteroid->scale, SizeUnits::Normalized, float4(0.8f, 0.8f, 1.0f, 1.0f), asteroid->rot ); } // Draw the interactive particles. for (auto particle = m_particleData.begin(); particle != m_particleData.begin() + m_numParticlesToDraw; particle++) { float alpha = length(particle->vel) / 200.0f; m_spriteBatch->Draw( m_particle.Get(), particle->pos, PositionUnits::DIPs, float2(32.0f, 32.0f), SizeUnits::DIPs, float4(0.1f, 0.02f, 0.0f, alpha), 0.0f, BlendMode::Additive ); } m_spriteBatch->End(); // Render the Sample Overlay. m_sampleOverlay->Render(); } float SimpleSprites::RandFloat(float min, float max) { return (static_cast<float>(rand() % RAND_MAX) / static_cast<float>(RAND_MAX)) * (max - min) + min; } void SimpleSprites::AddRepulsor(_In_ uint32 id, _In_ float2 position) { m_repulsors[id] = position; } void SimpleSprites::MoveRepulsor(_In_ uint32 id, _In_ float2 position) { m_repulsors[id] = position; } void SimpleSprites::RemoveRepulsor(_In_ uint32 id) { m_repulsors.erase(id); }
  10.     I'm glad I asked, hadn't heard of that...
  11. Please select from the poll, program needs to work on the Surface Pro and Surface RT.   I have discounted SFML as it is not compatible with Windows RT.     Thanks,   Vanz
  12. Well finally found a c++ program from the win 8.1 sdk that has 2d spites flying around my surface pro screen (see attached program), but I found stepping through it a bit frustrating, had to navigate (F11) 4 files deep just to get to the main animation loop. Found it pretty convoluted, guess I'm pretty rusty in my c++, can anyone recommend a book that would get me up to speed on the attached code? I like what the code is doing, just not understanding all of it very well at this point...   I also found using Visual 2013 on my surface that the editor is bound to the desktop but the .exe ran in metro mode, so I couldn't step through the program using F11 and see the screen update.  Is there a way I could have a smaller window in desktop mode for debugging, then sometimes run the compiler and have it switch to full screen in Metro mode?   Program also has touch control so it's nice to see that implemented in the same program, you can touch the screen and it affect the gravity wells... but it sure would be  nice if I could get a simpler program, can anyone post or create a program of just one 2d sprite moving around the win 8.1 Metro screen smoothly?   Thanks,   Vanz
  13. SFML

    Looking into designing a 2D based physics based game for the Windows Surface tablets. Would want my game to look and feel like Angry Birds or Cut the Rope, in terms of nice crisp moving graphics, but my concept is totally different is SFML the best way to go or would you recommend something else?    Some Questions about SFML: Have you used SFML, would you please provide your honest feedback on using it? What if I spend a ton of time using it, then they don't support it anymore am I basically screwed? I guess I'm basically concerned about the future of it. I don't see how they make revenue from SFML as it appears free? What's keeping it from collapsing or not being maintained Will games programmed in SFML work with on Windows RT? SFML vs. GDI+? Seems like GDI+ is harder, but I already know GDI well, and seems like GDI+ has a solid future, would it make more sense for me to stick with GDI+? Not SFML question but I’ll ask here anyways, I know Poser already, what other program(s) are generally used to make nice smooth looking graphics like  in Angry Birds or Cut the Rope or is this really just the artist being great and using any program? Does SFML support touch screen? Can it be encorporated?   Thanks,   Vanz
  14. Anyone know how the ad system works in the Windows games? Some games are listed as free but then there are ads within the game, I'm wondering how this system works and how the developer generates revenue from this?   Thanks,   rh
  15.   Thanks frob,   Is there a way to compile programs to run on RT? If I had a simple program how could I get it to run on RT metro interface?