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

Pages: [1]
1
Graphics / [Solved]
« on: June 26, 2011, 06:45:02 pm »
thanks man. i looked back at the code for our project and that was also there   :oops:

2
Graphics / SFML2 rendering sprites fail.
« on: June 23, 2011, 08:12:37 pm »
Quote from: "Hiura"
You get a white sprite because the associate sf::Image is no more available.

Your Background::Load function is good as it returns a copy of the image but then on the line 'sf::Sprite background(Background::Load("Data/background.bmp"));' the returned image is not stored anywhere and is destroyed on the same line.

You can fix this with this "great" solution (using an image manager is way better as soon as you have multiple image) : repalce the above line by these two :
Code: [Select]
sf::Image background_image = Background::Load("Data/background.bmp");
sf::Sprite background(background_image);


then what would be the point (of using the background loader)? and it stills loads white blocks!

other engines use the same technique and work: http://code.google.com/p/dangerwave/

3
Graphics / SFML2 rendering sprites fail.
« on: June 22, 2011, 07:49:19 pm »
honestly, I get this issue all the damn time. what in the hell do i have to do to get a sprite on the screen every single time! i just get a white block of whats supposed to be the image. yes i've used sfml before and this issue is random. some projects i have them working fine. this they dont.

heres the code:

Code: [Select]


#include <SFML/Graphics.hpp>
#include"Background.hpp"

int main()
{
    // Create the main window-width, hieght
    sf::RenderWindow window(sf::VideoMode(800, 600), "Connect 4");

    window.SetFramerateLimit(15);
    //load images
    sf::Sprite background(Background::Load("Data/background.bmp"));
    background.Move(200,200);
    // Start the game loop
    while (window.IsOpened())
    {
        // Process events
        sf::Event event;
        while (window.PollEvent(event))
        {
            // Close window : exit
            if (event.Type == sf::Event::Closed)
                window.Close();
        }

        // Clear screen
        window.Clear();

        window.Draw(background);
        // Update the window
        window.Display();
    }

    return EXIT_SUCCESS;
}


all background does is return the sprite loaded.

Code: [Select]

sf::Image Background::Load(string filename)
{
    sf::Image image;

    if( !image.LoadFromFile(filename) )
    {
        //fail
    }
    else
    {
        return image;
    }
}


4
General discussions / radeon xxxx
« on: June 11, 2011, 01:35:23 am »
Quote from: "OniLink10"
Quote from: "grandmasterhack"
radeons work with 1.6 you must  be on something older.
Not if you're using recent drivers.


i am. 0.o

5
General discussions / The Concept of Screen moving [2d camera]
« on: June 10, 2011, 07:45:08 pm »
Quote from: "Nexus"
Quote from: "grandmasterhack"
i've read that but when i do use that how do i detect collision since every thing is off?
Game logics like collision detection and response are normally independent of the graphical representation (i.e. also of the sf::View).


what about zooming in? i know that affected it(but that was in 1.5).

6
General discussions / Save SFML Wikipedia page
« on: June 10, 2011, 06:31:52 pm »
Quote from: "Laurent"
Yes, don't worry about that. It's like this since several months, maybe years. And indeed the only place where people talk about SFML is the official website, because I put many efforts in providing all the resources that users need here.


youtube is having a dev war about SFML VS SDL. i mean, sdl developers are getting bashed so hard about it, but sfml just performs better and easy ( & makes sense code wise) to use. one thing that killed me about sdl is that all its resources are spread around, and its net portion is completely undocumented; i like how i can come to the sfml and get ALL THE HELP i need.

7
General discussions / The Concept of Screen moving [2d camera]
« on: June 10, 2011, 06:08:08 pm »
Quote from: "Nexus"
Actually, sf::View does everything you need for a 2D camera. How it works is explained in the tutorials and in the documentation.


i've read that but when i do use that how do i detect collision since every thing is off? does it matter? when i wrote my editor i had an offset value that moved the tiles over instead of view.

Code: [Select]
[pseudo code]

if(key_press.RIGHT)
offset_x++;

tile.setpostion(x + offset_x);

8
General discussions / The Concept of Screen moving [2d camera]
« on: June 10, 2011, 05:46:27 pm »
Hello, i've been wondering this but i can seem to get a hold of the concept of programming a 2d platformer. jumping and maps dont seem to be the problem its just the screen( or camera) moving i dont understand. can someone break down the theory of this. do i need an offset, becasue i heard one way of doing it is basically the character doesnt move at all but you essentially moving the map itself.

9
General discussions / radeon xxxx
« on: June 10, 2011, 05:42:59 pm »
radeons work with 1.6 you must  be on something older.

10
General / [Solved] Linux .Deb packages
« on: June 10, 2011, 01:37:50 pm »
Quote from: "Laurent"

Of Linux/packaging, probably :)


I already found something for debian based users. look up http://sourceforge.net/projects/debreate/

searching this will help: http://www.google.com/search?sourceid=chrome&client=ubuntu&channel=cs&ie=UTF-8&q=gui+deb+package+creator

text based tutorials for .deb, .rpm, and .sh here: http://ftp://download1.swsoft.com/Plesk/Panel9.5/Doc/en-US/plesk-9.5-unix-mod-guide/index.htm?fileName=25839.htm

11
General / [Solved] Creating Packages for Linux
« on: June 08, 2011, 09:48:10 pm »
Quote from: "Laurent"
Well, this is a forum about SFML, not about Linux packages. You'd better post in a dedicated forum.


dedicated forum for what? or of what to be more specific. i've been searching far and wide but no answer.

12
General / [Solved] Creating Packages for Linux
« on: June 08, 2011, 09:36:00 pm »
Quote from: "Svenstaro"
Use proper CMake install paths and then just use CPack to create deb and rpm packages for you.


Cmake will automatically do it for you?

13
General / [Solved] Creating Packages for Linux
« on: June 08, 2011, 01:17:55 pm »
it would be nice to say if you didnt know either...

14
General / [Solved] Creating Packages for Linux
« on: June 07, 2011, 05:20:07 pm »
hello you guys, i am new to linux and i was wondering how do i get my program i built to install to the system. i want to learn how to create a packages (.deb & .rpm) for my game. i understand how to use makefiles but "configure" is something i dont understand.  which package manager is easier to use?

Pages: [1]
anything