Game sometimes crashes when closing or process stay in memory

My problem is that sometimes, when closing the game, one of two may occur: Process stays in memory and it have to be killed manually Game crashes I'm not sure if those two are related or completely independent issues. Both of those happen very rarely, but I have to eliminate these situations. As for the crash, I made a dump and it says that the crash occurs in PeekMessage() function.

关闭或进程停留在内存时,游戏有时会崩溃

我的问题是,有时在关闭游戏时,可能会出现以下两种情况之一: 进程保留在内存中,并且必须手动终止 游戏崩溃 我不确定这两者是相关还是完全独立的问题。 这两种情况都很少发生,但我必须消除这些情况。 至于这次崩溃,我做了一个转储,它表示崩溃发生在PeekMessage()函数中。 代码如下所示: bool running = true; /// Reset timer Timer.Reset(); MSG msg; ZeroMemory(&msg, sizeof(msg)); /// message pum

Access violation after catching dll exception

I have to load modules as dlls dynamically at runtime as they are not known ahead of time, just that they conform to a class interface. What I noticed is that after I catch an exception thrown by the dll (in the main program in the main thread), the right destructors are called and the modules destroyed and dll's unloaded, but then as the } at the end of the catch block is reached by the Vis

捕获dll异常后访问冲突

我必须在运行时动态地将模块加载为dll,因为它们不会提前知道,只是它们符合类接口。 我注意到,在我捕捉到dll抛出的异常(在主线程的主程序中)之后,正确的析构函数被调用并且模块被销毁并且dll被卸载,但是随后在catch块的末尾} Visual Studio C ++调试器在逐行执行时遇到了另一个异常,它使程序崩溃 xxxxx.exe中0x68ad2377(msvcr90d.dll)的第一次机会异常:0xC0000005:访问冲突读取位置0x02958f14。 如果我启用打破

Could someone give me any advice on learning game engine OGRE

guys! I am very interested in game programming.I have spent some time learning C++ and OpenGL. And now I want to learn the open source game engine OGRE .But I am not very clear about how to learn it.I don't have a good plan. Does anyone have the experience of learning game programming and tell my a good plan ?If you can recommend some good resources about game engine OGRE such as books,web

有人能给我任何关于学习游戏引擎OGRE的建议吗?

伙计们! 我对游戏编程非常感兴趣。我花了一些时间学习C ++和OpenGL。 现在我想学习开源游戏引擎OGRE 。但是我不太清楚如何学习它。我没有一个好的计划。 有没有人有过学习游戏编程的经验,并告诉我一个好的计划 ?如果你能推荐一些关于游戏引擎OGRE的好资源,例如书籍,网站等 ,我会对此感到非常感激。更详细,更好。非常感谢! 只需转到ogre3d.org并开始阅读文档和教程。

WPF World Editor for my DirectX game engine

I am working on a small game and game engine in C++ using DirectX. The purpose is educational & recreational. My next goal is to build a simple world editor that uses the game engine. For this I will need to move the engine into a dll so it can be consumed by the game and/or by the editor. The world editor will be a stand-alone tool and not part of the game. The main purpose of the worl

用于我的DirectX游戏引擎的WPF World Editor

我正在使用DirectX开发C ++中的小游戏和游戏引擎。 目的是教育和娱乐。 我的下一个目标是建立一个使用游戏引擎的简单世界编辑器。 为此,我需要将引擎移动到dll中,以便可以由游戏和/或编辑使用。 世界编辑将是一个独立的工具,而不是游戏的一部分。 世界编辑器的主要目的是读入并显示我的(自定义)场景文件,并允许我注释/修改世界对象(网格)的属性,克隆对象,拾取和移动对象并放下它们,缩放对象等,然后保存修改过

Bullet physics stops collision after a while

雅博体育锁定账户 So I am trying to use bullet physics library in my opengl game engine for collision detection. I am not trying to do anything complicated, I only want to know when things collide in the 3d world. I am only using box shapes and I have no interest in moving the objects using physics (I have even disabled collision response for my rigid bodies). I have managed to get the collision to work doing

一段时间后,子弹物理停止碰撞

所以我想在我的opengl游戏引擎中使用子弹物理库进行碰撞检测。 我不想做任何复杂的事情,我只想知道什么时候事情在三维世界中碰撞。 我只使用盒子形状,并且我没有兴趣使用物理学来移动物体(我甚至禁用了刚体的碰撞响应)。 我设法使碰撞工作如下: 首先,每帧我更新基于它所附的实体变换的刚体世界变换。 例如,我将我的玩家向右移动,刚体(和边界框)随我移动。 我正在检查2个对象是否使用此代码进行碰撞: void P

Physics in video game, Apply torque on angular acceleration

I'm working on a game project about a top down car game in 2d. I want to manage all the physics by myself. Im working with this book : http://www.amazon.fr/Game-Physics-Engine-Development-Commercial-Grade/dp/0123819768 to implement the physics. From now my physic engine can handle force on the different axes. But I have some issues to implement a correct simulation of rotation. Im tryin

视频游戏中的物理,对角加速度应用扭矩

我正在制作关于2D游戏的游戏项目。 我想自己管理所有的物理。 我正在与本书一起工作:http://www.amazon.fr/Game-Physics-Engine-Development-Commercial-Grade/dp/0123819768来实现物理。 从现在起,我的物理引擎可以处理不同轴上的力。 但是我有一些问题需要实现正确的旋转模拟。 我试图实现一些扭矩来找到角加速度。 所以我实现了一个惯性张量矩阵: setMass(400.f); Matrix3 it; it.setBlockInertiaTensor(Vector3(2,

Bullet physics boxes don't rotate

I'm using the following code to set up a simple world using the bullet physics engine. When I run it, the boxes don't behave realistically because they don't rotate. It's like their rotation is locked. Has anyone seen something like this before or know what could be causing it? Thank you. World::World() { mBroadphase = new btDbvtBroadphase(); mCollisionConfiguration = new btD

子弹物理盒不旋转

我使用下面的代码来设置一个简单的世界使用子弹物理引擎。 当我运行它时,由于它们不旋转,所以这些盒子并不现实。 这就像他们的旋转被锁定。 有没有人见过这样的事情,或知道可能是什么原因造成的? 谢谢。 World::World() { mBroadphase = new btDbvtBroadphase(); mCollisionConfiguration = new btDefaultCollisionConfiguration(); mDispatcher = new btCollisionDispatcher(mCollisionConfiguration); mSolver = new b

remove bodies after collision (bullet physics)

I have a setup like this for collision detection: struct ZombieBulletCallback : public btCollisionWorld::ContactResultCallback { ZombieBulletCallback(BulletStuff* ptr) : bullet(ptr) {} btScalar addSingleResult(btManifoldPoint& cp, const btCollisionObjectWrapper* colObj0Wrap, int partId0, int index0, const btCollisionObjectWrapper* colObj1Wrap, int partId

碰撞后移除物体(子弹物理)

我有这样的设置用于碰撞检测: struct ZombieBulletCallback : public btCollisionWorld::ContactResultCallback { ZombieBulletCallback(BulletStuff* ptr) : bullet(ptr) {} btScalar addSingleResult(btManifoldPoint& cp, const btCollisionObjectWrapper* colObj0Wrap, int partId0, int index0, const btCollisionObjectWrapper* colObj1Wrap, int partId1, int index1)

Prevent collisions applying impulse in Bullet physics

I am developing third-person shooting game using Bullet and Ogre. When the character model collides with an object in the world, such as a power-up, the collision applies a force to the character and causes them to spin. How can I prevent the collision applying a force to the character? I have set a method for btDynamicsWorld::setInternalTickCallback and so I know which bodies are colliding a

防止碰撞在子弹物理学中应用冲量

我正在开发使用Bullet和Ogre的第三人称射击游戏。 当角色模型与世界上的物体碰撞时,例如上电,碰撞对角色施加力并使其旋转。 我怎样才能防止碰撞对角色施加一个力量? 我已经为btDynamicsWorld :: setInternalTickCallback设置了一个方法,所以我知道哪些物体正在碰撞和btManifoldPoint。 请注意,我将Torque应用于身体以便顺利旋转,因此我不能简单地防止旋转。 谢谢你的帮助。 我不熟悉你提到的物理引擎,但是我知

OpenGL + SDL rotation around local axis

I've been working on a semi flight simulator. What I am trying to do is use a pitch roll and yaw to rotate an object. I have already looked online a lot, and although they explain what the problem is I have no idea how to implement the solution. So for example I do: glRotatef(yaw,0,1,0); glRotatef(pitch,1,0,0); The yaw doesn't act properly, the pitch will work fine. And from what I

围绕本地轴的OpenGL + SDL旋转

我一直在做半飞行模拟器。 我想要做的是使用俯仰滚动和偏航来旋转物体。 我已经在网上查了很多,虽然他们解释了问题所在,但我不知道如何实施解决方案。 举例来说,我的确如此: glRotatef(yaw,0,1,0); glRotatef(pitch,1,0,0); 偏航不能正常工作,音高会正常工作。 从我一直在读的东西看来,对象局部轴已经改变了,所以我需要找到对象的新局部轴并围绕它旋转。 所以我尝试了这样的事情: newpitch=pitch/57.29 VectorA(0