Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Sunsharior

Member Since 14 Dec 2013
Offline Last Active Today, 12:12 PM

Posts I've Made

In Topic: Text Based RPG help

11 December 2014 - 02:12 PM

Like Josh Petrie said, you declared functions in a header file that were never defined elsewhere. I have enclosed 3 of your project's file code with the error fixed.

 

You will noticed a few things:

 

1. I have created the Prologue.cpp file and moved the content from Char info.cpp to it.

2. The prologue is now used as a class instead of static. See the modification i did to Main.cpp to notice it's scope remain inaffected.

3. The fonctions and member variables of the class Prologue are no longer static. Prologue.cpp now have the proper definition of thoses fonctions, and a constructor aswell.

4. The file Char info.cpp has been deleted.


In Topic: How should i process about embedding a SDL2 game into QT to make a level editor.

01 December 2014 - 11:54 AM

Thank you for your reply Dejaime. It helped me do the initial setup.

 

After fiddling this weekend, and doing additional researches, i've partially solved my problem. I'm not done yet but i've successfully draw something in QT using Sdl2. Now, what i'm missing is just the Inter-process communication between the QT application and my game. I should be able to do that during this week.

 

So, it's looking good, at the moment :).


In Topic: Culling points from a polygon.

29 August 2014 - 07:07 AM

Thank you. It worked like a charm!

Here is the code for anyone that could need it later.

 

#define EPSILON 0.0001f
//////////////////////////////////////////////////////////////////////////
//Culling mean removing unneeded vector.
void Cull(std::vector<CVector> &_val)
{
    if(_val.size())
    {
        for(int i = 0; i < static_cast<int>(_val.size());)
        {
            int n = i + 1 < _val.size() ? i + 1 : 0; //next
            int l = i - 1 >= 0 ? i - 1 : _val.size() - 1; //last
            
            if((SignedArea(_val[l], _val[i], _val[n]) * 0.5f) < EPSILON)
                _val.erase(std::remove(_val.begin(), 
                                       _val.end(), 
                                       _val[i]), 
                                       _val.end());
            else 
                i++;           
        }
    }   
}

//////////////////////////////////////////////////////////////////////////
//
float SignedArea( CVector _a, CVector _b, CVector _c )
{
    return ( (_b.x - _a.x) * (_c.y - _a.y)
           - (_c.x - _a.x) * (_b.y - _a.y) );
}

In Topic: SDL 1.2, moving window, objects falling through tiles

12 June 2014 - 10:49 AM

Hi too_many_stars,

 

there is not enough information to solve the problem without going into speculations.

 

1. Try posting code you think might be the culprit.

2. Add more information to the problem. Try to be as descriptive as possible.

3. Explain how your game work. What is normally supposed to happen when you move the game window?

4. Do you use other library or engin?

 

Since you mention SDL, i assume this is a simple 2D game. What kind of physic do you use?

 

As you can see, more information is needed.


In Topic: Advise for a beginner needed

03 June 2014 - 12:36 PM

Many thanks everyone, but could you please maybe tell me wich language i should learn and maybe a good website, book, method, etc to learn thuis too?

 

If your ultimate goal is to make a 3D FPS, i would pick C++ and DirectX / OpenGL. You need a OOP language for 3D and C++ is already largely used in the gaming industry.

Thoses are the reasons i would pick C++. Be warned though, C++ is a magnificent beast.

For learning, http://www.learncpp.com/ is a good place to start. For book, http://www.gamedev.net/page/books/index.html/_/technical/general-programming/beginning-c-through-game-programming-r1400 seems to have good reviews. I did not read it myself. Maybe it be better to search google for more reviews.


PARTNERS