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

Pages: [1] 2 3 4
1
Graphics / Is it ok to reverse y axis?
« on: June 04, 2017, 09:26:14 am »
So I found that SFML is using conventional coordinate system where -Y goes up and +X goes right. But since my game engine classes are based on normal coordinate system (conventional mathematical coordinate system), the reverted Y axis is breaking them. Should I reverse Y axis, and is this idea wrong? And how can I reverse it. Thanks :).

2
General / How to make installer for my game?
« on: May 29, 2017, 09:16:44 pm »
How can I make an installer that will install all my game files and install latest VC++ redistributables? And what about OpenAL and it's license? Thanks :).

3
General / Re: How to make game logic independent of fps? [SOLVED]
« on: May 21, 2017, 03:58:51 pm »
Thanks!

4
General / How to make game logic independent of fps? [SOLVED]
« on: May 21, 2017, 10:15:01 am »
In my game engine, the whole logic and draw is repeating in while loop. The problem is, if someone has big fps, his game logic will go faster than someone who has small fps. How can I make my game logic independent of fps? Thanks :).

5
Me and my friend already tried to update as I said in text. My question is how do I make my simulation compatible for all Windows. How do I build for each version?

6
Hello everyone :). So after months i finally got my engine done. Engine uses SFML 2.4.1. Gravity simulation I made, worked fine on my computer (which runs Windows 10) without any error, but when I gave my friend a simulation, he got an error which says "The program can't start because api-ms-win-crt-utility-l1-1-0.dll is missing from your computer". http://imgur.com/a/be3lE
After that, I tried a simulation on my laptop which runs Windows 7. And I got an error but with different message. I looked at internet for solution and I found I need to install Visual C redist 2015. After installing, I tried running a simulation and got the same error as my friend. After that day, my friend told me simulation worked fine on his computer which runs Windows 10. So I concluded that build is only for Windows 10. My question is how do I make my simulation compatible for all Windows. Thanks :)

7
Graphics / Re: Get sprite position relative to view
« on: January 11, 2017, 12:40:23 am »
Thanks.

8
Graphics / Get sprite position relative to view
« on: January 10, 2017, 09:07:40 pm »
My window is using letterbox view (which I found on this website), and whenever window is resized, it's pixel size changes but ratio not. The problem is, I don't  know how to get sprite position relative to the view not world position. Btw I fixed mouse position with this code:
                        sf::Vector2f mouse_position = getWindow()->mapPixelToCoords(sf::Mouse::getPosition(*getWindow()));

                        if (event->mouseMove.x >= playbutton->getPosition()->x && mouse_position.x <= playbutton->getPosition()->x + playbutton->getCurrentSize().width
                                && mouse_position.y >= playbutton->getPosition()->y && mouse_position.y <= playbutton->getPosition()->y + playbutton->getCurrentSize().height)

9
General / Re: Fatal error in project. (using dll engine)
« on: December 14, 2016, 10:55:39 pm »
Oh, my mistake. Error is because I compiled dll as release but tesdll was running debug. Thank you!

10
General / Re: Fatal error in project. (using dll engine)
« on: December 14, 2016, 10:22:16 pm »
Created Win32 project (Engine) and normaly added SFML to project (include dir, lib dir, debug>input...) and in all headers I have this code
#ifdef LIGHTSPEEDENGINE_EXPORTS
#define LIGHTSPEEDENGINE_API __declspec(dllexport)
#else
#define LIGHTSPEEDENGINE_API __declspec(dllimport)
#endif
and compiled it as release. Then I created empty project "TestDLL" and added in include dir. location of engine headers and lib dir. of engine like in Engine project. Copied dll from engine release to TestDLL project and in C/C++>General>Additional Include sfml include dir.

11
General / Fatal error in project. (using dll engine)
« on: December 13, 2016, 11:04:38 pm »
Created new empty C++ project and added inc dir, lib dir, input... of my engine .dll and in C++>General in Additional Inc Dire added location of SFML includes. I compiled it and got this

and output is:
'TestDLL.exe' (Win32): Loaded 'E:\JAVA DEVELOPER\CSHARP Workspace\TestDLL\Debug\TestDLL.exe'. Symbols loaded.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\kernel32.dll'
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'E:\JAVA DEVELOPER\CSHARP Workspace\TestDLL\TestDLL\Light Speed Engine.dll'. Symbols loaded.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140d.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\win32u.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'E:\JAVA DEVELOPER\CSHARP Workspace\TestDLL\TestDLL\sfml-graphics-2.dll'. Module was built without symbols.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'E:\JAVA DEVELOPER\CSHARP Workspace\TestDLL\TestDLL\sfml-window-2.dll'. Module was built without symbols.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32full.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'E:\JAVA DEVELOPER\CSHARP Workspace\TestDLL\TestDLL\sfml-system-2.dll'. Module was built without symbols.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\opengl32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\glu32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ddraw.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\winmmbase.dll'
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dciman32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\combase.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp_win.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nvoglv32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\windows.storage.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\powrprof.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel.appcore.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\SHCore.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\profapi.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\setupapi.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wtsapi32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dbghelp.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wintrust.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntmarta.dll'. Cannot find or open the PDB file.
The thread 0x1cd4 has exited with code 0 (0x0).
The thread 0x1fe8 has exited with code 0 (0x0).
The thread 0xf50 has exited with code 0 (0x0).
The thread 0xe50 has exited with code 0 (0x0).
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file.
'TestDLL.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winsta.dll'. Cannot find or open the PDB file.
Exception thrown at 0x6F7BCF5E (vcruntime140.dll) in TestDLL.exe: 0xC0000005: Access violation reading location 0x00CC4000.

GameTest (project) main class:
#include <Engine.h>
#include <Window.h>
#include <iostream>

int main() {

        ls::Engine* engine = new ls::Engine;

        ls::Window_Blueprint window_blueprint("Intros Manager", ls::Vector(1920, 1080));

        //window_blueprint.icon_source = "icon.png";

        engine->initialize(window_blueprint);

        delete engine;

        return 0;
}
 

And opens Window.h (heade of engine):
#ifndef WINDOW
#define WINDOW

#include "Vector.h"
#include <string>

#ifdef LIGHTSPEEDENGINE_EXPORTS
#define LIGHTSPEEDENGINE_API __declspec(dllexport)
#else
#define LIGHTSPEEDENGINE_API __declspec(dllimport)
#endif

namespace ls {

        struct LIGHTSPEEDENGINE_API Window_Blueprint {

                std::string name;

                Vector resolution;

                bool resizable = true;

                bool fullscreen = false;

                int framerate = 30;

                std::string icon_source;

                Window_Blueprint() = default;

                Window_Blueprint(std::string window_build_name, Vector window_build_resolution) : name(window_build_name), resolution(window_build_resolution) {}

        };

        sf::View LIGHTSPEEDENGINE_API getLetterboxView(sf::View window_view, sf::Vector2u* window_resolution_vector2f);

}

#endif
 

I hope if someone can help me :). Thanks.

12
I'm not an profesional C++ programmer just to be clear. I made my own game engine and I compiled it as Win32 DLL, and engine is using SFML. When I added engine to my GameTest project, I got error "cannot open source file SFML\Graphics.hpp...". Tried making test engine without sfml, and it worked fine. Idk how to use dll which uses another dll, and there is no tutorial on the internet.

13
General / Finished engine code. Compile it as static library or dynamic?
« on: December 04, 2016, 09:13:55 pm »
I finally finished my game engine and I don't know should I compile it as static or dynamic library? While searching for an answer, I found that dll is better if you just use OpenGL without SFML.  ::)

14
Graphics / White flicker at the window opening.
« on: November 20, 2016, 02:47:07 am »
At the window opening, little white screen appears for a 0.1 seconds. That's not a big problem, but it irritates me. Is it because of debuging? Or maybe it's because startDraw and startRun functions start at the same time (code below).

                sf::Thread run_thread(&Engine::startRun, this);

                createWindow(window_build);

                run_thread.launch();

                startDraw();

15
Is it possible to create class which inheritance sf::Drawable and which sf::Drawable can be overwritten by an sfml Drawable class for example sf::CircleShape?

If so, would it look like this?
sf::RectangleShape s;

sf::Drawable* f = &s;

Object* d = &f; //My class which inhertiance sf::Drawable

Pages: [1] 2 3 4