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

Pages: 1 ... 605 606 [607] 608 609 ... 720
9091
Graphics / Re: Twitching graphics with tile based maps
« on: December 03, 2012, 02:28:39 pm »
What the hell is FFT? >_< I'm not using anything called FFT :E
Well I guess your run into some faulty YouTube filter, that thought your content is connected to FFT, whatever that is...
Go to the video manager and file a complaint. ;)

9092
Graphics / Re: Twitching graphics with tile based maps
« on: December 03, 2012, 02:18:43 pm »
Really sounds like tearing. Vsync should fix this, just make sure that you don't force it to off by your driver (i.e. you can set it in SFML but it has no effect since the driver forces it to off).

As for the video, I get:
Quote
This video contains content of FFT. The partner blocked the video because of copyright reasons.

9093
Window / Re: Mouse Button retrive information
« on: December 03, 2012, 01:15:59 pm »
i want to find out if any Mousebutton is Down. Is there a more elegant way of doing it than this?
If you want to use sf::Mouse there isn't really an alternative, but you could check for the sf::Event::MouseButtonEvent.

while(window.pollEvent(event)
{
    if(event.type == sf::Event::MouseButtonEvent)
        // A mouse button has been pressed - Do whatever you like.
}

9094
Audio / Re: Keeping a single song playing throughout different states
« on: December 03, 2012, 01:53:43 am »
An easy solution would be to play the song in the application/GameEngine class. ;)

As for the error, who does have the ownership over the sf::Music resource?
Maybe providing code could help to understand the problem. ;)

9095
General / Re: Help getting started on a specific type of menuscreen
« on: December 02, 2012, 11:38:08 pm »
will this be too hard?
To get exactly what you want, yes of course it's hard! Do you think game companies write games just for fun in a few hours? ;)
Most of the rain effects you see in games are also just tricks that look cool but aren't realistic at all.
So I'd suggest you take down your high goals a bit and start small and learn more about the complexity of programming and specially graphics.

For the menu; since the code was written by Ve (aka as SuperV1234), maybe you can ask him, if he wants to share some code.
You could also use some images and make a simply frame animation. Other than that, it probably will get quite tricky and if you can't think of a way on your own, you're probably not up for such tasks yet. ;)

If you want fancy graphics you should probably look into some other applications that let you do things easily.

9096
SFML projects / Re: [Development] UnknownName
« on: December 02, 2012, 05:48:58 pm »
From my experience, a physics engine will make it far more complicated than it has to be. You won't have to implement your own collision detection, but at the same time you'll have to play around a lot more to get your "physics" to feel right, e.g. platform games usually feature rather odd physics, like Mario (the video game one :P) being able to jump several meters high, being able to turn almost instantly and being able to control his jump.
It really depends on what you want to achieve, there just isn't 'the solution' to everything. ;)

For a simply platformer a simplified physic will do and as Mario said allow you to adjust the parameters as you want and think 'feels' right.
For a game where the main purpose is to move objects around that will have different shapes and should behave very close to actual physics you will make your life way more easier by using an external library. The convex collision detection alone will be a pain to get right and have a good performance.

It's nice to do things on your own and learn something, but if you don't have infinite time at your hands and don't want to read a few books to really understand how such algorithm work and how the physics is done right, then you could take a library, read the API doc and start using it. ;)

9097
Quote from: NightCabbage
Ah, I see - most of the .net stuff is just a wrapper for the normal dll files. So if I want to modify it (to add pre-multiplied alpha) I still need to compile the c++ version?
(or actually the c version? they seem to reference "csfml-window", etc.)
Yes, iirc SFML.NET uses CSFML (like most of the other bindings). ;)

9098
Hmmmm, this might be a dumb question... but where can I find the source code fot the .Net version of the SFML 2.0 Release Candidate?

(so I can modify it to add pre-multiplied alpha)
It's on GitHub next to the C++ and CSFML repositories.

Also will the full version 2 release be within the next few months? :D
Everyone hopes so, but I doubt it. The offical statement is, as always: 'soon'. ;)

9099
SFML projects / AW: Re: Pioneers
« on: December 02, 2012, 07:28:17 am »
I'm curious on how big this project is :P
Big in which terms?
It's a one man project (afaik) but it has a very good chance of getting commercial. ;)

9100
DotNet / AW: Re: Quick Question - Text.GetRect
« on: December 02, 2012, 07:24:31 am »
what is the difference between getGlobalBound and getLocalBound?
GlobalBounds will return the axis aligned bounding box, that is it has all the scaling and rotating taken into account, where as LocalBounds simply retirn the original width and height.

9101
General / Re: Pressing Enter causes two screen switches instead of 1!
« on: December 02, 2012, 01:37:32 am »
The thing i was worried about is, if there is no event happening, what exactly happens? like say theres no event happening, what does event contain? i couldnt find this in the documentation for events. if the event stack is empty then what happens when u try to access an sf::Event member?
sf::Event is just a data class, it holds some structs but they never get initialized with any 'default' values, thus if you just instantiate a sf::Event object and try to access a variable you'll get anything that could get casted to that type.
That's why I've been telling you now already a few times, that it's a bad idea to separate the event processing from the event 'capturing'. ;)

9102
General discussions / Re: Unofficial Nightly Builds
« on: December 02, 2012, 01:30:58 am »
Yet I have a question: only the 32x builds works, while I have a 64x. How come?
What should this mean exactly?

If you want to use x64 builds then you need to load the x64 builds. Additionally you have to switch the compiler in Visual Studio. Though as far as I know VS Express doesn't have a x64 compiler, so simply stick with the Win32 one. ;)

9103
I guess I'll have to make a normal declaration of my graphics manager and just pass it by reference to everything.. which looks ugly  >:(
Or refractor your code and use a better design, so not everything needs a reference to your graphics manager. ;)

9104
Whats the best way of making the 'order' work ?
Don't use global variables (i.e. singletons are also global variables)! ;)
That's really the best way!

For the rest I don't know and I don't really want to know. ;D

9105
General / Re: Pressing Enter causes two screen switches instead of 1!
« on: December 01, 2012, 09:40:38 pm »
The fade in and out only works if i put the line with /****/ in. if i take that line out it doesnt work. basically if i take that line out, i have to continuously press the return key (which switches screens) in order to fade in and out. if i put the line in, then i can press the return key once and it will fade out, switch screens, and fade the new screen in. I have read the events tutorial. From what i deduced, if no event is happening it wont even go inside the while(pollEvent()) and it will just keep looping the while(isOpen()) loop. And my update() function is called inside the while(pollEvent()). So i made a call to update outside (the /****/ line). is this a good way to do things?
As I already said if you do it with your strange event/input handling then you have to make sure that the event is filled with the correct values otherwise the behavior is undefined...

i looked at your SmallGameEngine and it seems your using a stack to push and pop states. it seems kind of advanced and i dont quite understand how you fade in your IntroState. You reduce the alpha value everytime it loops irrespective of keypresses. Its really clean code but i havent really used stacks.
Well as I said, the framerate is limited to 60fps thus I can rely on the fact the update function is getting called 60 times every second and thus reducing the alpha value by 1 every iteration will need ~4.25 seconds to go from 255 to 0. I'm drawing a rectangle over the whole screen and simply reduce it's alpha channel until it's fully transparent.
But you're right I don't do anything with keys, it just happens when you start that state until it reaches 0. ;)

How exactly do you use stacks in a game?
It's simply the FILO principle (First In Last Out) and you've got the two operations push() to put a new object onto the stack and pop to remove the top object.

Doesnt while(pollEvent()) push and pop events for you?
Yes it pushes the new events into the queue and pops one event every call and puts it into the referenced event object.

And does C++ only support .hpp headers? i used .h headers for my headers.
C++ (the standard) doesn't really say anything about this, but it's the compilers that define what works and what not and to my knowledge all C++ compiler support the .hpp extention and I advise everyone to use it, when they write C++ code, so you'd already see in what language a library or similar is written in: .c/.h = C; .cpp/.hpp = C++

is there any easy way to center the text in the center of the window? right now im doing this.
You should really read the documentation...
sf::Text text("Hello", font, 20);
text.setOrigin(text.getGlobalBounds().width/2.f, text.getGlobalBounds().height()/2.f);
text.setPosition(static_cast<sf::Vector2f>(window.getSize()/2.f));

btw how do you change a thread to [SOLVED]?
By editing your first post and changing the title there. ;)

FYI: You really shouldn't be using global variables, that is your singletons are global variables too! ;)

Pages: 1 ... 605 606 [607] 608 609 ... 720