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 - bacondude95

Pages: [1]
SFML projects / Tile-based shooter
« on: February 22, 2017, 02:45:20 am »
I've been working on this project for a while and whenever I have time. It uses SFML, Thor, TGUI, and Sol2. The planned design is a top-down Doom-like shooter. There will be pickups that grant temporary boosts, a variety of weapons, a wide range of enemies with differing difficulties, and levels with the sole goal of finding the exit. Entity types are defined in Lua and stores the information such as what components it has (drawable? position? collision? etc). I got this idea from Elias Daler. Right now the component system is very simplistic but soon I will start adding more specific features such as projectile, health, light emitter, etc. I am also using a map editor to create maps and continue to add features to that as well. Using the editor and ability to load entities through Lua files will provide strong grounds for the ultimate modding experience.

To do:
  • Add more components to fit targeted gameplay.
  • Add conditional features to maps. Ex: Player needs Red Key to go through Red Tile.
  • Add dynamic lights which can change how the game is played in certain situations.
  • Add multi-player support for co-op runs and possibly competitive arena-like gamemodes

Right now the textures are placeholders so it does not look so spectacular but this is what it looks like:
(click to show/hide)

Window / What is the best way to use an event throughout a program
« on: March 08, 2014, 09:20:13 pm »
I'm trying to make an event class so it would just be easier to get events and use them. But you can't make a function out of sf::Event like I planned to, and this kind of took away the opportunity of returning event. What would be the best way to use events in a program? I want to limit to limit how many events since only one event can be processed at a time.

Graphics / Problem with SFML and sprites...
« on: February 04, 2014, 06:08:35 am »
Whenever I try compiling the code(Which is handling collision between two sprites) I get an error.

This is only a portion of what I'm having a problem with, and yes it's all linked, libraries are included and everything.
It even compiled succesfully before but when I modified what happens when an error occurs (Texture failed to load, font failed to load, etc) it came up with a problem here.
If any more information is needed please ask.
bool Collision::SpritetoSprite(sf::Sprite sprite, sf::Sprite sprite2)
    if(sprite.getPosition().x < sprite2.getPosition().x + sprite2.getTexture().getSize().x && sprite.getPosition().x > sprite2.getPosition().x &&
       sprite.getPosition().y < sprite2.getPosition().y + sprite2.getTexture().getSize().y && sprite.getPosition().y > sprite2.getPosition().y)
        return true;

        return false;


And the error:
C:\Users\Nicholas\Desktop\Projects\SFML2.1 Game\Collision.cpp


error: request for member 'getSize' in 'sprite2.sf::Sprite::getTexture()', which is of pointer type 'const sf::Texture*' (maybe you meant to use '->' ?)|

The error also appears for line 31.
I have no idea what this error is implying or how to fix it.

General / Problems compiling a program on Ubuntu
« on: February 02, 2014, 06:25:03 am »
Since I'm wanting to go into the game industry I thought it would be a good practice to get used to making cross-platform software.
I downloaded SFML 2.1 for Ubuntu 12.10 and followed the instructions. I'm currently using the 64 bit package of SFML since there are more instructions for 32-bit and decided I'll get into compiling with 32-bit later. Anyways I downloaded, and installed correctly, but having problems compiling. Okay maybe it's not compiling part exactly but more like the linking part to get the final executable(I also have all the .so files in the directory).

Whenever I link it I get this:

What does this mean?!
If it helps here is the code
#include <SFML/Graphics.hpp>

int main()
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);

    while (window.isOpen())
        sf::Event event;
        while (window.pollEvent(event))
            if (event.type == sf::Event::Closed)


    return 0;

If any other information is needed feel free to ask.


Graphics / Help with vertexArrays and Sprites
« on: January 25, 2014, 06:07:19 am »
I'm programming my first game and it wasn't until I got to vertex arrays that I was confused. I'm just stuck on the thought of what I should use vertex arrays for and what I should use sprites for. So I understand Vertex Arrays are lightweight and more efficient. But what could I use them for? I think you would use them for Tilemaps, and maybe just other stuff that doesn't affect the game play entirely. Would I use sprites for enemy's, and more dynamic things that could be moved and destroyed.

What I'm trying to ask is, can I still use sprites? The tutorial said you'll quickly fill your graphics card... but how much does that mean? And also is there a way to move vertex arrays?

Thank your for your time and any help you may have.

Pages: [1]