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.


Topics - The Terminator

Pages: [1] 2 3
1
General discussions / Streaming SFML game dev on twitch.tv
« on: July 29, 2015, 05:42:14 pm »
Hi there guys,

I'm going to start streaming live development of my SFML powered game that I hope to release to Steam greenlight by the end of this year. If anyone's interested in watching, the link is here: http://www.twitch.tv/iwinuloselol1337

I will be trying to stream everyday for at least 3 hours, as a way to spread awareness for the game and to also crowdfund for the project. And of course, I love discussion about games, programming, and SFML. :)

Thanks to anyone who participates!

2
Hi there,

I recently built a new computer, and I'm migrating my environment and all of my sources to it. I'm having a big issue with cmake and SFML, however. I have the latest CodeBlocks (13.12 I believe) and MinGW 4.8.1 all installed and working fine. But, whenever I try to compile the latest sources from SFML I get the error "The program can't start because libiconv-2.dll is missing from your computer." I'm tried redownloading SFML sources several times, and I've reinstalled Cmake and even CodeBlocks several times as well. I'm configuring using MinGW MakeFiles which is pointing to the right files and directory (I've already checked).

Thanks for any help!

3
Hi there,

I've utilized the vertex array tilemap, but I'm having issues with collision. My current system is really hit and miss and often doesn't work at all, and it depends on checking for bounding-box intersection between the tiles (in the form of FloatRects). Is there a better way to more accurately measure collision?

Thanks

4
Hi there,

I have a couple questions on how to approach an issue I'm having. I have a tilemap that I just designed that draws ~3000 tiles, but slows to a crawl (~35 fps from 200 fps earlier). What I'm doing right now is having a "tile" be represented as a drawable sprite, and in its constructor the sprite is given a pointer to a texture in my resource manager. Because of this, only 1 texture has to be created per type of tile.

Now sf::Sprite is a very lightweight class, but I'm pretty confused as to why it's really bringing down fps, especially since there's an extremely low number of sf::Texture 's being used (Exactly 1, lol).

This brings me to my first question: why is this approach slowing down my program so significantly?

Second question: Would a sf::VertexArray be a much better approach? I'm pretty confused on how to define the vertices because my tile images are not packed into one sprite sheet, they're individual .png files.

Thanks!

5
Hi there,

I'm doing a little test for my GUI system, where I have a sf::RectangleShape that is acting as an edit box. I'm trying to center the text directly on that rectangle shape, but whenever I call my centerText() method for the first time (whenever a person inputs a character for the first time) it changes the rectangle's position a little bit to the left and up, then works perfectly. Sorry if this is a little confusing but here's my code:

sf::RectangleShape m_box;
sf::Text m_text_drawn;

void EditBox::handleTextEvent(sf::Uint32 character)
    {
        if (!getInWidget() || !getVisible())
            return;

        if (character == 8)
        {
            if (!m_user_text.isEmpty())
                m_user_text.erase(m_user_text.getSize() - 1);

            return;
        }

        if (character < 127)
            m_user_text += character;

        centerText();
    }

void EditBox::centerText()
    {
        m_box.setOrigin(m_box.getGlobalBounds().width / 2, m_box.getGlobalBounds().height / 2);

        m_text_drawn.setOrigin(m_text_drawn.getGlobalBounds().width / 2, m_text_drawn.getGlobalBounds().height / 2);
        m_text_drawn.setPosition(m_box.getPosition());
    }

Thanks!

6
SFML game jam / 2 quick questions
« on: February 27, 2014, 04:01:08 pm »
Hi there,

I had two quick questions about the game jam:

1. When is the next one? ;D

2. Are we allowed to use a pre-written engine during the jam?

Thanks

7
System / How would I do this every millisecond?
« on: December 30, 2013, 03:49:52 am »
Hi there,

For a label that I'm creating on my main menu, I want it to animate over 3 colors in 9 seconds. The 3 color RGBA values are: (255, 255, 255, 50), (0, 161, 94, 50), (102, 0, 0, 50). To give it the "gradual" effect, I want it to increase or decrease the RGBA values of an sf::Color every millisecond. In order to get the value to increase or decrease per millisecond, I just found the difference of the respected values and divided it by 1000. Here's my (unworking) code that I've written:

(FYI: m_totalTime is a private float value in a class, m_animated_label_clock is a sf::Clock private member, and m_label_color is a sf::Color private member.)

if (m_totalTime <= 3)
        {
            if (m_animated_label_clock.getElapsedTime().asMilliseconds() == 0.001)
            {
                m_label_color.r -= 0.085;
                m_label_color.b -= 0.0313;
                m_label_color.g -= 0.0683;
            }
        }

        else if (m_totalTime > 3 && m_totalTime <= 6)
        {
            if (m_animated_label_clock.getElapsedTime().asMilliseconds() == 0.001)
            {
                m_label_color.r += 0.034;
                m_label_color.b -= 0.0536;
                m_label_color.g -= 0.0313;
            }
        }

        else if (m_totalTime > 6 && m_totalTime <= 9)
        {
            if (m_animated_label_clock.getElapsedTime().asMilliseconds() == 0.001)
            {
                m_label_color.r += 0.102;
                m_label_color.b -= 0.161;
                m_label_color.g -= 0.094;
            }
        }

        m_totalTime += m_animated_label_clock.getElapsedTime().asMilliseconds();
        m_animated_label_clock.restart();

Thanks for any and all help!

8
Hello there, and Merry Christmas to everybody  :). I'm having a bit of an issue with setting up SFML 2.1 on another PC, which isn't working for me, yet my other PC works fine and I'm doing the same process. I've compiled SFML 2.1 on CodeBlocks' default compiler (GCC 4.7.1) which comes along just fine. Now, when I link everything, CodeBlocks spits out all these nasty errors like:

undefined reference to `_imp___ZN2sf12RenderWindowC1Ev'|

Etc. Does anyone have an idea what could be causing the error? Thanks a lot for any and all help!

9
General / Finding script files
« on: July 28, 2013, 04:47:11 am »
Hi everyone. I have a quick question about file system traversal. Basically, I've created a basic scripting language for my game engine, and I want the game engine to search through a folder and find all the script files. Then, I want to have an option on my main menu to enable/disable the "mod." Do you guys know any good libraries or built in features that can accommodate to this? I heard boost had something similar to this.

Thanks

10
Hi there, I'm having a little bit of trouble regarding my draggable GUI system. The part that I'm implementing now is the dragging of objects such as buttons, labels, radio buttons, etc. For the sake of simplicity, I'm only going to post my problems with buttons, as it's the same with all the others. My system detects holding the mouse, clicking it, and hovering it over fine. However, whenever I hold down the mouse and move the cursor, the sprite of the button does not move consistently. It often stops whenever I keep dragging, and moves whenever I just click once. Here's my code:

    const bool CButton::mouseOnObject(const float x, const float y)
    {
        if (m_sprite.getGlobalBounds().contains(x, y))
            return true;

        else
            return false;
    }

    const bool CButton::mouseHoldingObject(const float x, const float y)
    {
        if (mouseOnObject(x, y) && sf::Mouse::isButtonPressed(sf::Mouse::Left))
        {
            m_holdingObject = true;
            return true;
        }

        else
        {
            m_holdingObject = false;
            return false;
        }
    }

    const bool CButton::stoppedHoldingObject(const float x, const float y)
    {
        if (!m_holdingObject && !sf::Mouse::isButtonPressed(sf::Mouse::Left))
            return true;

        else
            return false;
    }

    void CButton::update(const float x, const float y)
    {
        if (!m_hovered)
            m_sprite.setTexture(m_backgroundTexture);

        else
            m_sprite.setTexture(m_hoveredTexture);

        if (mouseOnObject(x, y) && m_visible && m_enabled)
        {
            m_buttonHoveredSound.play();

            m_hovered = true;

            if (m_draggable && mouseHoldingObject(x, y))
            {
                std::cout << "emep" << std::endl;

                m_buttonHoveredSound.stop();

                m_sprite.setPosition(x, y);
            }
        }

        else
            m_hovered = false;
    }

    void CButton::draw(sf::RenderTarget& target, sf::RenderStates states) const
    {
        if (m_visible && m_enabled)
            target.draw(m_sprite, states);
    }

That's all the relevant parts to dragging in my button class. Thanks in advance to anybody that helps!

11
I just picked it up today, and I must say it's quite a good book. I wanted a large overview on C++11 and I must say, so far it's given it to me (and I'm only on page 113!) Any other thoughts or opinions?

12
Graphics / Need a little bit more info to understand
« on: May 19, 2013, 03:50:47 am »
I have some questions about the example of tilemap under the vertex array tutorials. I'm having trouble understanding the difference between the entity's coordinates and it's texture coordinates. Also, was Texture Packer used for the 1 sprite used in the example?

Thanks

13
SFML projects / Technoport
« on: April 27, 2013, 10:49:00 pm »
Hi there, I wanted to unveil a project I've been working on this past week with the help of two of my friends. This game (Technoport) was designed to look futuristic and neon-y. It's aesthetics are very similar to the movie Tron :P. There's still a lot to be done, and I will be working on it for quite a while. I combined a lot of different technologies with the game, including a small engine I wrote that's based off of exploiter's SmallGameEngine. The engine is heavily modified by me to suit my needs.

Gameplay:
The point of the game is to collect orbs in order to stay alive, get points, and get coins. Coins will allow you to better your character with thing such as faster teleport speeds, less orb hungry, different colors, etc. In order to teleport, your mouse pointer must be over a platform then you must press T.

Features implemented so far:
All the menu stuff
Save/load settings to file
Save/load player to file
Teleportation

To do:
Finish up graphics
Add orbs and coins
Add store

The crew:
Me: Programmer
Daniel: Head artist
Jose: Artist and gameplay designer

To-do:
Music
Better player graphic. (I made the player graphic as a temporary test as you can probably tell, and I'm a programmer not an artist. Daniel is working on a new one.)
Finish up main mechanics such as orbs

Credits:
The crew :P
Exploiter for his wonderful original engine :D
Nexus for Thor
Laurent for the best 2D graphics lib out there <3

Executable and all required .dlls:
http://www.mediafire.com/?dsxa95kxixgjpap

Code (Please do not steal :P):
https://github.com/TheTerminator1337/Technoport

Thanks for checking out my project! Do not hesitate to make suggestions about my code, the whole point of the making of this game was to learn and to have fun :).


[attachment deleted by admin]

14
General / What version of OpenGL does SFML depend on?
« on: April 11, 2013, 11:35:32 pm »
I recently bought a new laptop, and it comes with an Intel HD 3000 graphics card. Whenever I run a test SFML project (one provided in the documentation), it immediately crashes. My graphics card comes with OpenGL version 1.3.1. Thanks.

Edit: It runs Windows 7 Home premium, and I have a dual core intel core i7 2.7 Ghz processor.

15
General / Cmake with Xcode 4.6
« on: February 18, 2013, 11:14:46 pm »
Hi there, I successfully compiled SFML 2.0 with Xcode 4.6. However, when I load a project through the template, it gives me an error that says: "/Users/PeterSenyszyn/Documents/Test/Test/main.cpp:1:10: 'SFML/Graphics.hpp' file not found"

Do I have to do anything beyond compile SFML with Cmake? Do I have to go ahead and link the libraries, and if so, how would I do that?

Pages: [1] 2 3