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

Pages: 1 ... 27 28 [29] 30 31 ... 33
421
Graphics / Re: Tilebased map
« on: October 13, 2013, 09:57:43 pm »
Much slower. When I wrote my map loader for Tiled (tmx) maps I originally drew each tile as a separate sprite. Eventually I changed it to using a vertex array based on this and got over 1000(!) FPS increase in performance (without drawing anything else / doing any other kind of entity updates). Draw calls are probably one of the biggest performance hits

422
SFML projects / Re: 'Tiled' Tile-map Loader
« on: October 13, 2013, 09:51:25 pm »
That is indeed a linker error referring to zlib - although I've tried the loader with 1.2.8 and it works fine using the static build / VS11. Did you make sure to replace the zlib.h and zconf.h file included with the map loader with the ones from the newer version of zlib? (I really shouldn't have included the headers with the distribution, my bad)

423
SFML projects / Re: What are you working on?
« on: October 04, 2013, 10:55:44 pm »
Looks very cool, will have to try it this weekend  8). Can't help but think that this would be awesome on my tablet...

424
SFML projects / Re: 'Tiled' Tile-map Loader
« on: September 24, 2013, 07:13:54 pm »
The broad answer is 'probably, yes' - but I wouldn't know how to. I think it would work better as a straight port to the C# binding of SFML as I believe there is also a C# binding for zlib (which the class relies on) and the pugixml stuff can be replaced as .net/mono has direct support for XML.

425
Graphics / Re: sf::Shader - Vertex Attributes
« on: September 24, 2013, 03:24:39 pm »
Sorry to drag up an old topic but I've just come across this myself. Currently I'm mixing rendering 3D meshes with SFML, and rather than write a bunch of my own classes to deal with creating shaders/ programs it's easier for me to just load an SFML shader and bind it when needed. It works perfectly for most applications (lighting and things), but I need to access the vertex attributes when using a normal map shader so I can send my array of vertex tangents. As far as I can see I need something like sf::Shader::getParamLocation() to pass the correct ID to glVertexAttribPointer (although I'm a bit new to this so I may be wrong). I realise 3D will always be off the table in SFML, so I understand if something like this won't ever be implimented (but it would be nice,  ;) ;) ;))

426
SFML projects / Re: 'Tiled' Tile-map Loader
« on: September 22, 2013, 09:30:59 pm »
hmm. Sounds like you haven't added the cpp files to your project

427
SFML projects / Re: What are you working on?
« on: September 22, 2013, 11:45:37 am »
Dude thats awesome!
I really love the sounds and the relaxing music

Thanks! :D I'm rather pleased with the sounds / music as, apart from the stuff which can't be synthesised well like explosions, I made them all myself using a couple of VSTi synths and Cubase

428
SFML projects / Re: What are you working on?
« on: September 22, 2013, 11:32:25 am »


Space Racers! I wasn't sure about showing anybody yet as it's still a bit rough around the edges (particularly the podium... and the random horn noise :S ), but as I've put this temporarily on hold while I do something else I may as well throw this in here. Worked on it about 6 months now, it's basically a clone of the old Micro Machines games on the SNES / Genesis. Each vehicle behaves differently (bikes are faster but weaker etc) and the tracks are made with Tiled. The video looks a bit odd because I capped it at 1920x1200 without thinking about it so YouTube has cropped it to 1080p, hence the graphics are clipped top and bottom.

429
SFML projects / Re: 'Tiled' Tile-map Loader
« on: September 21, 2013, 09:53:15 am »
Well you don't say what the errors actually are, but at a guess I would say you need to link zlib 1.2.7 or higher, as mentioned in the included readme

430
General / Re: How to use a serial com port with SFML
« on: September 19, 2013, 08:17:06 am »
A while back I wrote a class specifically for talking to microcontrollers over RS232 which wraps both windows and Linux APIs in a single cross platform interface, here which might help

431
SFML projects / Re: 'Tiled' Tile-map Loader
« on: September 14, 2013, 12:29:34 pm »
I guess it depends on how you use the quad tree. if you had a large world which needed to maintain the position of all the objects within it then building the tree once and adding/removing objects would probably be more efficient. In my racing game both the vehicle and the view move, however, and most of the initial culling is done simply by ignoring everything which isn't visible (as there is no way the car will collide with anything outside the view). Because the view is moving it effectively moves the root node and therefore necessitates rebuilding each time. It's no real performance hit anyway, I can render over 3000fps on my machine at work :) The quad tree node class is pretty flexible and I'm sure it wouldn't take much to modify it to allow for adding / removing objects as they move if anyone needed it. FWIW the quad tree code is based on this article.

The car game itself has come a long way since (it doesn't even have cars any more...) and won't have a rotating view as I have very specific ideas for it. I'm glad you like what you see, however ;) Eventually I will post something about it in the projects forum.

432
SFML projects / Re: 'Tiled' Tile-map Loader
« on: September 13, 2013, 05:34:28 pm »
Honestly? I couldn't say without knowing more about what you're trying to do. I've tried to make the loader as generic as possible but there is bound to be some need for customisation for any project. If it works for you, then it's good I guess :) I've personally always handled collisions by drawing data on an object layer then using the quadtree to query objects near the sprite but, like I say, I don't really know what fits your particular project :)

433
SFML projects / Re: 'Tiled' Tile-map Loader
« on: September 08, 2013, 09:15:42 am »
Oh! Thanks, I shall add your fix as soon as I can :D

434
Graphics / Re: Sprite.SetColor issue
« on: August 21, 2013, 04:45:34 pm »
Have you tried making the original image to be tinted greyscale? Then you should be able to set it to any colour you like. Alternatively this frag shader should work ( although I haven't tested it)


#version120

uniform sampler2D texture;
uniform vec4 tintColour;

void main()
{
        //get greyscale value
        vec4 texColour = texture2D(texture, gl_TexCoord[0].xy);
        float amount = dot(texColour.rgb, vec3(0.299, 0.587, 0.114));
       
        //set pixel to tint multiplied by value
        gl_FragColor = vec4(vec3(tintColour.rgb * value), texColour.a);
}
 

435
General / Re: A question about the dreaded singleton
« on: August 12, 2013, 07:06:28 pm »
Heh, I'm almost beginning to think I shouldn't have brought up this subject :)

Well if you change your design around, there's no need for singletons, because by the design itself you can ensure that there can't exist multiple versions of the resource managers. ;)

Yes of course, I'm confusing myself now that just because there is only one instance doesn't make it a singleton (it's been a long day...)

@Nexus: those are perfect examples, thanks. I shall be studying them carefully in due course. This is what I love about the whole world of programming (and sometimes hate ;) ) there's always more to learn.

Thanks for all the input guys!

Pages: 1 ... 27 28 [29] 30 31 ... 33
anything