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

Pages: [1]
1
Window / Re: Views not positioning right in the main window
« on: March 26, 2014, 08:40:02 pm »
well, now everything is working.

I changed
minimap.setSize(10000, 8000);
minimap.setCenter(0, 0);
to
minimap.reset(sf::FloatRect(0,0,10000,8000));

and its working now, I still dont know why.

2
Window / Views not positioning right in the main window
« on: March 26, 2014, 07:46:04 pm »
So, im trying to create a minimap on my game, the View for the game is working ok, but the minimap doesnt position well. Looks like the view for the minimap is not considering all the windows to determine his size.

If I use

minimap.setViewport(sf::FloatRect(0, 0, 0.25f, 0.25f));
this happens.



The View is not positioned at 0,0 and also has no 25% the size of the window. The other view is set has camera.setViewport(sf::FloatRect(0, 0, 1, 1)) and works well.

What can I do?

3
Graphics / Re: Best way to program PacMan
« on: May 12, 2012, 04:08:19 am »
RenderTexture, hmm
I will take a look at this, this is what Im doing in some way..

Anyway, im trying to not use loops inside the main while to print images, anyway, thanks for the help

4
Graphics / Best way to program PacMan
« on: May 11, 2012, 11:28:08 pm »
So, i created pacman in a way where I print a map that i read from a txt file, I'm using tiles to build the map, then I do a CopyScreen to render all the map in only one image. My problem is what I do about the food, there is a way to modify a image without printing? If I can do that, i will just print a floor tile over the food tile.

Or there is a better way to handle this?

5
Graphics / Better way to draw same sprite multiple times
« on: March 14, 2012, 11:51:29 pm »
I'm in troubles right now..
i want to create a pacman game, so i want to create a lot of sprites, on sprite for every 20x20 pixels square.
I want to something like this

Code: [Select]

int x,y;
for (x=0;x<10;x++) {
    for (y=0;y<10;y++) {
      sf::Sprite NAMEUSINGXANDY(image);
    }
}


lets say i want to name "NAMEUSINGXANDY" has x0y0, since x will be 0 and y will be 0 too in thr first loop.

How can I do that? Or there is a better way to do that? (i believe there is a better way)


Thank you in advance.

6
Graphics / Better way to draw same sprite multiple times
« on: March 14, 2012, 09:52:46 pm »
I will use multiple Sprites.

Thank you for your help.

7
Graphics / Better way to draw same sprite multiple times
« on: March 14, 2012, 07:54:26 pm »
Pretty simple.
Like in terraria, the same image is printed multiple times to build the map.
Do i need to Draw the sprite, change position, draw again multiple times them App.Display?

Thanks in advance

8
General / How to install SFML 1.6 with Code::Blocks ?
« on: March 14, 2012, 11:55:51 am »
yes. you are right...
i totally forgot the part after the picture.

Thank you.

9
General / How to install SFML 1.6 with Code::Blocks ?
« on: March 14, 2012, 12:05:21 am »
I tried the second solution too...
Still got this.

Code: [Select]
D:\Teste\teste\main.o:main.cpp|| undefined reference to `sf::Clock::Clock()'|
D:\Teste\teste\main.o:main.cpp|| undefined reference to `sf::Clock::GetElapsedTime() const'|
D:\Teste\teste\main.o:main.cpp|| undefined reference to `sf::Sleep(float)'|
D:\Teste\teste\main.o:main.cpp|| undefined reference to `sf::Clock::GetElapsedTime() const'|
||=== Build finished: 4 errors, 0 warnings ===|


trying to build the clock example..

10
General / How to install SFML 1.6 with Code::Blocks ?
« on: March 13, 2012, 09:18:48 pm »
Since i cant follow the actual tutorial in the site...
there is no "include" folder in c::b for example

im pretty newbie in this, a simple step by step will help a lot .

Thanks in advance.

Pages: [1]