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

Pages: [1]
1
SFML projects / Re: Candle - 2D basic lighting for SFML
« on: December 11, 2020, 03:44:58 am »
This looks amazing, I hope you don't mind if if I use it for my game haha. Once I get I better grasp of how it works, I'd love to help contribute to it with the different lights and more realistic lighting and such. Really cool stuff!

2
General / Re: Running SFML with no console without Visual Studio
« on: December 10, 2020, 09:41:50 pm »
Doing more research regarding Visual Studios compiler, I found the /SUBSYSTEM flag that I can put in my cl command. I'll drop a link if anyway wants to do it the way I am.
https://docs.microsoft.com/en-us/cpp/build/reference/subsystem-specify-subsystem?view=msvc-160

3
General / Running SFML with no console without Visual Studio
« on: December 10, 2020, 08:59:47 pm »
I realize this question has been asked many times before, and if I was using Visual Studios, the answer would be to link the sfml-main.lib and change the project type to Window. However, I have a different IDE I prefer so I set up the below batch file to build the executable for me.

@echo off
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
cl /EHsc source\*.cpp /I "C:\SFML\include" /link C:\SFML\lib\sfml-system.lib C:\SFML\lib\sfml-window.lib C:\SFML\lib\sfml-graphics.lib C:\SFML\lib\sfml-audio.lib C:\SFML\lib\sfml-main.lib /out:PhantomEmber.exe
del *.obj
move PhantomEmber.exe build
pause


The libraries are all the dynamic release versions, with the corresponding dll files in the same directory as the exe, and I made sure to get the correct version of SFML (64bit, for VS 2017 Windows 10). I call the vcvars64.bat to initialize the 64bit MSVC compiler, and then link everything together using the cl command. I am linking the sfml-main.lib, but is there another arguement I need to put in the script that is the equivelent of setting it a Windows project? Or is the only way to get the window with no console is by just building it with Visual Studios? Other than the console, everything compiles and runs fine. Let me know if there is anything about my setup/code thats important.

4
Audio / Re: Error saying, "OpenAL32.dll is missing"
« on: December 04, 2020, 06:28:35 pm »
The SFML download should have included the correct dll to use. Even though the names might be the same, it might be a different version than what SFML is expecting. Checked if you missed it in the bin folder. I hope this helps! :D

5
Graphics / Re: RenderTexture and editting pixels Help
« on: December 04, 2020, 06:15:20 pm »
The use of sf::RenderTexture is for when you have a complex image to display that doesn't need to be updated every frame. In the case of the line-of-sight lighting system, it really only needs to change when you move your mouse, otherwise, it would calculate to be the same image. The offscreen drawing would be used to render the scene, but only when there is a mouse moved event. To draw it on screen, you would package it up into a sprite using the offscreen drawing as the texture, so you can update the image onscreen every frame. Even though it would sometimes be the same image, it's a lot less taxing to draw a single prerendered sprite than it is to rerender the scene every frame, as opposed to every mouse move. I hope this answers your question! :D

Pages: [1]
anything