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

Pages: [1]
1
Graphics / Update globalbounds
« on: December 21, 2020, 02:25:17 pm »
I am trying to make collision with intersects. This works as expected. But when I move my player with sprite.move and I try to dodge the enemy intersect it still intersects. I found out that when I do sprite.move the globalbounds don't move so the intersects detects the startposition of the player. How can I move my globalbounds too with my player sprite.move?

2
General / Memory leaks
« on: December 16, 2020, 02:29:46 pm »
I am just using the default code for SFML:
Code: [Select]
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>

#include <SFML/Graphics.hpp>

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

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

            window.clear();
            window.draw(shape);
            window.display();
        }
    }

    _CrtDumpMemoryLeaks();

    return 0;
}

But I my visual studio is finding loads of memory leaks?

Pages: [1]
anything