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

Pages: [1] 2 3 ... 8
1
General discussions / Re: Visual Studio 2012 RC
« on: June 02, 2012, 07:33:06 pm »
VC++ 10 binaries are compatible with VC++ 11, you don't need to recompile SFML;

And VC++ 11 (compiler) = VS 2012 (IDE). There's no Visual Studio 2011.
Nice...
Have i to compile with cmake to get 64bit version for VS?

2
General discussions / Re: Visual Studio 2012 RC
« on: June 02, 2012, 03:47:12 pm »
Quote
Check for working C compiler using: Visual Studio 11
Check for working C compiler using: Visual Studio 11 -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "cl" is not able to compile a simple test program.
Cmake can't build SFML for VS11 RC! There is a way to build it manually?

3
General discussions / Re: Visual Studio 2012 RC
« on: June 02, 2012, 03:16:54 pm »
Yes, I would try VS11. The CMake generator was conceived for VS11 Developer Preview or Beta though.
Ok, if it won't work how can i use SFML2 under VS11?

4
General discussions / Re: Visual Studio 2012 RC
« on: June 02, 2012, 03:04:28 pm »
Please write Microsoft or MS, if you want to be taken seriously.
Yes, sorry for this!
Yes, the precompiled libraries are probably not compatible.
Uhm, cmake can build for Visual Studio 11... is that the right build,isn't it?
(VS11 = visual studio 2012 if i'm right)

5
General discussions / Re: Visual Studio 2012 RC
« on: June 02, 2012, 01:54:06 pm »
even on VS 2010 most C++11 features supported, sfml2 on 2012, why not ?
I'm downloading 2012, but have i to build with Cmake SFML2 for better support of SFML in VS2012?

6
General discussions / Visual Studio 2012 RC
« on: June 02, 2012, 01:39:41 pm »
I see that M$ releases VS2012! Now i've some question about:
How much of you use VS2012 RC? :)
How is C++11 support?
Can i still use sfml2 under VS2012?

7
Graphics / Re: VertexArray for tilemap
« on: June 02, 2012, 12:45:47 pm »
I'm getting crazy with update and draw chunks :( I don't know how to code it.
I've a matrix wich represent my tilemap and where i can build tiles.
Chunk size is 8x8 tile
Chunks are std::vector<sf::VertexArray> (maybe i've to code a Chunk class, so i can manage something more than the tilemap)
How can i code a fast and good chunks system? :S
I was thinking about using a IntRect > windowView and calculate tiles coordinates in tile (x*256,y*256) and tehn build and draw chunks taht cover all points inside IntRect... its a good way or there is a more flexible way to manage them?

8
Graphics / Re: VertexArray for tilemap
« on: June 01, 2012, 10:01:46 pm »
_msize() doesn't work like that. You should read the documentation of unknown functions before using them:
Quote from: MSDN
The _msize function returns the size, in bytes, of the memory block allocated by a call to calloc, malloc, or realloc.

There is no portable way to find out how much bytes are totally allocated by an arbitrary object.
Oh yes xD Sorry! I read only some forum posts taht said it used to know bytes and i used it :P
Ok, thx for fast reply :)

9
Graphics / Re: VertexArray for tilemap
« on: June 01, 2012, 09:46:33 pm »
Quote
There is a way to rotate 90° a texture that normally is not rotated in tileset?
Rotate the texture coordinates of the quad.
Nice!  :D
Now i want to see how much memory (in bytes) each item uses. I read aroud about _msize for VS10, but i get a debug error wich say that the poiter i use is invalid or something like that:
std::cout << "The Matrix size allocated is " << _msize(mapMatrix) << " bytes!"<<std::endl;
std::cout << "The MyMap size allocated is " << _msize(&myMap) << " bytes!"<<std::endl;
std::cout << "The MyMapChunk size allocated is " << _msize(&myMapChunk) << " bytes!"<<std::endl;
 
mapMatrix is a sf:Uint16 pointer
myMap is sf::VertexArray
myMapChunk is a std::vector<sf::VertexArray>
The error appear at _msize(&myMap).
There is a better way to know how much bytes each item uses?

10
Graphics / Re: VertexArray for tilemap
« on: June 01, 2012, 07:32:39 am »
There is a way to rotate 90° a texture that normally is not rotated in tileset? Or have i to draw the same texture  rotated and put it in tile set?

11
Graphics / Re: Rotating a sprite
« on: June 01, 2012, 07:28:49 am »
void CSprite::setRotation(float degrees)
{
   drawable.SetOrigin(get_width()/2, get_height()/2);
   drawable.SetRotation(degrees);
   drawable.SetOrigin(0, 0);
}
 

12
Graphics / Re: VertexArray for tilemap
« on: June 01, 2012, 12:05:45 am »
Ok i'm testing for chunks, but i get some errors.
I put in my TileMap class a
std::vector<sf::VertexArray> mapChunks
For my test i want to draw only a 2x2 section of my map that start from (0, 0) coordinates.
So i build a function that store in a vertexarray the right vertex and then store the vertexarray inside the vector.
Then i call draw
window.draw(mapChunks[0],&tilesTexture);

It draws nothing :(
I used the same algorith to build and draw the normal huge map (it draws well), but this tme it wil lbe limited only to a 2x2 matrix.
I checked memory with debugging and vertexarray inside the vector has the same vertexs of normal big map vertexarray.
Why it doesn't draw my small tilemap? What is my mistake?

EDIT: Error found, i forgot to set primitive type xD Now it draws well 2x2 map :)

13
Graphics / Re: VertexArray for tilemap
« on: May 31, 2012, 11:03:40 am »
Ok, i will make some tests to reach this goal :P

14
Graphics / Re: VertexArray for tilemap
« on: May 31, 2012, 10:38:57 am »
Yes, it is crazy to make 3900x3900 xD
300x300 is alredy too big and take too much to "walk" all around. So probably i will limit the map size to 300x300
1000x1000 (and 3900x3900) are just tests, if i could draw 1000x1000 map without FPS crash it will be very usefull, so i can draw all size below 1000x1000 with an high framerate :)

So now, my question is: to manage chunks, will i need to split vertexarray map in n small vertexarray? Or there is a better and coolest way to do it?

15
Graphics / VertexArray for tilemap
« on: May 31, 2012, 12:13:12 am »
Ok, now i made a functional tilemap, but i foud a limit... cus VertexArray is a std::vector<Vertex> i can't make a 3900x3900 tile map (60 milion of vertex)
Due to private member i can't know m_vertices.max_size()
For the moment i can generate and build a 32x32*256px tilemap in some microseconds and draw it in 10 microseconds :)
My question, how can i know the max size of m_vertices?

For the moment i get crash at this line:
myMap.resize(nrows*ncols*4);
 

EDIT:
Ok i see that i will get some FPS crash with 350x350 map. So i suppose to set max map size to 300x300 which is the last stable FPS map size!

Pages: [1] 2 3 ... 8