Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Gobbles

Pages: 1 2 [3] 4 5 ... 9
31
General / Re: Spine for SFML
« on: May 21, 2014, 04:25:43 am »
I got it figured out. Turns out they updated the C source a few weeks back with the void* rendererObject. Tossing your object instance into that and casting it into an instance inside the callback allows for everything I need.

32
General / Re: Spine for SFML
« on: May 19, 2014, 11:46:03 pm »
Almost all is written in C, but there is at least 1 c++ class which is used for sfml, spine-sfml.h.

Here's the source with an example: https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-sfml

33
General / Re: Spine for SFML
« on: May 19, 2014, 11:26:28 pm »
Yeah I've tried this, quickly plugging it in I get:
a value of type "void (MyClass::*)(AnimationState *state, int trackIndex, EventType type, Event *event, int loopCount)" cannot be assigned to an entity of type "spAnimationStateListener"

this is spAnimationStateListener: typedef void (*spAnimationStateListener) (spAnimationState* state, int trackIndex, spEventType type, spEvent* event, int loopCount);

34
General / Spine for SFML
« on: May 19, 2014, 11:05:36 pm »
Hey guys, just wondering if anyone has worked with spine for sfml at all? If so I am wondering if you have set up callback functions at a class level? I've been going at it for a few days now and I can't seem to make much progress on it. My brain is fried.

Here is a thread I opened there: http://esotericsoftware.com/forum/viewtopic.php?f=7&t=2657&p=13016#p13016

Nate responds, which is awesome, but I'm not sure if I'm just gone complete braindead on it or not but ignore my 2nd post in it because I completely jumped the gun (I thought Lambdas were the solution, but apparently not).

If anyone has any nuggets of wisdom or anything I'd certainly appreciate it.

35
SFML projects / Re: A game feat. Tanks , inspired by Pocket Tanks
« on: May 04, 2014, 05:08:47 am »
Take a look at Scorched Earth, almost identically similar game. You might be able to pull some inspiration from it.

36
Graphics / Re: multiple tex per sprite problem
« on: March 27, 2014, 03:54:27 am »
I'm not entirely sure what you're trying to achieve. You trying to draw both the rockets and bullets inside of one sprite as they move?

37
Which software are you referring to? if your using paid software of some sort, there's always a free alternative on the internet somewheres.

38
General / Re: Good SFML Tutorial?
« on: January 17, 2014, 10:40:27 pm »
You can thank us by making great games and boosting the games economy!

39
General / Re: Good SFML Tutorial?
« on: January 16, 2014, 09:18:37 pm »
Hands on experience comes from working on different games and reading. I can never stress enough how important it is for a programmer to read and try new things. You won't be able to think of everything, no one can, BUT there is such an abundance of books and material out there you can lend ideas from any number of them, finding exactly what you want.

Not one person started programming and on day 1 made an awesome game (well.. I sure thought my games were awesome, but the internet would very quickly disagree).

Try thinking of a simple game you enjoy playing, Pong(my first game)?, arkanoid, pacman, snake... any of these. Very simple ideas. Pracice making them. You will fail.. .GOOD! thats a good thing, learn and understand why you failed and try again from scratch, this time using what you just learned.

Takes time, patience and dedication to make any good game, but if you can do it, the results are never a let down.

40
General / Re: Multithreading Results in Window Context Activation Fail
« on: January 16, 2014, 07:06:44 pm »
OS: Windows 7 Home Premium 64-bit
GPU: GeForce 650 with frequently updated driver
IDE: Code::Blocks

Interesting, we are basically running the same specs.

41
General / Re: Multithreading Results in Window Context Activation Fail
« on: January 15, 2014, 11:42:12 pm »
I removed all non-essential code, but try these 3 files

main:
[
#include "Game.h"
#include <stdlib.h>
#include <time.h>
//DEBUG CODE
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#define DEBUG_NEW new(_CLIENT_BLOCK, __FILE__, __LINE__)
#define new DEBUG_NEW
#endif

int main()
{
        _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
        std::unique_ptr<Game> game(new Game());
        srand(time(NULL));
        game->Run();

    return EXIT_SUCCESS;
}
 

Game.h
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <sstream>
#include <cmath>
#include <iostream>

class Game
{
public:
        Game();
        ~Game();
        void Run();

private:
        std::unique_ptr<sf::RenderWindow> window;

        //Loading Thread
        std::unique_ptr<sf::Thread> CharLoadThread;
};
 

and Game.cpp

#include "Game.h"

Game::Game()
{
screenSize = sf::Vector2f(1024,768);
        window = std::unique_ptr<sf::RenderWindow>(new sf::RenderWindow(sf::VideoMode(static_cast<int>(screenSize.x), static_cast<int>(screenSize.y)), "Re:Volved ver 0.0.04a", sf::Style::Close));

        window->setKeyRepeatEnabled(false);
        //LoadCharacter();
        CharLoadThread = std::unique_ptr<sf::Thread>(new sf::Thread(&Game::LoadCharacter, this));
        CharLoadThread->launch();
}

Game::~Game()
{
}

void Game::LoadCharacter()
{
        std::cout << "Start Loading\n";
        //groundMap = std::make_shared<Map>(MainCamera);
        //groundMap->Read();
    std::cout << "Map Read\n";
        //charDef = std::unique_ptr<CharDef>(new CharDef("skeleton"));
        std::cout << "CharDef Loaded\n";
        //character = std::unique_ptr<Character>(new Character(sf::Vector2f(500.f, 100.f), *charDef, 0));
        std::cout << "Character Loaded\n";
        //character->BodypartsInit();
        std::cout << "Character Bodyparts Loaded\n";
    //enemy = std::unique_ptr<Enemy>(new Enemy(sf::Vector2f(800.f, 100.f), *charDef, 1));
        std::cout << "Enemy Loaded\n";
    //enemy->BodypartsInit();
        std::cout << "Enemy BodyParts Loaded\n";
        //sf::Context context;
        Loaded = true;
}

void Game::Run()
{
        sf::Clock clock;
        sf::Time timeSinceLastUpdate = sf::Time::Zero;
        static const sf::Time timePerFrame = sf::seconds(1.f / 60.f);

        fpsText.setFont(fpsFont);

        while (window->isOpen())
    {
                timeSinceLastUpdate += clock.restart();

               
                while(timeSinceLastUpdate > timePerFrame)
                {
                        timeSinceLastUpdate -= timePerFrame;
                        std::cout << "Updating\n";
                }
        }
}
 

Let me know if this causes any problems for you, I think I have everything in there.

42
SFML projects / Re:Volved, a game of evolution and other things
« on: January 15, 2014, 07:50:23 pm »
They are all coming along pretty good. So much to do, yet so little time in a day. My overall focus at this point is the combat and AI systems. The combat being a complete combo system that allows the player to explore a wide variety of combos and abilities based on which body parts he is using.

The AI is a little more tricky, not only do I need to replicate a lot of what the player is doing (most enemies behave just like the player would, so they can combo as well) but they also learn and adapt to the players actions.

Hopefully soon the game will be at a state that I feel comfortable showing it off, at which point I will gladly post a build/video for everyone.

43
SFML projects / Re:Volved, a game of evolution and other things
« on: January 15, 2014, 05:00:52 pm »
So about that time again to show off a little Art update. Here we finally have all 4 of the first forms all sketched out and completed! Game is making good progress and I hope to be able to show a gameplay video soon. Here's hoping.

Forest & Desert


Mountain and Aquatic

44
General / Re: Multithreading Results in Window Context Activation Fail
« on: January 14, 2014, 11:50:31 pm »
mostly just messing around with it but in my Game.h I have:
Code: [Select]
std::unique_ptr<sf::Thread> CharLoadThread;
Then in the .cpp constructor I have
Code: [Select]
CharLoadThread = std::unique_ptr<sf::Thread>(new sf::Thread(&Game::LoadCharacter, this));
CharLoadThread->launch();
and Load Character is pretty standard, but I had to add a sf::Context context;
Code: [Select]
void Game::LoadCharacter()
{
/* Stuff I'm Loading */
sf::Context context;
}
That's it that's all.

45
General / Re: Multithreading Results in Window Context Activation Fail
« on: January 14, 2014, 10:28:02 pm »
Yes it compiles, although I still see the context issue. I took the liberty to move it all into a class design ( within my own game ) and I am not seeing this issue at all.

Pages: 1 2 [3] 4 5 ... 9