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

Pages: 1 ... 5 6 [7] 8 9 ... 25
91
General / Re: Creating a wrapping game world
« on: December 30, 2014, 03:30:29 am »
I was tinkering with a 4 view trick for this a while back but I think I got hung on the part of making the 4 views look and act like one big view when near the edge of the map.  Checking for collisions also got me as well on it since the map was truly endless in that game.


The trick is to use 4 or so views at worst when in the corners but the issue is what do you display from where?  It easier to use exploiter's solution of copying the image of the object into view.

92
lol make sure whoever you get knows how to use your choice of source control as well since that will help in getting things done without too many issues. :)

93
General / Re: Is it fine to have sf::Font and sf::Text as global
« on: December 28, 2014, 06:47:14 pm »
The only globals I'd ever use anyways are ReadOnly/constants, Kinda forgot to finish that line. :(  Basically the only good globals are either none or readonly ones that aren't objects or messing with objects.


94
General / Re: Is it fine to have sf::Font and sf::Text as global
« on: December 28, 2014, 06:15:14 pm »
From what my teacher said the only globals that are safe are primitives like, int, double, bool, string, etc.  Like others have said here when it comes to objects the order they are destructed in as globals is undefined and can cause crashes because of it.

So:

namespace menu
{
    void loadFiles();
    void menu(sf::RenderWindow &window);
    void main(sf::RenderWindow &window);
    void options();

}
 

Should/Could be:
class menu
{
public:
    void loadFiles();
    void menu(sf::RenderWindow &window);
    void main(sf::RenderWindow &window);
    void options();

}
 


95
Yep I've learned the hard way always put {} curly braces around things like if statements and other things that can go without them because it makes them easier to read and also it prevents bugs with them as well.

96
General / Re: Why RenderStates is passed by value in draw function?
« on: December 27, 2014, 12:53:37 am »
I can believe that the cost of passing render states by value is trivial and so there's no point worrying about it.

I am reluctant to believe the compiler can optimize away the copy in a pass by value in this case. Draw is a virtual function and it may not be known until run-time whether the states parameter is modified or not by the resolved function.

It comes down to the IDE you are using and the other parts like the compiler.  If I remember right both Code::Blocks and Visual Studio do a lot of the optimization that we'd have to have done manually years back.  It most likely can optimize things you wouldn't think of.

97
Feature requests / Re: sf::Texture::Texture(std::string file)
« on: December 24, 2014, 07:34:56 pm »
Maybe we'll do it when SFML uses exceptions. I don't know yet.

hmm maybe you should put exceptions where they need to be like the loading and saving stuff to start with? :)  ???

98
General / Re: CodeBlocks and SFML2.2 issue
« on: December 23, 2014, 09:17:17 pm »
Just copy these libs from your MinGW bin folder.  ;)
It'd be saner to just link to them. :)

99
General / Re: Angle between two vectors
« on: December 20, 2014, 11:57:14 pm »
It's a basic math equation so if you've kept your math notes over the years or hunted around online it should be easy enough to find but here's two places that have the equation for it.

https://www.khanacademy.org/math/linear-algebra/vectors_and_spaces/dot_cross_products/v/defining-the-angle-between-vectors
http://www.euclideanspace.com/maths/algebra/vectors/angleBetween/


and the search: https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=math%20angle%20between%20two%20lines%20or%20vectors

Hope it helps.  Now if you're trying to convert it from the math that gets the end result to the math that is each frame than it is going to take a few more steps but from the sounds of it you only wanted the equation itself and yes this is as minimal as it gets unless someone can find a smaller version. :)

100
SFML projects / Re: Witch Blast (dungeon crawl shooter)
« on: December 20, 2014, 11:34:58 pm »
Steam is nice and all but I wouldn't touch it without a virtual machine to imprison it within due to the bad rap they've been getting lately.  You've also assumed he can pay the $100 account fee as well.  :o  I know a number of people that use steam here but most find it easier to use the forum here rather than pay someone else to host the game.  Also means it is easier to get to people who don't want to even touch steam as well. :)

101
General discussions / Re: SFML 2.2 Released!
« on: December 20, 2014, 03:40:10 pm »
Quote
What's the general process to update this?
One must track all the public API changes since version 2.1, and adapt them to CSFML, then recompile CSFML and update SFML.Net. Note that most of the changes have already been done.

Oh dear. Nothing likely needing the change notes from heck to keep up with being likely to forget what was changed and when.

Side Note:
If only there was a way to make it so the C++ version only needed one copy of itself for visual studio like the .net version so it could be used on any of them without having to recompile it for each version.  :-\

102
General / Re: How do you compile SFML 2.2 to Android?
« on: December 20, 2014, 05:13:43 am »
I'm wondering would we be able to use the Genymotion emulator to run an android sfml project rather than that thing that is built into eclipse?

103
DotNet / Re: Exception Handling
« on: December 20, 2014, 01:59:51 am »
I think it handles most under the hood but can't quite remember what ones we have to catch ourselves.  If all else fails you could wrap an SFML program in a try/catch and just go to town on it causing any exception you can think of to happen.  This way you can figure out what and where of things like this rather fast.  It would help though if the github actually showed this or the documentation comments showed this, that way we'd know what to catch.

104
General / Re: What's wrong with this? (white sprites)
« on: December 20, 2014, 12:06:04 am »
I think it's very odd that I find this code hard to read on this forum as opposed to pasting the code inside code tags, especially considering that my code looks the same as this normally. I'm guessing that it's the colour contrast.

lol don't worry about it too much since I use the same theme in visual studio he does from the looks of the code block picture.  Mainly have that dark theme because I'm working on code in a bright room or a very dark room and the bright theme is painful on the eyes.

105
...a transparent color?

Because I'm messing with an idea of sticking an SFML window on a form and having the form itself have a full background image covering it but still having it visible through the SFML window itself too.  Or do I just make the SFML window fill the form and stick the smaller form controls on top of it for this effect?

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