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 - general sirhc

Pages: 1 [2]
16
Graphics / Simple static 2d shadows
« on: August 11, 2010, 01:55:19 pm »
Okay so now that I have SFML 2, I'm not really sure of the syntax of the new commands, is there is documentation yet or do I just look at the arguments for the functions?

After trying to run my project on SFML 2 I am getting compile errors saying that "no matching function for call to 'sf::RenderWindow::Draw(sf::String&)', it might be something really stupid I've done because I'm tired but help would be nice none the less (Apologies if its something stupid cause i'm tired)


Also on the tutorial page for mingw saying how to set up SFML I noticed this minor typo

"Go to SFML-x.y\build\codeblocks, and open the file SFML.workspace. Choose the configuration you want to build (Debug or Release, Static or DLL), and ---->clic<---- "build workspace". This should create the corresponding SFML library files in the lib directory, as well as the sample executables."

Just thought you might be interested

17
Graphics / Simple static 2d shadows
« on: August 10, 2010, 10:58:42 am »
Sadly that what I was thinking would be the end result.

Don't worry although I am new to SFML and not as much C++ I still have got my fair share of programming experience and I have learned my lesson from having very large amounts of useless data.

I only plan on rendering shadows that you can see, not to mention that the map can reach 2621400px X 2621400px at the moment and I plan on increasing it, so attempting to render every shadow would probably cause some problems :P

EDIT:
I don't suppose there is a chance of a private or beta release of SFML 2, I am not worried if you change it later on and I need to do some minor fixes. I would just like to get this working sooner rather than later.

18
Graphics / Simple static 2d shadows
« on: August 10, 2010, 10:40:09 am »
Thank you for the very quick reply.

I don't think copy will work in this situation because the in game world is a giant map (not like a simple level based game where everything is on the screen at once) and that the map is built by the player so although the shadows are static they image that has all the shadows needs to be updated fairly often. I decided against using copy because "This function does a slow pixel copy and should only be used at initialization time"

19
Graphics / Simple static 2d shadows
« on: August 10, 2010, 10:29:57 am »
I am currently converting my game from GML (Game Maker Language) to C++ and I am using the SFML library for all graphics however I am having a lot of trouble replicating how surfaces in GM work.

A surface in GM is basically a render target which you can draw onto.

My actual problem is that I have static shadows that I want to draw with say an alpha of 0.6 (these are loaded from file) but the shadows overlap when they're drawn and the overlap areas are darker because of it, so I was wondering how do I draw them all say to say another image or something and then draw that image as a sprite with 0.6 alpha

Apologies if I didn't make myself clear enough, its a bit confusing to explain.

I'm using SFML 1.6.

Thanks to anyone that can help

Pages: 1 [2]