Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 20 Jul 2006
Offline Last Active Dec 04 2015 02:19 AM

Posts I've Made

In Topic: Rotated Rectangle Collision Phsyics for Tank Game

14 February 2015 - 02:55 PM

You need to replace the collision handling to use physics solvers instead of "stop all movement". Most collision detection code is just that - detection.


Here's what certain engines do:


Physics is handled on a separate thread / module. In order to obtain desirable results, movement solving is done over several iterations PER frame.


Since you're building using C++, I'd recommend looking into the free Chipmunk Physics C++ library. Alternatively you can write quasi-physics by following your own rules as mentioned.


I'm rusty in physics but you should be able to calculate angle of incidence (into the wall or another tank) based on movement vector of both objects. Since the wall is static it will work itself out. When two objects collide, a third party (collision handler with body A and body B) will decide the results. If both objects were tanks, you'll be happy that both can conserve momentum and "bounce" or "slide" correctly based on the same application of physics.


If you want to step it up - and your tanks are not all the same size, you can take weight and momentum into account.

In Topic: Whats the task of the programmer in this video game?

11 January 2015 - 02:41 PM

Great artwork!


If you really are just looking for a way to stitch your concept art into a static point and click adventure game, you might be able to get away without a programmer. Can you tell us if this is going to be a 2D game or 3D? Will the camera move?


Basically if it is really 2D, you can try an adventure builder or GameMaker. These tools will come ready to handle "triggers", touch zones - so you can react to player input and stitch together screens or levels.


If you want to do anything special like pick up items, show an inventory, have dialogue or character or camera movement, then it is likely you will need a programmer. These are staples of most adventure games, so you should decide now before you get too invested into a game engine or set of tools. Enlisting a programmer is easier if you are serious about your project and can show progress like this. If you decide to go this route, I might suggest using Unity, put together your levels, and then use their forums / marketplace to team up with someone who will help you get your game finished.


If you want REALLY high fidelity and you understand 3D modeling, animation and shaders at a AAA level, you could also try using the Unreal Engine. It is $19/month to use it commercially. You can make complete games using their system called Blueprint without any programming. (See their Flappy Bird and related demos).


Come back with some details and I can help you further.


Best of Luck!

In Topic: How do I convert an array to an accelerated texture?

30 December 2014 - 10:36 PM

The way you are doing this right now, you are creating the pixels in System Memory (RAM). In most modern computers, the graphics card loads the textures into its own memory. Thus, you'll have to copy your buffer from one memory to another every frame in order to get your desired effect, which is very inefficient, but good enough for a one-off use.


A better approach, then, is to not create the array in System Memory but to do things directly on the graphics device. There are two approaches that I know of for this:


1. Use shaders. Use the vertex shader to draw a rectangle the size of the screen. Use the pixel shader to draw your random colors.




2. Use OpenCL. OpenCL runs C / C++ programs on the GPU. You can integrate OpenCL into your graphics pipeline as well. There are tutorials out there for this - I'm not too familiar with how to do this myself.

In Topic: design question: data driven: best methods?

24 December 2014 - 03:06 PM

Although your question is not very specific, here are 3 popular methods that won't let you down:


1. JSON, with a parsing library available in most languages. JSON is easier to read and edit, smaller than XML and works with RESTful APIs and internet technologies all over the world now.


2. XML. XML is also easily consumed and parsed in most languages. It is older and somewhat clunkier, but it is still being used in many commercial game engines as a general data format.


3. Design a database using SQLite. This is a file based database format that can be easily consumed in C++ and most other languages. If you know SQL and relational database concepts, this is a powerful way to store and query your game data.


My opinion is that writing custom text file parsers is a waste of time compared to these options, unless you have to do something so extraordinary with it that it makes it impossible to use all of these methods.

In Topic: How can I create an installer for my game?

20 December 2014 - 12:58 PM

As far as I remember, the Visual Studio Installer project can be configured to include the installation of other components like the runtime library as part of the install. It won't embed the whole thing but rather download and install the latest from Microsoft's servers during the install process.


Look it up. If not, there's Inno setup. It is a powerful, script driven system that definitely handles pre-requisite installs.