Jump to content
  • Advertisement

VisualChaser

Member
  • Content Count

    20
  • Joined

  • Last visited

Community Reputation

400 Neutral

About VisualChaser

  • Rank
    Member

Personal Information

  • Website
  • Role
    Business Development
    Game Designer
    Programmer
  • Interests
    Business
    Design
    DevOps
    Education
    Production
    Programming
    QA

Social

  • Twitter
    _FlyingPotato_
  • Twitch
    Gaseline
  • Steam
    gaseline11
  1. I'm using EnableAutoDepthStencil and not doing any manual work on the depth buffer. This should be sufficient right? The render states are already being set right before drawing the geometry since they get switched on and off between 3D and GUI rendering. EDIT: I figured out the problem. Turned out that I was applying multisampling to the backbuffer and auto depth buffer while rendering the scene to a texture surface. I didn't know this case should be handled differently. I'm now applying multisampling to a seperate render target and using StretchRect to copy it to the scene texture. I also had to create a manual depth surface with multisampling because I work with multiple render targets for my shaders, only 1 of those is using multisampling. It's still unclear to me as to why everything worked on AMD and Intel hardware, and not on NVIDIA, but everything is working perfectly now. Thanks for the ideas!
  2. This is what it looks like on the NVIDIA cards. The scene is rendered front to back. Other DirectX 9 games run fine on these cards though, but not my project. I tried running the app using the debug library and dll but then it only shows some general info in the console on start. I don't think I can enable the full debug runtime as all machines are running Windows 10, the option for debug mode is disabled in the control panel. Good idea, but no results unfortunately. I ran it on the Intel IGP on 2 machines and both worked fine.
  3. I'm currently working on some old DirectX 9 code and ran into an issue with anti-aliasing. The game works perfectly fine when running it normally, both on AMD and NVIDIA graphics cards (tested 4 cards in total). Without changing any code at all but only setting m_d3dpp.MultiSampleType to something other than D3DMULTISAMPLE_NONE, the game still works as expected with anti-aliasing visibly active on the AMD cards but the entire scene breaks on the NVIDIA cards. There everything looks like z writing is completely disabled, pixels being drawn in order of the draw calls no matter if they are behind something. I already use CheckDeviceMultiSampleType to detect which settings are supported, and tried to manually set both the format and quality level to different values. All give me the same results. The game also checks various functions such as clearing the z buffer on errors, all succeed as if nothing is broken. Any ideas on what could cause this device specific issue?
  4. VisualChaser

    Line of sight

    I managed to fix it, thanks for the help :)
  5. VisualChaser

    Line of sight

    Using vectors how? Sorry I'm kind of a newbie when it comes to maths.
  6. VisualChaser

    Line of sight

    That's the current behavior the code below the picture creates.   By the way, I use the same codes to calculate the enemy rotation for targeting the player and it works fine, but somehow it is buggy when I use it for the line of sight.
  7. VisualChaser

    Line of sight

    I am currently working on a game in flash (with AS3), and I ran into a weird issue with the line of sight of the enemies. It's easier to explain with a picture. Blue = walls. Green = enemy. Red = area the enemy can't see the player.     This is the codes: var playerVisible:Boolean = true; var angleRadian = Math.atan2(_player.y - _enemy[i].y, _player.x - _enemy[i].x); var angleDegree = angleRadian * 180 / Math.PI; var enemyDistancex:Number = _player.x - _enemy[i].x; var enemyDistancey:Number = _player.y - _enemy[i].y; if(enemyDistancex < 0) enemyDistancex *= -1; if(enemyDistancey < 0) enemyDistancey *= -1; var enemyDistance:Number = Math.sqrt((enemyDistancex * enemyDistancex) + (enemyDistancey * enemyDistancey)); while(enemyDistance > 0 && playerVisible) { if(_walls.hitTestPoint(_enemy[i].x - (Math.sin(angleDegree * (Math.PI / 180)) * enemyDistance), _enemy[i].y - (Math.cos(angleDegree * (Math.PI / 180) * -1) * enemyDistance), true)) { playerVisible = false; } enemyDistance--; } I tried a lot, but I can't seem to figure it out. Could someone help me out?
  8. VisualChaser

    Game crashes when running the .exe

    Sorry I forgot to mention that I do have error handling in all my initialize and load functions. I still haven't found what's causing the crash. When I start the game I see all the objects and background but nothing moves, I even hear the background music, and then after 1 or 2 seconds I get the "Game.exe has stopped working" message. I tried to remove everything from FMOD from the game one more time, but that didn't help either. The only thing I'm not sure about are the extern class variables. I'm defining new class variables in my main .cpp file, and defining external variables for them in the other .cpp files. This is correct right? I'm not using those types. I only use D3DXVECTOR3 for the texture positions. Could this in any way cause my crash? Both debug and release mode work fine in the IDE, and they both crash when I run it outside of the IDE. Visual C++ always gives errors or at least warnings for uninitialized data, or am I wrong? EDIT: I found the issue. It was a char variable for displaying scores that was defined as a new char twice. The debugger somehow ignored it but it caused the game to crash outside Visual C++. Thanks for all the suggestions!
  9. I recently started translating a small platformer game from C# to C++ as a school project. The game works perfectly fine when I run it in debug and release mode in Visual C++, but when I run the .exe in the release folder it crashes after 1 second. It only shows a frozen image of the game and then instantly crashes. I copied the game data such as textures and music to the release folder so it's not missing any files. I figured out that it can't be caused by DirectX either because it shows all the textures, but frozen, so it's not getting through the update function. For sounds I'm using the FMOD library. I copied the dll into the release folder of the game and even tried removing the whole sound system from the game, but it's still crashing. Once again, everything works fine when I run the game inside Visual C++. Any idea what's causing the crash?
  10. VisualChaser

    Creating an invisible circle for collision

    Yes that should work. But in C++ the script would be even easier I think, I'll figure something out. Thanks!
  11. As my first project I'm working on a tower defence game. The project is somewhere near 60% finished, including particles and all. But I got stuck at coding the enemies and towers. I need an invisible circle that can be used to detect collision. If the enemy is in this circle (the circle is the range of the tower), the tower should start shooting. I also should be able to adjust the circle to the range of every tower, which can be upgraded. I already searched on some sites but I can't find a way to do this. Can someone give me an example on how to do this?
  12. VisualChaser

    Getting mouse position

    I'm using WS_OVERLAPPED | WS_SYSMENU | WS_BORDER. I tried to change the window style to WS_OVERLAPPEDWINDOW and it worked fine with the AdjustWindowRect function. But I want to make sure the window can't be maximized, can't be resized, and also I want to get rid of the minimize button at the top (not disable it). How can I do this using other styles? EDIT: Nevermind, I fixed it by changing the styles to WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU. Everything is working now, thanks again!
  13. VisualChaser

    Getting mouse position

    It changes to Top: -1 Bottom: 101 Left: -1 Right: 201 But when I use the WS_OVERLAPPEDWINDOW (which is NOT the style my window uses), it creates a window that is so small, it has a height lower than 30 and a width lower than 100.
  14. VisualChaser

    Getting mouse position

    I thought it worked, but it didn't. The window size is still the same :/
  15. VisualChaser

    Getting mouse position

    Alright thanks for helping :3
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!