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.


Topics - David

Pages: [1]
1
General / Collision Optimization
« on: June 16, 2011, 02:16:04 pm »
Hey!

I was playing around with collisions the other day (finally figured it out coming from a scripting background) and noticed that other engines such as Box2D and Chipmunk also support collision

My game is going to be tile-based (bounding box), and I need to know which collision is better: Checking the coordinates or using an engine's collision tests?

2
Graphics / [SOLVED] Small Collision problem
« on: June 10, 2011, 03:04:29 am »
I tried to make a collision between two rectangles for a platformer and tried to create gravity

But whenever he lands on the ground, the person starts to vibrate rapidly

Minimum Code:

Code: [Select]
     

        gravity += 2;

        Main.Move(0, gravity*App.GetFrameTime());


 while (Collision::BoundingBoxTest(Main, Ground) == true){
        Main.Move(0, -2);
        gravity = 0;

         if (App.GetInput().IsKeyDown(sf::Key::Up)){
        gravity = -400;
        }
       }


Also, is there a much simpler way to jump without using insane numbers?



EDIT: I just fixed it

3
General / Help with collision!
« on: May 30, 2011, 09:27:37 pm »
I got the linkage to work, but got a little problem with the collision itself.

Code: [Select]
       if (Collision::BoundingBoxTest(const sf::Shape& Main, const sf::Shape& Ground)){
            gravity *= -1;
        }


Gave me:

Code: [Select]
"error: expected primary-expression before 'const'"

I'm not that good at using references, seeing that there's one there.

4
Graphics / This?
« on: May 26, 2011, 03:34:30 am »
I'm really dumb when it comes to SFML :x

In a function, when you're trying to make a sprite change it's image, do you do "this.SetImage(Blah)"? It doesn't work, and I'm pretty sure there's something similar to that. :?

Also, how do you animate a sprite? I looked at the tutorial on the wiki but I wasn't able to understand it :evil:

5
Graphics / Random white border around image
« on: May 26, 2011, 02:54:33 am »
Hey SFML

When I upload and test an image (PNG) that has transparency, there seems to be a white border around the person.

What is going on?

6
Graphics / Textfield?
« on: May 24, 2011, 02:30:04 am »
Hey

I can't find any tutorials on how to make textfields (textboxes, input field, etc.) and want to know how to make one with SFML. I'm fine with CP but the interface is just ugly and wouldn't last long :shock:

EDIT: I looked it up in the forums and found TextEntered. Just what the heck is that?

7
General discussions / Where to begin...
« on: May 24, 2011, 01:10:00 am »
Hi SFML community! :D

I'm trying to make an RPG (more like raising a pet) using SFML (it's gonna be 2D)

With that in mind, where should be the best place to start? :shock:

Btw it's going to be like the chao garden in SA2B, if anyone has ever played that  :wink:

8
Graphics / Need clarification...
« on: May 23, 2011, 02:37:55 am »
I'm still confused about the sprite class (I'm use to actionscript)

How do you change from one picture to another, like in a walk cycle?

9
Graphics / Health bar?
« on: May 22, 2011, 11:41:45 pm »
How would you display a simple health bar in SFML?

10
Window / That annoying little window
« on: April 27, 2011, 11:55:37 pm »
I just started using SFML a few days ago :shock:

Whenever I run the code in Code::Blocks, the little CP-like window (I forgot what it's called) pops up along with the window that displays the images :evil:

How do you get rid of this window by code :?:

11
Graphics / Sprite Help
« on: April 27, 2011, 03:48:43 pm »
I just started SFML a few days ago, and I need an explaination on the sprites tutorial :?

Is it saying that you take small sections of a sprite sheet and displaying them accordingly or is it saying that you have to upload all of the images and then displaying them :?:

Can someone also help explain the Event function? I'm kinda confused

I'm using Code::Blocks if that helps, which I doubt :wink:

Pages: [1]
anything