C++ :: Simplest 3D Physics Engine
Jan 18, 2013
What is the simplest 3D physics engine that you have used, that works well?
All I need to be able to represent is a spherical ground (planet), one or more tetrahedrons, with 1 or 0 cylinders coming out of each face, which might connect to other tetrahedrons. The tetrahedrons and cylinders have weight and can rotate around their connection point in 1 direction.
Basically, they are simple digital robots that need to walk around, so I don't need something with the complexity of Havok or Newton.
View 1 Replies
ADVERTISEMENT
Jun 9, 2014
I'm using the Bullet physics library in my program and am currently trying to implement picking. The way the world is currently set up, there is a terrain with a box on top of it. Whenever I click on the box, my program only registers that the terrain has been clicked and doesn't recognize that the box has been clicked.
void PhysicsEngine::RayTest() {
vec2 Mouse = MOUSE_POSITION;
Mouse.y = WINDOW_DIMENSIONS.y - Mouse.y;
vec4 RayStart = vec4(2*Mouse.x/WINDOW_DIMENSIONS.x - 1,2*Mouse.y/WINDOW_DIMENSIONS.y - 1, -1, 1);
vec4 RayEnd = RayStart; RayEnd.z = 0;
[Code] .....
View 3 Replies
View Related
Aug 2, 2013
I have a input record like
acct|N|Y|N|N|rose@gmail.com
Now I need to create a logic to append a code to the end of the file using the following matrix rules.
00NNNN
01NNNY
02NNYN
03NNYY
04NYNN
05NYNY
06NYYN
07NYYY
[code].....
In the above example these four flags are "N|Y|N|N", so I need to append the matching code at the end of file "04".
desired output :
acct|N|Y|N|N|rose@gmail.com|04|
as it matches code '04':
04NYNN
View 5 Replies
View Related
Feb 15, 2015
I can't compile the simplest boost asio program #include <boost/asio.hpp> int main(){}
Code Blocks 13.12 writes out message "swprintf was not declared in this scope". (within win_static_mutex.ipp file)
Visual Studio 2013 writes a lot more (within win_iocp_io_service.ip file), to begin with: "min is not a member of std" and there are a lot of errors in error.hpp file stating "WSA13 identificator is not defined" (WSA13, WSA100, WSA102 etc.)
Almost everything else from boost compiles good.
View 7 Replies
View Related
Nov 16, 2013
How to create a 3D Drag and Drop Game Engine?
View 19 Replies
View Related
Mar 18, 2013
I'm making a small game engine and have a project in Code::Blocks for it, and a project to test it out. The thing is that my test program won't find a constructor from the engine. Here's my code:
Game Engine, Screen.hpp
#ifndef SCREEN_HPP_INCLUDED
#define SCREEN_HPP_INCLUDED
#include "SDL.h"
namespace myeng {
class Screen final //This class doesn't need to be derived from
[Code] ....
I have my engine project correctly linking to the SDL dlls and the test project linking to the engine dll and the SDL dlls. The errors are:
objDebugmain.o||In function `SDL_main':|
C:UsersMainDocumentsProgramsGame_Engine_Testmain.cpp|12|undefined reference to `myeng::Screen::Screen(int, int)'|
C:UsersMainDocumentsProgramsGame_Engine_Testmain.cpp|16|undefined reference to `myeng::Screen::~Screen()'|
||=== Build finished: 2 errors, 0 warnings ===|
View 7 Replies
View Related
Jul 19, 2013
What i'm trying to do is create a 3d game engine with opengl and i want to be multi platform. I'm trying to use code-blocks for this reason but i'm having trouble setting up opengl for code-blocks
View 1 Replies
View Related
Apr 12, 2014
I am building a semi-complicated program and the focus of it will be on the search engine. The current plan is for it to search an online database after keywords and receive a list of responses organized by relevance.
I want to minimize the stress on the server by handling as much of the process on the client side as possible so I wonder how best to split up the tasks.
So far my idea is to have the client send the search term to the server who then compare it with its registry. Collecting the 30 or so most relevant hits it sends it back along with additional information from each entry. Requesting additional hits will be decided by sending a simple int value telling which page its filling up.
Simple example:
"Search word" gets processed by the client to account for spelling errors, context etc (based on what I can implement by myself). An Int value gets added (0 for page 1, 1 for page 2 etc...). The request gets sent to the server who can immediately run the search without processing the search word since that was handled in the client. It locates hits and order them by relevance then send out the information batch decided by the Int.
View 2 Replies
View Related
Aug 6, 2013
I want to write a game engine with MinGW and Code::blocks ide
[URL] ....
This is my project's source code
[URL] .....
This is the build log.
I can't code it here, because it's two large to add the characters!
View 10 Replies
View Related
Apr 23, 2013
I'm making a little "game engine" for a Rogue-Like game series I'll develop beside a friend. This "game engine" was programmed originally in ms-dos batch 6 years ago by me, and was evolving since. It have a VB6 version, a VB .net version, and a Python version... lately a C++ version following the same method of the first stable release of ms-dos batch (isn't weird?). As you can see, is a mere hobby.
Well, I have 1 headers for my C++ version of the engine, in that *.h file I have 2 classes (for now). The first class, and maybe the most important one, contains the code of the map handling (drawing, verification, creation, modification etc.) and the second one is the Object class, which code the "actors" or "npc" basic functions as movement, coloring, instancing etc...
The second class depends of the first class to function, because the first class is the responsible of displaying all inside the map.
The problem is that the class Object needs an instance of the class Map where the Object will be, but... that's the problem, the code seems right, but when is about to run it crash reporting a "No matching function for call to 'Map::Map()'" in the line 91 of AGE.h (that's the Object class constructor)... and its all.
So, this is the code of the main header that contains these classes:
#include <iostream>
#include <stdlib.h>
#include <conio.h>
#define Up 0
#define Down 1
#define Left 2
[Code] ....
A simple code that uses "AGE.h" for test purposes...
View 7 Replies
View Related
Aug 27, 2013
I should reduce the number of bitmaps I used in my code. I translated my particle engine into code that could be compiled as plain standard C
Currently, the code has a segmentation fault somewhere that I can't figure out. How it should function is that it takes orders from a queue for new lasers to store the instances in a linked list. It then takes that data and updates its coordinates, one node at a time. The first node should also be the first node to complete its life, so it gets removed, and the list is set to the next node in memory. If there are no more nodes left, a if-statement should catch it and either break the current loop, or wait for more items to be requested. If there are nodes left, the process will continue to remove the first node in the list until there are none left. Obviously this is not quite how it works. When I tested in once in SDL, the laser would update every 5 frames, but wasn't shown constantly, and would crash after the node was to be disposed of. When I initialize with the SDL parachute, it would exit before I event saw the screen. Also, the code I translated to standard C will display that the laser has been updated to the screen, but it never says that it has moved up. It crashes after about 4 printf() statments execute. My debugger has been giving me mixed SIGTRAPS, and "nothing is wrong" output. Here is the code in standard C:
Code:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define MAX_LASER_QUEUE 10
}
[code]....
View 6 Replies
View Related
Feb 29, 2012
I'm currently working on the ioquake3 engine . The ioquake3 engine is separated into 2 different main threads at runtime: the gamecode and the engine. Both are communicating but not all information and my problem resides here.
In the gamecode, there's a struct called gentity_t which contains a lot of fields:
Code:
typedef struct gentity_s gentity_t;
struct gentity_s {
entityState_ts;// communicated by server to clients
entityShared_tr;// shared by both the server system and game
// DO NOT MODIFY ANYTHING ABOVE THIS, THE SERVER
// EXPECTS THE FIELDS IN THAT ORDER!
//================================
struct gclient_s*client;// NULL if not a client
[Code] ....
This whole entity is passed to the engine at runtime, but only the first two fields are declared for the engine:
Code:
// the server looks at a sharedEntity, which is the start of the game's gentity_t structure
typedef struct {
entityState_ts;// communicated by server to clients
entityShared_tr;// shared by both the server system and game
} sharedEntity_t;
My problem is that I need to access the health field of gentity_t from the engine. Technically, this is possible, but the health field is not declared in sharedEntity (which is the same memory address than gentity_t in the gamecode), so this is not straightforward.
I am looking for an elegant way to do this, and my constraint is that I must not edit the gamecode, only the engine.
The solutions I've thought:
- Just copy the whole gentity_t fields into sharedEntity_t. This would work I think but would be redundant, and I would like to avoid copying this huge set of fields.
- Include the two headers files declaring the gentity_t and sharedEntity_t structs, and create a Getter and a Setter functions that would cast a gentity_t over a sharedEntity_t and return/set a field. The problem is that I can't simply include them because they are both including some common headers files and this produce a recursive include error (and I can't modify the files to add a check, these are normally in the gamecode).
- Directly access the health field using a clever memory pointer, but I don't even know if that's possible given the huge number of fields prior health with many different types?
View 2 Replies
View Related