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

Pages: 1 2 3 [4] 5 6 ... 9
46
General / Re: Should I start off this complex?
« on: October 19, 2015, 09:25:37 am »
While I agree, I must say beginners do that because it is easier to learn and get used to ECS on something simple like pong clone instead of starting something more complex later without such experience.

It seems more suitable to learn about ECS's with something a bit more complex, such as a Mario clone. With a pong game it'd take up most of the code thus obscuring why they're useful (in complex projects).

That and when you're trying to learn the basics of game programming, learning to use an ECS is something you do later on with other more complex things like 3D graphics (at least in my opinion). The ECS pattern's popularity is something that is only relatively recent in the history of game development, so there's a myriad of successful games out there that don't make use of it, which goes to show that it's not totally necessary.

47
General / Re: Should I start off this complex?
« on: October 19, 2015, 08:41:30 am »
But if you're more or less new to game development, forget about ECS for the moment. It's a hyped keyword, and many people praise it as the ultimate, one-fits-all solution, even though it brings its own range of problems and complexity. I suggest you go without ECS for a while, because only then you experience some of the problems that led to the creation of ECS yourself.

Completely agree. The ECS brings in enough problems that I'm completely opposed to it's usage in these small projects (such as pong or asteroids clones), yet beginners still seem to try to find ways to do it. Plus, there's overhead to all that dynamic memory allocation, dynamic_cast/typeid's, cache misses, etc. An ECS is mostly there for decoupling large, complex subsystems from one another as well as make it easier to change the behavior or add certain entities without having to re-structure an entire class hierarchy.

48
General / Re: glDrawArrays crash
« on: October 14, 2015, 12:08:10 pm »
What was the exception being thrown?

I have tried to glDisableClientState but it doesn't help

What version of OpenGL are you trying to target? That function only works with legacy OpenGL (as in functions like glVertexAttribPointer cannot work with glEnableClientState as they're part of two entirely different ways of drawing).

By the way, there's a forum on the official OpenGL website for beginners: https://www.opengl.org/discussion_boards/forumdisplay.php/6-OpenGL-coding-beginners

49
Feature requests / Re: File drop
« on: October 13, 2015, 01:35:45 am »
- Has to be implemented
- Has to be maintained
True for any other feature

Of course. But the SFML team consists of only a handful of people who spend their spare time maintaining the library, and they probably are mostly hobbyists (correct me if I'm wrong).

It's not as simple as just coming up with an idea. Some of these features may take days to implement and get running properly. And it'll have to be maintained for the lifetime of the library.

So it's important to consider whether or not the feature is really worth putting off bug fixes and useful features for.

- Moves away from the library being about mostly about game development
While true for the library usage, the purpose is not limited to game development and I personally have three SFML projects unrelated to games.

The library can very well be used for non-game applications, and there's no problems with that. However, most of the applications made with SFML are games.

- Introduces a feature that only works on certain platforms (doesn't work on mobile)
Not unheard of, since touch support is currently only available on mobile.

http://www.newegg.com/Touch-Screen-Monitors/SubCategory/ID-514

Input devices shouldn't count.
Controllers could be considered a "console-only" feature, but I use one for certain PC games sometimes.

I was more talking about OS-specific features. A mobile game shouldn't ask you to change your config file, and a desktop game shouldn't ask if you want to be taken to the app store (well, the latter used to be true). Same goes for drag & drop.

50
General / Re: Opengl tutorial?
« on: October 11, 2015, 03:27:07 am »
I found http://www.opengl-tutorial.org/ to be the most helpful. It uses GLFW and not SFML, but it shouldn't be that hard to follow along.

51
General / Re: How to use new C++11 unique and shared pointers?
« on: October 11, 2015, 03:20:26 am »
Smart pointers are used to manage the lifetime of an object allocated on the heap, not necessarily as a wrapper for all pointers.

unique_ptr is to prevent having to call delete on the pointer, but instead have it done automatically once you leave the scope, thus preventing accidental memory leaks and making the code much cleaner.

shared_ptr is used for having delete called on the pointer as soon as you drop all "references" (shared_ptr's) to the object, much like how objects behave in languages such as Java or C# (just be careful when extracting the raw pointer from a shared_ptr, as they do count as a "reference", that and cyclic references may be a source of memory leaks).

I didn't read the code, but it sounds like unique_ptr is what you probably need. Remember that shared_ptr has a small, but existent runtime overhead.

Relevant stuff I found by using google:
https://msdn.microsoft.com/en-us/library/hh279674.aspx
http://www.umich.edu/~eecs381/handouts/C++11_smart_ptrs.pdf
http://www.informit.com/articles/article.aspx?p=2085179
https://meetingcpp.com/index.php/br/items/an-overview-on-smart-pointers.html

Please use a C++ forum next time.

52
Feature requests / Re: File drop
« on: October 11, 2015, 02:56:52 am »
Pros:
- Great for resource importation (such as custom music or custom file format importer/exporter)
- Opens up new uses for SFML

Cons:
- Has to be implemented
- Has to be maintained
- Moves away from the library being about mostly about game development
- Introduces a feature that only works on certain platforms (doesn't work on mobile)

It'd be a cool feature, but there's understandable reasons why it probably wont be implemented.

53
Feature requests / Re: File drop
« on: October 10, 2015, 02:20:45 am »
Well, I can imagine some use cases for this feature, for example image gallery or video/music player, or level editor.

While those are all valid uses for drag-and-drop, I'm not quite convinced the first two are the kind of applications one would make using SFML. Or why anybody would want to make them at all for that matter. Still support the feature, though, because the third one you stated is relevant and actually sounds pretty helpful.

54
Feature requests / Re: File drop
« on: October 09, 2015, 11:06:09 pm »
I don't see how this would benefit many people. I suppose possibly custom music selection? In game resource editing? But then again, that's pretty rare, and a file selection dialog could easily work just as well.

Having a mechanism to interact with outside media makes sense for Simple and Fast Multimedia Library. End user convenience is in the aforementioned part.

I don't see how drag-and-dropping has to do with multimedia. It's just a faster alternative to dialog boxes.

Anyway, aside from my terribly ignorant implementation idea

Why'd you suggest it then? :) /s

55
General / Re: SFML 2.0 and Box2d PRoblem
« on: September 25, 2015, 01:11:44 am »
Please just stick to English. It's difficult to read a thread when half of it is in Spanish.

I don't think floats have enough precision to store these values  ;D

Probably not a bad idea, though. The extra numbers are just trimmed off so it can fit, and if you ever want a double-precision version of the literal, you can just remove the f-prefix and the additional digits are there.

56
General / Re: Access Violation (idg10iumd64.dll)
« on: September 22, 2015, 04:40:06 pm »
Have you tried reinstalling your drivers?

57
General / Re: Access Violation (idg10iumd64.dll)
« on: September 22, 2015, 05:29:33 am »
From what I can gather, this error might be somehow related to my graphics card (Intel(R) HD Graphics 4000).

Probably is. Try updating your drivers.

This appears to be the driver you'd need (and I'm assuming you use 64 bit Windows), but I can't guarantee anything:
https://downloadcenter.intel.com/download/25308/Intel-Iris-Iris-Pro-and-HD-Graphics-Driver-for-4th-Gen-Windows-10-64bit

58
SFML development / Re: API deprecation model
« on: September 18, 2015, 03:00:18 pm »
I think the first is best. A simple compiler warning is enough.

With sf::Event::MouseWheelMoved, SFML starts to mark parts of its API as deprecated.

From the documentation:
This event is deprecated and potentially inaccurate. Use MouseWheelScrollEvent instead.

Did you guys by any chance also write the Java standard library?  ;D

http://docs.oracle.com/javase/1.5.0/docs/api/java/awt/FontMetrics.html#getMaxDecent%28%29

59
General / Re: What is better for pure GUI game project?
« on: September 18, 2015, 11:18:57 am »
I wouldn't use Qt for making a game.

For GUI, while I haven't tried it, SFGUI looks promising: http://sfgui.sfml-dev.de/

I personally wouldn't recommend using any sort of GUI library outside of menus and the like, because they don't really "fit" with how games typically work. And I assume you'd want to possibly add some fancier (relative to a text-based game, that is) stuff like showing sprites representing the characters during a battle, something that may be tedious to do with a GUI library instead of simply drawing it to the screen normally.

60
General discussions / Re: Why do the libraries end in "-2"?
« on: September 16, 2015, 04:18:00 pm »
That doesn't make any sense. Why would you want to know the major version of a given DLL? It's not like it's any more helpful in deciding which DLL is the correct one.

Pages: 1 2 3 [4] 5 6 ... 9
anything