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

Pages: 1 ... 6 7 [8] 9
106
General discussions / Re: time to finally move to opengl 3.3
« on: February 26, 2016, 05:58:00 pm »
do tablets, laptops and mobile phones count as "modern GPUs" ?

107
General / Re: Main function parameter not working ?
« on: February 24, 2016, 05:58:09 am »

I don't see how that even compiles 

this line
int main(GameMode GAMEMODE = Menu) {

seems like it should not work at all

main is supposed to look like this
https://wwwx.cs.unc.edu/~sparkst/howto/cpp_main.php

or this for more details (read the one with 97 answers and marked with a Green check mark)
http://stackoverflow.com/questions/4207134/what-is-the-proper-declaration-of-main

the purpose of main is to supply an argument (some information) to your program

so if your  program is named my_first_game.exe

and your game had a little Italian running around and you wanted to give him a custom name when the program starts you could type

my_first_game.exe Mario
and his name would be Mario
or
my_first_game.exe George
and his name would be George

you could even do
my_first_game.exe Mario 10
and his name would be Mario
and he would have 10 health

but you're supposed to pass strings (or things that can be converted to strings)
I guess an enum can be converted to a string 

but main is supposed to receive an array of strings
not an enum


108
does
C:\Users\merijin\Documents\sfml\include

contain a folder named
SFML

and does that folder contain a file named Graphics.hpp

and can you make a screenshot of your error message

and can you post a screenshot of your
C:\Users\merijin\Documents\sfml\include\SFML

and can you post the screenshots on http://imgur.com/


some of your screenshots are a little blurry
I've tried opening them in a new window and zooming in, but that only made it worse.

109
Why should it be a bug? Here is the reference for that function.

I'm not sure what getenv guarantees...

yeah, the amount of memory returned by getenv is what I wondered about

specifically I was wondering about this (from the link you provided)
The behavior is undefined if the destination array is not large enough for the contents of both src and dest and the terminating null character.

110
Using POSIX and Windows API a filesystem abstraction is not that hard, a simple one could look like this:

Base class (.cpp)
Base class (.h)
Windows implementation
Unix implementation

I am nowhere near the level of C++ of anyone else on this forum,
there are tons of stuff I don't know

so I have a question about this code

in this file
http://git.os-sc.org/TILES.git/tree/include/filesystem_windows.h

in the function
inline const char* platform_getHome()

there is this line
strcat(home, path)

is that a bug ?
is this even possible ?

111
found this earlier today

http://www.amazon.com/Procedural-Content-Generation-Game-Development/dp/1785886711/ 

https://www.packtpub.com/game-development/procedural-content-generation-c-game-development

published January 30, 2016

it's not really a book on how to use SFML
the author just uses SFML for window, sprite management and music

he does create a game (see the cover of the book) but I haven't tried it out yet 

I have a subscription to Packt Publishing so I'm reading the book now
Just started it and I'm liking it

from the projects I've seen posted in this forum I can tell that the SFML stuff is too basic for 90% of the people on this forum
but they might find the other stuff useful
(he has a nice chapter on A*)


112
SFML projects / Re: Temporarily Named MMORPG: The Adventure Game
« on: January 10, 2016, 12:36:33 pm »
no video ?

even a 30 second clip ?

113
General discussions / Re: Fundraiser for a Mac mini
« on: October 05, 2015, 10:00:56 pm »
might also be using it to test for SFML + iPhone support

114
General / Re: Does anyone know what's the problem here?
« on: September 01, 2015, 05:44:32 am »
if you didn't build it as statically linked then you will have put all the SFML dlls into your debug folder

or copy them into system32 or somewhere the program can find them


115
General / Re: Error when I try to execute my game
« on: August 27, 2015, 11:43:06 am »
this is how I got sfml and codeblocks on windows running

downloaded codeblocks
codeblocks-13.12mingw-setup.exe
from
http://www.codeblocks.org/downloads/binaries 

downloaded SFML
GCC 4.7.1 TDM (SJLJ) - 32-bit
from
http://www.sfml-dev.org/download/sfml/2.3.1/

(the file is named
SFML-2.3.1-windows-gcc-4.7.1-tdm-32-bit.zip)

extract
SFML-2.3.1
from
the zip file

build a blank console project in codeblocks
and put this in your .cpp file
#include <SFML/Graphics.hpp>

then go to the codeblocks menu and select
Project / Build options ...

then choose the project name (not debug or release)

choose the tab named
Search Diriectories

then the tab named
Compiler
and set it to the location of the SFML include (mine looks like this)
D:\Programs\code_blocks_dev_lib\SFML\SFML-2.3.1\include

http://i.imgur.com/BagigTP.png

now click the tab named
Linker
and set it to the location of the SFML lib (mine looks like this)
D:\Programs\code_blocks_dev_lib\SFML\SFML-2.3.1\lib

http://i.imgur.com/8d5yQwz.png

now select the Debug version
and the tab named
Linker Settings
and add
sfml-graphics-d
sfml-window-d
sfml-system-d

http://i.imgur.com/ZhDfDcO.png

this is not staticly linked
so you will have to copy the dlls from
D:\Programs\code_blocks_dev_lib\SFML\SFML-2.3.1\bin

into your debug folder

installing sfml and getting it running was very easy

and actually, once you extract SFML-2.3.1
you can just go to codeblocks and select an sfml project template
and when it asks for the location of sfml just give it
D:\Programs\code_blocks_dev_lib\SFML\SFML-2.3.1\

then select version 2 of sfml and it sets everything up for you

very nice


116
General / Re: How to compile and run a game made with SFML?
« on: August 26, 2015, 06:25:22 pm »
my opinion, don't use static linking -- it just makes things easier not to

from
http://www.sfml-dev.org/tutorials/2.3/start-cb.php
"Static SFML libraries have the "-s" suffix: "sfml-xxx-s-d" for Debug, and "sfml-xxx-s" for Release."

so instead of
libsfml-system-s-d.a
use
libsfml-system-d.a
this will mean copying the dlls into your system32 folder or into the same folder as your .exe, but that's fine

117
General / Re: Error when I try to execute my game
« on: August 26, 2015, 06:17:54 pm »
what compiler did you use
what libraries are you using

I think I got something like when I first tried to use Thor
I think I downloaded the precompiled binaries, but it didn't work with the standard codeblocks+mingw

so I ended up having to download cmake and learn how to use it and compile it myself

118
Feature requests / Re: A couple suggestions
« on: August 24, 2015, 07:18:33 pm »

..................

can't take a joke or understand sarcasm

119
Feature requests / Re: A couple suggestions
« on: August 24, 2015, 08:09:35 am »

If your rendering code looks something like this:

void render(sf::RenderWindow& window)
{
    if (window.hasFocus())
    {
         [i]...[/i]
    }
}
 

Then you're probably doing something wrong.

ok, noob to SFML here (been doing sfml for about 4 weeks)

why is that code wrong  ?

according to this
http://www.sfml-dev.org/tutorials/2.3/window-inputs.php

sf::Keyboard::isKeyPressed(...)
"This function directly reads the keyboard state, ignoring the focus state of your window. This means that isKeyPressed may return true even if your window is inactive."

so from that documentation that's exactly what I've been doing in my code (checking if window has focus)


120
Feature requests / Re: Windows OS ::getDesktopMode() fix
« on: August 18, 2015, 04:57:28 pm »
...
While the window borders shrunk to 1 pixel thickness in Windows 10, Microsoft kept the old "thick borders"  behind the scenes for easier resizing.

Here you can see it in action:



As you can see, from the top, the cursor changes as the cursor touches the actual window.

But from the left, the cursor changes quite a bit earlier. This invisible part of the border is what causes that "gap" when displaying the windowed full screen with borders.
...

just thought that was very interesting 


...Also it clearly doesn't change with themes because I have a theme installed and it doesn't change.

but just because it doesn't change with the theme you're using does that guarantee that it won't be affected by ANY theme ?

and I think his point still stands

what if MS decides to change border width on the next windows 10 update ?
or what if it makes the border visible ?


Pages: 1 ... 6 7 [8] 9