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

Pages: 1 ... 4 5 [6] 7 8 9
General discussions / SFML 2.0
« on: August 15, 2009, 11:53:37 am »
yes of course i could do that and indeed i do that manually at the moment, but that's not really the point of asking for the feature.

i would not ask a manufacturer to build me a car because i don't know how to do it. i could build me a car, but it's complicated and time consuming. also building my own car without standardized equipment will make it hard for me to customize it later :) okay enough of the analogy here. you get what i mean.

General discussions / Is good enough?
« on: August 15, 2009, 11:49:45 am »
well, to answer the topics question: your question is invalid. sfml is not a game engine and therefore there is no answer to "is sfml good enough for starcraft". it's like asking "is opengl good enough for a game like starcraft?" or "is iron a good engine for a car?". iron won't help you in your car. you first need to make an engine out of that iron (or whatever car engines consist of).

in the same way you first need to built a game engine around sfml. sfml only provides you with rendering, input, audio, networking and the basic OS-stuff (creating a window for example). therefore, sfml is not an engine (and it's not supposed to be). the stuff sfml does maybe accounts for a half percent of what you need for a game.

your question should be something like: "is sfml good enough to built an engine around it which would be good enough to programm something like starcraft?". then your answer is definately yes.

General discussions / SFML 2.0
« on: August 14, 2009, 10:22:38 pm »
Quote from: "Laurent"
For doing what? Do you have a useful example?

example: i want to do a 2d sidescroller that isn't based on tiles, because tiles limit your accuracy of movement (cause tiles are quad blocks). you can't really do realistic slopes, you always have to simulate them. stuff like loopings that aren't hardcoded like the ones you see in the sonic games would also be very hard to do. having actual slopes (meaning lines that are somehow rotated) makes calculations a lot easier.

now let's say you have a rock that has 7 corners. at the moment in sfml you can't really do stuff like that, cause you'd have to write an extremely slow and complex algorithm that creates sprites for you which replace a natural texture. you'd have to draw a lot of sprites to fill in the little gaps that come because sprites are quads, or alternatively you'd have to draw a seperate texture resembling a 7-corner-rock and manually attack it to your ingame rock.

all of that stuff is really complicated. it would be easier to just have the possibilty to take a texture and "lay it upon" a certain shape.

General discussions / SFML 2.0
« on: August 13, 2009, 09:31:26 pm »
applying textures to shapes would be awesome.

General discussions / Is good enough?
« on: August 07, 2009, 06:45:41 pm »
Quote from: "Core Xii"
Quote from: "heishe"
99% of the """"""""real""""""" developers just license engines because the developement of an own engine is more expensive. on the market at the moment there are the ID engines (tech 5 now), of course the unreal engine and the source engine, thats it. blizzard is one of the few companies who constantly develop new engines for their games.

These big names are exactly the "real" developers I'm talking about.

Ahh right. And I guess, for you, the only "real" astronauts are the ones who went to the moon, right?

Valve did indeed write the engine primarily for themselves, Epic Games however, specifically designed and developed the UE3 for others. My facts for that u ask? When the UE3 appeared in the public, Epic Games made huge advertisement for it, not to mention that there's a MASSIVE toolchain around the UE3. They did it because the Unreal Engine 2 was used by many many games, and they knew (and know) that they can make a lot of money with their engine.

They didn't develop the engine for UT3 and then added a couple of features so that they could license it to others... they developed the engine for the sole purpose of licencing it to others. using it for their own games was just a bonus. Epic Games major income comes from their engines.

Say, I assume you're not working in the gaming industry right? Have you ever seen the work of one of your "average commercial game developers" (i mean the code)? Have you ever seen the code of some of your "real" developers?  I assure you, pretty much every single one of those "average commercial game devlopers" could produce the same things that EG, Valve and ID produces. The only reason they don't is MONEY. Nothing else.

Also, who the hell needs vector drawing for games? SFML isn't even supposed to be a "engine". It's a fucking library for the very basic stuff. Has anyone of you ever written a game engine? Please stop talking if you actually haven't ever done anything like it.

General discussions / Is good enough?
« on: August 07, 2009, 01:02:22 am »
99% of the """"""""real""""""" developers just license engines because the developement of an own engine is more expensive. on the market at the moment there are the ID engines (tech 5 now), of course the unreal engine and the source engine, thats it. blizzard is one of the few companies who constantly develop new engines for their games.

and the guys who do write their own engines just do it because engines like Ogre3D lack a loooooot of features they need. it's not because ogre3d is too slow, or not well enough designed, it's just that it misses a lot of stuff (by the way studied the source engine source code when it leaked a few years ago and hell that thing was a fucking mess).

in the realm of 2D games however, SFML is perfectly fine and probably the best thing you can use at the moment. the few "real" developers that you name so often (kyle gabler, petri purho) use SDL because they've written their engines years ago when SFML wasn't even around and they still use their old engines, thats why they don't need to switch to sfml. some even use totally different things (take derek yu for example, he built spelunky using some game creator)

in the realm of 2d games, there's very few things that you'd actually have to implement anyways, since 2d is not as complicated. 99% of 2d-game engines consists of actual game-stuff instead of graphics stuff.

so to simply answer the op's question: yes sfml is perfectly fine for 2d graphics. if you're talking about whole game engines sfml isn't one anyways.

Window / [COMPLICATED:] Dynamic Input Manager
« on: June 28, 2009, 12:32:16 am »

I'm writing a class that enables me to let the user decide what buttons he wants to press to access a certain function (basically something that enables the user to configure his keymapping for my games himself).

For obvious reasons, I need to save the configuration to and read it from a file (in my case i'm using xml files + tinyxml).

anyways, the keymapping in my class is saved like this:

Code: [Select]

std::vector<std::pair<std::string,sf::Key::Code>> m_actionlist;

a vector that is full of all the "action" configurations that are read from the config file. for example: one element of that vector could have the name "move player up" as the first member of that pair and sf::Key::Up as the second member (or whatever i write in that config file).

the problem now is, that there is no such thing as pure "numbers" in c++; when I read the corresponding for some action from the config file (for example, sf::Key::Up is something like 297 i think), I can  only read ints or doubles from the file.

now, I don't know how to dynamically assign these "numbers" to my vectors pair second member. something like this will obviously not compile

Code: [Select]

m_actionlist[current_iteration].second = myxmlfile.GetValue("Up")

because the returned value will be double, or int if I static_cast<int> it and the compiler can't convert int or double to sf::Key::Code.

Now, what am I supposed to do now, to avoid having to do something like this for any Code that is in sf::Key::Code and sf::Joy

Code: [Select]

if(myxmlfile.GetValue() == 297)
     m_actionlist[whatever].second = sf::Key::Up
else if(myxmlfile.GetValue() == 298)
     m_actionlist[whatever].second = sf::Key::Right
//And so on

I'm kinda lost here.

By the way to make it easier for anyone that seriously wants to help me (laurent maybe?) i'm posting the current state of the class on pastebin.net: [i'm adding descriptions of my XMLFile and XMLElement classes to the bottom of the paste, to make it easier for you]


i'd really appreciate your help.


edit: A typical config file would look like this:
Code: [Select]

<action ID=297>Up</action>

This will assign the sf::Key::Up key to the name "Up".

General discussions / SFML 2.0
« on: June 27, 2009, 06:11:06 pm »
is it intentional that a sprite moves its position when you change its center?

General / [SOLVED] Clicking On Items
« on: June 27, 2009, 06:08:23 pm »
if you build a gui around it, it will be nothing more than cycling through every sprite, only that it looks more pretty. so no, there's no other way.

General discussions / Vector2f vs FloatRect
« on: June 27, 2009, 06:06:54 pm »
vector2f + rectf; you can write these names in a continous flow as you type in the characters on your keyboard. if you do something like vector2F, it puts a shift in the name which makes it kinda more uncomfortable to write.

Graphics / sf::Sprite::SetSubRect has no effect
« on: June 24, 2009, 07:23:07 am »
nevermind, coding at 4.50 am when your brain is not working properly probably isn't  that much of a good idea.

Graphics / sf::Sprite::SetSubRect has no effect
« on: June 23, 2009, 02:21:01 am »
following code still displays the whole sprite:

Code: [Select]



Graphics / window::SetBackgroundColor -> where is it?
« on: June 23, 2009, 01:13:12 am »
in 1.3 its in, why is it gone, how can i change the "flushing" color of the window now?

General / SFML Input not working when PS3 controller plugged in.
« on: June 23, 2009, 01:06:35 am »
I didn't put this in the "sfml input" section, as it didn't seem to be a problem with sfml, but a problem with the ps3 controller.

When trying out the gamepad support of SFML today, I noticed something very weird.

As soon as I connected the PS3 Controller to my PC (using a standard USB to mini USB adapter, so no blue tooth), the sfml input system seemed to stop working.

I'm polling GetEvent() of the sf::Window i'm using within the "game-loop" of my gamestate management class:

the relevant code looks like this:

Code: [Select]

void Game::Run()
sf::Event e;


so it seems that the ps3 controller seems to be sending random events to windows, which results in my game loop getting "stuck" in the polling, as Application::inst().GetWindow()->GetEvent(e) constantly returns true.

furthermore, those random events from the ps3 seem to be blocking my standard keyboard input, as the application will no longer react to inputs from my keyboard while the ps3 controller is plugged in (this only counts for sfml-using applications, in other games its no problem using both at the same time).

does anyone know where the problem is here?

General discussions / SFML 2.0
« on: June 22, 2009, 08:48:52 pm »
i haven't tried it yet, but does sfml or windows in general support playing with 2 gamepads of the same type at the same type?

for example: can i plug in 2 playstation 3 controllers and get different input from each controller?

edit: does sfml support gamepads in general?

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