Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 13 Sep 2012
Offline Last Active Today, 12:47 AM

#5139039 Linear Character Development or leave it to the gamer?

Posted by TheChubu on 14 March 2014 - 12:40 PM

I'd say it like this:


There is "free character development" and there is "do what you want to do".


Games like The Witcher encourage you to take your own path... As long its something the character in question would do. This allows for very fine grained differences in choices, and real paths from action to consequence.


You can't be a mage, nor a politician, nor a simple human. You're a witcher, more specifically, you're Geralt. You can do what Geralt can do, you can react how Geralt would react, and the world knows it, the world knows you're a witcher, the worlds knows you're not a politician, nor a mage, it certainly knows you're not a normal human, and treats you like what you are, Geralt, a mutant, a Witcher, in the middle of the human lands.


Elder Scrolls games (at least the latest 2) take a different path. You can do whatever you want, anytime. This often ends in varied actions (I can be a mage! Or a warrior! Or a warrior-mage! Or a stealthy illusionist specialized in single handed weapons and alchemy! and so on), but a path much less clear on the consequences side.


I've found that such liberty makes very hard for the world to react to the player. In TES the world doesn't cares about what you do, it doesn't matters where you come from, what have you done, who you are, what you're best at, what are you worst at, every single quest is made so anyone in any situation at any time can approach it, because the game makes it so anyone actually can be in any situation at any time, there are no restrictions.


Its really interesting since in Skyrim, you're in the middle of a war, waged for very controversial "black or white" things like religion, race, and nations. So you'd expect that if you are say, a Khajiit (cat human thing) or a High-Elf, your experience would be much different from say, starting as a Nord, or an Imperial. But it isn't, there is no difference beyond a few cues here and there. Maybe the occasional nord vendor will say "Oh, you're an elf", will they stop selling to you? Will they attack you? Will you get in prison? Nope, not at all. The most you will get is a frown, or a single speech line. The world still functions the same for you, no matter what you chose to be.


The game is so broad that every aspect of it can be approached for equivalently broad angles. So all the possible ways for "character development" end up in making no difference at all.


I think there is a middle point in here, and I think it can be achieved through consequences and restrictions. You're a mage? Well, you don't get to enter the warrior's guild, and some people will downright hate you and will refuse to give you quests if they have ones.


At the same time you have to compensate for that. No warriors guild? Well, there is a mages guild! And they have mages only quests, with contents that could only be done by mage characters. "Go clear the dungeon" ? That's not a quest for a mage, everybody can do that. Go and study this magical device? Use it to unseal some ancient enchantment? Now that's some mage stuff!


In that way you end up with, lets say, "windows". You can see the whole world, its still open, but you choose which window to look through to inspect the world. As Todd Hodward said (but didn't follow through in my opinion with TES games), you can do anything, but you cannot do everything.


In that way, choice will matter, what you do will matter, and there will be more clear paths to show that to the player.

#5138589 Challenges Abstracting OpenGL

Posted by TheChubu on 12 March 2014 - 08:05 PM

I don't think abstracting the binding away is a good idea. 


The bind to edit OpenGL interface is just a plain reality, either you let the user do their own redundancy checks by exposing binding functions, or you abstract them away and face the consequences (and use DSA when possible).


My approach won't scale well probably when I start to expose more functionality but for now I do a little of both:


All OpenGL objects that can be bound implement the "IBindable" interface, which is public. And if something looks like a bind interface, it also implements it (ie, shader program object bind() method actually calls glUseProgram).


At the same time I provide both "safe" and "unsafe" operations, that means for example, having a GLBuffer object with an "upload(data)" method that does the binding/unbinding on its own, and an "uploadUnsafe(data)" method that just makes the glBufferData call and nothing else.


I decide what to call according to what I'm doing with the object at the time.


Each object holds its buffer Id and its binding target, so you can call "bind()" methods on them without any additional parameter.


I do the state tracking outside the GL objects, with a "StateTracker" class. If you want to check for redundant bindings, you bind objects through the state tracker (ie, stateTracker.bind(glObject) ) and it will figure out if its need to be bound or not, if you don't want any tracking you use the GL objects directly.


In this way there are no direct OpenGL anywhere except in the GLObject (and subclasses) implementations.


For me it works, and it accomplishes a simple objective, making the OpenGL calls easier to use rather than abstract them all away. And its not fool proof at all, you're using a low level API here. Even if its wrapped up in a nicer package, you kinda have to assume that the user knows what he is doing, otherwise you'd better off exposing a higher level abstraction that doesn't knows about OpenGL/D3D at all.

#5138493 35Gb for audio, are you kidding me?

Posted by TheChubu on 12 March 2014 - 01:23 PM

Wait... Streaming 35Gb of audio from a regular HDD is supposed to be faster than decompressing it on the fly on the CPU!?


It's like I'm not living in the same world as those guys.

#5138142 Are some people not cut out for programming?

Posted by TheChubu on 11 March 2014 - 11:18 AM

You're mistaken. As soon as you try bigger applications you realize that, in software development, there are things that just can't be done by a single person. No matter how good you are.


Its just the reality of it. Could John Carmack code all of IdTech 5 himself? Could Tim Sweeney code all of UnrealEngine 4 himself? I doubt it.


I do recommend one thing, do the things you like, for the rest, there is always a library made by someone who liked to do that particular thing.

#5138123 Are some people not cut out for programming?

Posted by TheChubu on 11 March 2014 - 09:35 AM

It's also a good idea to NOT compare the code you've worked on for a few days/weeks as your first attempt at a solution, with code worked on by dozens of experts for many man-years, not counting the hours they spend on similar problems, and writing scientific papers about it.

This. Seriously this.


You're comparing yourself, to one of the oldest and most prominent codebases in Unix world that compiles most of the software out there. Their parser must have been tweaked by hundreds of different coders.


Hell, if your code remotely resembled that, you'd probably be a friggin programmer genius.

#5138096 Linear Character Development or leave it to the gamer?

Posted by TheChubu on 11 March 2014 - 07:46 AM

Leave it to the gamer to linearly develop their character.

#5137997 Copy protection system

Posted by TheChubu on 10 March 2014 - 07:00 PM

You must have one heck of a good lib dude, like, so good, you'd break the law for it, treat your customer like a potential criminal, and try to get away with it without being noticed. Best lib ever.

#5137767 GLSL Devil Visual C++ Question...

Posted by TheChubu on 10 March 2014 - 04:51 AM

Umm, GLSL shaders arent binary files, they're just plain text files.


#version 330 core
in vec3 inPosition;
in vec3 inColor;
uniform mat4 mvp;
out vec3 outColor;
main (void)
    gl_Position = mvp * vec4(inPosition,1.0f);
    outColor = inColor;
Thats a GLSL vertex shader. No binaries, no funky sutff, just plain text.


And that looks like a standalone tool, not a VS plugin. Load shader files, display them, do stuff with it, save them. That's it.


Though it does looks like you can debug appliactions with it, for that you'd need your exe and point GLSL Devil to it so it can launch it. Much like CodeXL.

#5137350 common default control mappings for fps/rpg's

Posted by TheChubu on 08 March 2014 - 11:14 AM

Nathan... are you for real?


Like.... you exist? How do you even function? I... I don't understand.

#5137148 Copy protection system

Posted by TheChubu on 07 March 2014 - 10:56 AM

I was thinking... If you want to go the non-intrusive way and more or less communicate to the user that you're a human too (ie, not a big corporate monster) you could try to set up a system that can detect if the copy is pirated or not, after that just nag the user:


"We worked hard to bring you this game. W would really like to keep working on new games for all of you, so we insist, please buy the game! It helps us to keep the ship from sinking, and it helps you to get more awesome games made by us!"


Or something along those lines, kinda passive-agressive but "humane" enough that the user will feel it biggrin.png


The thing still lets the user play it, like a full game. If its just a message like that (say, in the background of the main menu or something) I doubt any hacker would "waste" their time into removing it and releasing a cracked version that the only noteworthy feature it would have is the lack of the message.


There is no big copy protection, no impenetrable wall to break down, without any challenge. Just a message. That'd steer off the big amount of hackers who are in for that kind of thrill of hacking the new thing.


EDIT: The point is, empathy is a powerful thing. The thing that allows anyone (without a mental disorder that is) to "steal" any software is the lack of connection to it. Pirates are totally detached from what they're really doing. Try to reach them not as filthy pirates, not as potential consumers, but just as plain people. That's what gets people going, that's what gets some gamers to say "I'll buy this to support the industry!", I've seen those kind of comments and I believe its a natural reaction to gaining a bit of empathy.


Also, peer pressure is also a powerful thing. Get enough people into the "I will support this!" bandwagon and soon many more will follow.

#5136999 Switch or Not?

Posted by TheChubu on 06 March 2014 - 04:59 PM

I thought this thread was a very lengthy discussion about the 'switch' statement.


I am disappointed.

#5136995 data compression

Posted by TheChubu on 06 March 2014 - 04:50 PM


"information can be destroyed simply by leaving it out"


you can't prove that


#5136992 A good plan for learning OpenGL

Posted by TheChubu on 06 March 2014 - 04:44 PM

Sorry, of course I messed up - meant "library" where "engine" stood. Edited just now.


Thank you for your post. I guess I wouldn't mind the API changing since the prof clearly stated he isn't interested in the version we're using as long as it solves the problems he'll throw at us and the projects we'll make to pass the course. Having said that, do you think it'd be more rewarding to go with the newer versions?

Ohh, I misread, I thought it was "freedom as long as you used OGL 2.1 and FreeGLUT" :D


More rewarding? Well yes. 2.x is old, very old. Newer API calls are different, newer GLSL is different, etc.


You'll understand quite a bit more of how graphics work going the OpenGL 3+ core profile route. Drawing your first perspective projected triangle will be pretty hard, but think that drawing 500 thousand more after that first one will be much easier.


To be fair, your professor might teach a more modern "style" of OpenGL 2.1, with shaders and such, so the differences won't be that great, but he might teach the "fixed function pipeline", and in that case the differences will be pretty big.


If you want to get started, I suggest http://www.arcsynthesis.org/gltut/


I suggest OpenGL 3 because from what I've seen, OpenGL 4 features get more specific use case oriented, so you will hit walls for things that you might not even know how to do.

#5136972 A good plan for learning OpenGL

Posted by TheChubu on 06 March 2014 - 03:46 PM

The issue here is that while I could recommend you OpenGL 3+, it won't help you with the course since the API changed quite a bit from OpenGL 2 to OpenGL 3 (and above).


FreeGLUT isn't an engine, far from it. Its just a library to set up some things, create the window, swap buffers, I think it has some geometry utility functions too, but that's it. No "engine" there.

#5136764 The inevitable God object

Posted by TheChubu on 06 March 2014 - 05:44 AM

Ohh but I like when a semi-god class appears (you don't have to allow it to become a god class).


That's the moment when I sit to really think what is happening, how the interactions work, what is done, what it needs to be done.


"Does this class really needs to track this thing? Can't I make a Tracker object that does it?"

"Does this class really needs to do this? Can't that responsibility fall into a new class?

"Does all these classes really need these distinct methods? Can't that behavior be dealt with a single generic class for all of them?

"Does this method really needs to have this object as parameter if its only using a little portion of it?"


When refactoring those kind of cases, you start to ask the right questions all over it, question everything! Give it some time to think through it. At least to me its fun to come up with solutions for those type of issues.