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

Pages: [1] 2 3 ... 18
Graphics / Re: [Solved] Fade effect
« on: August 18, 2015, 04:20:33 am »
Hi, I solved a similar issue and wrote a simple code example 5 years ago, maybe it might help:


General / Connecting scrolling map and collisions
« on: July 02, 2010, 10:05:03 pm »
Yeah it's going to be like a week or two at least until I have time for that.

General / System Requirements of a Finished Game
« on: July 02, 2010, 09:56:06 pm »
Well there is minimum size of a compiled application and a lot of it depends on which dlls you are using, but other than that it depends on the target hardware and what your application does.

DotNet / Running on Mac OSX - unable to load library
« on: June 28, 2010, 03:30:37 pm »
That's really cool that you are emulating Mac OS. Hopefully if it can be emulated better maybe Laurent might be able to work on compatibility some.

Would be great to hear about your experiences with SFML vs XNA.

General / Connecting scrolling map and collisions
« on: June 28, 2010, 03:03:04 pm »
Well, I scaled the sprite before in my original demo and it works perfect. I haven't had any of the problems you are having with the collision in the demo I made.

It's hard to know what's going on without the full code.

Maybe you are not updating with every frame of your animation?

Graphics / What are some techniques to deal with screen resolutions?
« on: June 27, 2010, 07:29:40 am »
There is the fog of war where things fade out over distance, but most games depend on resolution/view space whether 2D or 3D.

You want to scale images and use larger graphics if you can just so they aren't blurry/depixelated on an HD screen and support modern view ratios as best as you can.  If you screen is ridiculously wide like dual-screen you can put GUI elements or stat data on the sides, but you should avoid this as much as you can.

There are lots of other monitor tricks/hacks like turning up the brightness/using basic or custom graphics to make all things simple and visible--seeing through walls, etc.

You really can't have 'fair' matches unless it's in person and even then people still try to use hacks.

General / Connecting scrolling map and collisions
« on: June 27, 2010, 07:01:28 am »
I think the problem is you are either setting the center before scaling the sprite or not setting it at all.

For managing lots of collision you want to put moving objects in an array/vector and cull the ones that cannot reach your player or are offscreen.

For a static map you can create a grid or a smaller image with a mask color where every pixel represents 50x50 pixels. Then you move a scaled representation of the character over it and detect if the character is touching the masked color.

Another way you can do it is by drawing polygons over your map so you can do angles or slopes.

Wow, 20,000 lines and it's not done?

80,000 words is your average novel.

I wonder how many lines all of SFML is without comments.

Graphics / [Solved]100% pixel perfect sf::View size?
« on: June 25, 2010, 12:14:45 pm »
Nevermind, it works perfect.

I was using the magic wand to test from screenshots and I forgot to turn anti-alias off even though the dotted selection looked right.

That's strange. I think photoshop CS 5 maybe does that differently. I don't remember it antialiasing solid colors when tolerance was 1 in previous versions.

Actually looking at it again this appears to be a bug in CS 5. When you paste the selection it has no anti-aliasing but it adds extra space to it. Wow, Adobe is really slipping--this might screw up a lot of people's older scripts.

Graphics / [Solved]100% pixel perfect sf::View size?
« on: June 25, 2010, 11:26:12 am »
I'm trying to get all of the sprites to be at their 100% default size but there seems to be ratio/size problems.

Code: [Select]

    sf::Vector2f Center(1000,1000);
    sf::Vector2f HalfSize(App.GetWidth()*.5f,App.GetHeight()*.5f); //516/387
    sf::View View(Center,HalfSize);

I'm guessing there is a 100% default setting?

I saw GetDefaultView() but it doesn't seem to do it

I also tried this and it doesn't work either:
Code: [Select]

    sf::View View(sf::FloatRect(0.f,0.f,App.GetWidth(),App.GetHeight()));

Graphics / [Solved]100% pixel perfect sf::View size?
« on: June 25, 2010, 11:09:21 am »
I tried this but it doesn't work: sf::Vector2f HalfSize(App.GetWidth()*.5f,App.GetHeight()*.5f);

General / extlibs...
« on: June 25, 2010, 08:25:41 am »
Quote from: "Laurent"
Currently there is only ogg and wav support

Although these are the most common ones, a lot of other formats are supported, so it's probably better if you say "Currently there is no support for MP3" ;)

Good point.

Here is the list of formats in the faq--I don't know if there are any more:

ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64

General / Connecting scrolling map and collisions
« on: June 25, 2010, 08:10:00 am »
Here I coded a working collision demo for you:

Code: [Select]

#include <SFML/Graphics.hpp>
#include "collision.h"
#include <iostream>
#include <string>

int main()
    sf::RenderWindow App(sf::VideoMode(1024,768),"Collision Demo");

sf::Image IMGBackground,IMGPlayer,IMGobstacle;

sf::Sprite Player(IMGPlayer);
sf::Sprite Background(IMGBackground);
sf::Sprite Obstacle(IMGobstacle);



    sf::Vector2f Center(1000,1000);
    sf::Vector2f HalfSize(App.GetWidth()*.5f,App.GetHeight()*.5f);
    sf::View View(Center,HalfSize);

sf::Event evt;

    std::string lastKey="";
    float timer;


if(App.GetInput().IsKeyDown(sf::Key::Down)){if(Collision::BoundingBoxTest(Player,Obstacle)==false){Player.Move(0,100*timer);lastKey="D";}else if(lastKey=="D"){Player.Move(0,-100*timer);}else{Player.Move(0,100*timer);}}
if(App.GetInput().IsKeyDown(sf::Key::Up)){if(Collision::BoundingBoxTest(Player,Obstacle)==false){Player.Move(0,-100*timer);lastKey="U";}else if(lastKey=="U"){Player.Move(0,100*timer);}else{Player.Move(0,-100*timer);}}
if(App.GetInput().IsKeyDown(sf::Key::Right)){if(Collision::BoundingBoxTest(Player,Obstacle)==false){Player.Move(100*timer,0);lastKey="R";}else if(lastKey=="R"){Player.Move(-100*timer,0);}else{Player.Move(100*timer,0);}}
if(App.GetInput().IsKeyDown(sf::Key::Left)){if(Collision::BoundingBoxTest(Player,Obstacle)==false){Player.Move(-100*timer,0);lastKey="L";}else if(lastKey=="L"){Player.Move(100*timer,0);}else{Player.Move(-100*timer,0);}}



return 0;

General / extlibs...
« on: June 25, 2010, 04:34:28 am »
Currently there is only ogg and wav support

MP3 is a requested feature that will probably be implemented with a sound plug-in system in the future.

Graphics / Help with scrolling background
« on: June 25, 2010, 04:07:21 am »
Quote from: "nisse pisse"
Yes it was that "set smooth" was set to true... one might wonder why that is the defualt setup when it works so bad O_o

It's a bug that's been fixed with SFML 2.

Smooth is the default because smooth image filtering is considered standard in most modern apps--ie non 8-bit games.

Pages: [1] 2 3 ... 18