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 - Infinity Squared Software

Pages: [1]
1
General / SFML And Emulators?
« on: January 13, 2016, 03:11:50 pm »
Hey Guys!
I am looking to create a Gameboy emulator in C++ and need to choose a graphics library. Would SFML be able to work in an emulator or should I learn SDL?
Thanks!

2
SFML projects / My First SFML Game! A Game Like Space Invaders!
« on: December 16, 2015, 10:18:33 pm »
Hey Guys!
     I have been developing games for several years now with Unity 3D and GameMaker: Studio. However, in a burst of motivation, I decided to learn SFML and make a game in it. I am pretty new to OOP in C++, so the code is pretty rough :-\. Although I enjoyed SFML, I am going to learn DirectX since that is largely applied in the AAA game industry from my understanding.

Here is the Git Repo
Here is my website - http://infinitysquaredsoftware.com/

3
General / Help With Space Invaders Style Game Class. Just started SFML.
« on: November 25, 2015, 07:41:51 pm »
Hey Guys!
I just recently started using SFML with C++ and I really enjoy it. However, because I'm new, I have already run into a problem. I am trying to recreate Space Invaders. To create the enemy, I assume my options are to create the enemy, and then copy and paste that code again and again. My other reasonable and cleaner option was to create a class. My problem is, I can't get my classes to work in SFML. Can someone help?

The first thing I do is create a class and then create an object:
        //Creating an Enemy
        class Enemy
        {
        public:
                Enemy::Enemy()
                {
                        sf::RectangleShape shape(sf::Vector2f(25, 25));
                }
        };
       
        Enemy enemyOne;

After that, I call the enemyOne object in the window.draw()
window.draw(enemyOne);

However I get the error:
Severity   Code   Description   Project   File   Line
Error   C2664   'void sf::RenderTarget::draw(const sf::Vertex *,size_t,sf::PrimitiveType,const sf::RenderStates &)': cannot convert argument 1 from 'main::Enemy' to 'const sf::Drawable &'   SFML Test   c:\users\calvin\documents\visual studio 2015\projects\sfml test\sfml test\source.cpp   71

and I get this error:
Severity   Code   Description   Project   File   Line
Error (active)      no instance of overloaded function "sf::RenderWindow::draw" matches the argument list   SFML Test   c:\Users\Calvin\Documents\Visual Studio 2015\Projects\SFML Test\SFML Test\Source.cpp   71

What am I doing wrong and how can I fix it?

Any help would be GREATLY appreciated. I have been making games with game engines (Unity, GM, etc.) and really want to start using SFML.

Pages: [1]
anything