Jump to content

  • Log In with Google      Sign In   
  • Create Account

orizvi

Member Since 05 Feb 2011
Offline Last Active Apr 11 2013 08:12 PM
-----

#5042498 Paying to enter a shop?

Posted by orizvi on 12 March 2013 - 05:01 PM

A tax to get into the City where the best and wealthiest merchants are as opposed to the Towns where its free to enter but the selection is smaller and worse.




#5042496 political correctness and captured prisoners in rpg

Posted by orizvi on 12 March 2013 - 04:56 PM

I think in regards to the sexual assault/sex or whatever else... There should simply be a list of actions which can include a generic "Have sex". Whether the other character consents to the act is a different matter. If for example that option is used on a regular tribes woman - she might decline, and the player can try again after buying presents or doing something else to increase the "Persuasion". The same mechanic could apply to anything really - Take item, Follow me, Do a barrel roll etc. Its all dependant on how much your character is capable of persuading the NPC. 

 

If you implemented actions which can affect the "Persuasion" value such as: Beat up, Threaten, Compliment, Restrain.. You could indirectly allow for actions like rape, theft etc. A character refuses to give up their prized knife? Beat them repeatedly to drive up the Persuasion value until they give it up.

 

In the case of prisoners/slaves - their Persuasion is probably so high from being attacked/captured that when you order them to do something - they won't object... And if they do - that can be corrected through a very general set of actions which don't touch on ethically sensitive issues as much.

 

Also opens up the possibility of treating your prisoners nicely so they don't run away? 




#5042450 Confused on Big Oh

Posted by orizvi on 12 March 2013 - 03:22 PM

Edit: Ahh. Posts happened while I was typing that also explain it quite well... But I hope my post can offer some additional clarification if needed

 

Easiest way to understand Big O notation in my opinion is as follows:

 

Big O notation is defining the upper bounds of the growth of a function.(Note: this isn't the actual definition but it suffices to explain the first few steps. I'll expand onto the actual definition below).

 

So to find the Big O of a function f(x) = 2x^3 - x + 5

 

We begin by first considering the "upper bounds" part of the definition. Essentially if we plotted this function on a graph - we want a similar function which will act as the upper bounds so we're just looking at functions which are greater than or equal to our original function. Or in other words we're looking for f(x) <= g(x) where g(x) is the function that acts as our upper bound. The rest is essentially simplification.

 

I generally begin by turning all the negative/subtraction signs into positive/addition as follows:

 

2x^3 - x + 5 <= 2x^3 + x + 5

 

The next step is to consider how this function will grow for some large value of x. Immediately we can see that x^3 will dominate the growth of our function, the x + 5 portion will become insignificant over time so we'll progress further with our simplification:

 

2x^3 - x + 5 <= 2x^3 + x + 5 <= 2x^3 + x^3 + 5x^3

 

All we did was just add a x^3 to every statement. Its seems pretty arbitrary but it follows the requirements of the definition above. If we had an x^5, then we'd have used x^5 instead or really whatever part of the function would dominate its growth.

 

Now finally - we can simplify using basic addition

 

2x^3 - x + 5 <= 2x^3 + x + 5 <= 2x^3 + x^3 + 5x^3 <= 8x^3

 

Finally, we can drop even the 8 and simply right that our function is O(x^3). And this is generally sufficient for a quick analysis - your math teachers generally want the rest as well.

 

As you can probably tell - x^3 does not actually define the upper bounds to our function (because we dropped the 8) but it does provide enough information for a quick comparison of the algorithm so it worked for our partial solution. This is where we consider the actual definition - I could use all the fancy math symbols but they're a pain to write and not that easy to understand anyways so I'll explain in english.

 

Essentially we have two functions, f(x), and g(x) both from positive numbers to positive numbers. We can get the big O of f(x) which is written as: f(x) is O(g(x)) if there are two constants C and k such that:

 

f(x) <= C*g(x) whenever x > k

 

We actually already derived part of this with our previous work since we had f(x) <= 8x^3. C = 8 in this case.

 

The second part is essentially referring to the statement I made earlier "some large value of x" just before I did the second simplification. We need to define what this "some large value of x" is and we can often just get away with a bit of trial and error.

 

If k = 1, then x can be any value greater than 1. So we can begin by considering the case of x = 2.

2x^3 - x + 5 <= 8x^3

2(2)^3 - 2 + 5 <= 8(2)^3

16 - 2 + 5 <= 64

37 <= 64

 

In this case it worked on the first try. As an example of alternate values of C and k, try C = 2, and k = 5. Often times you have to play around with the value of k to make it work. In fact - often times you have to play around with both C and k to make f(x) <= O(g(x)) work. I know my teacher often gave us problems where he provided g(x), but asked us to find values for C and k. 

 

The following is generally what my professors accepted as sufficient for a proof:

2x^3 - x + 5 <= 2x^3 + x + 5 <= 2x^3 + x^3 + 5x^3 <= 8x^3

O(x^3) where C = 8, and k = 1.

Your profs may want more or less and they might try to trip you up with things like fractions.

 

PS - in case you're wondering about the value of the C and k values and why we don't just immediately look at the function and say "Great. It's O(x^3), now lets get on with our lives". Its because k is essentially your input size. It allows you to make comparisons of two functions f(x) and z(x) which detail the search performance of a theoretical data structure: f(x) is O(n), but k is 1 million, versus z(x) is O(n^2) but k is 1. We will have less than 100 values stored in this data structure. If we considered only the big O part - f(x) is the clear winner - but in practice z(x) would be the better choice for our application.




#4958538 lately my creative juices have died! ;((( need some help!

Posted by orizvi on 12 July 2012 - 02:27 PM

I like to take a long bus ride across the city. Its a couple hours without any of the regular distractions and it allows my mind to really wander. By the time I get back home I'm itching to get to work.


#4948954 [C#] Game Saving Problems, Files are too large

Posted by orizvi on 13 June 2012 - 04:29 PM

If your areas are randomly generated... Depending on how you generate them - couldn't you just store the initial seed and any persistent changes as a result of game play?


#4948888 Cannot start batch process with C#

Posted by orizvi on 13 June 2012 - 01:21 PM

Have you tried running your application as administrator?


#4947408 I need some goals for this summer

Posted by orizvi on 08 June 2012 - 10:27 AM

I can't say I've ever found any good articles or books that spend any significant amount of time covering code organization (in games anyways).

What I'd suggest is try looking at some large open source projects and see how they've structured their code. While the code itself might not make much sense, the overall structure is usually quite easy to understand. I think one of the Quake engines were open sourced? Ogre would be another good one.


#4947170 I need some goals for this summer

Posted by orizvi on 07 June 2012 - 02:02 PM

I'm going to answer your questions in reverse order...

4)

I'm only 16. Is it unreasonable for me to start a huge project at this time, or should I just spend the rest of my teen years learning? It seems like everyone does their dream project in college, not high school.

I think the biggest problem that people encounter when they take on large projects beyond their experience/ability is you'll make some bad design decisions at some point, and you won't have the experience to spot them early on. Then sometime after that you'll start running into road blocks where your code is just getting messier and messier and you're having to code all sorts of work around's, abusing goto statements or whatever "cheats" your language of choice provides. At that point object oriented design (or functional, or whatever other approach you were using) is just another obstacle now. Suddenly things will stop behaving or they work 99% of the time but everything breaks that 1% of the time and nothing seems to make sense and when you start digging into it... You end up realizing that you have to redo everything and then you get discouraged and your project dies without having achieved anything.

At least that's my personal experience :P

Note: Just to clarify - Nothing against goto's and other "cheats" just - they should never be used to dig yourself out of a hole.

3)

Is it bad to have a goal like this? It seems like everyone else fails when they try to make a complex dream project by themselves instead of making simpler games. Then again, most of these people have no idea how hard it is to coordinate a project like this-- I do.

Its always good to dream big as long as you keep the resource and time commitment requirement in mind. And don't forget - we're always biased one way or another towards our own abilities.


2)

Is it too soon to begin my "dream project" after having only 1 year of C++ practice and a half year of SFML/SDL practice? What is a reasonable goal to begin my project? (remember, GOAL not deadline)

I'd say its never too soon to begin your dream project as long as you accept that there will be a lot of detours along the way. No one ever enters any project with all the knowledge they'll need to finish it, they will always have to stop and learn something along the way. With your experience - you might have to make a lot of detours to learn various things.

1)

Should I immediately begin to learn networking ASAP? Or should I focus more on making more complex graphical single-player games first, even though that's not my goal.

I'd suggest that you should write down a basic design document for your dream project. Figure out the overall requirements don't worry about any specific details just yet. Then work on simple projects which share just one of those requirements. You can't avoid the experience requirement for big projects but working on silly little projects which you don't care about can be pretty discouraging - so try to focus your time on smaller projects which you can see clear benefits towards your dream project.


#4946515 Laptop game developers... minimum requirements?

Posted by orizvi on 05 June 2012 - 11:20 AM

Get something with an AMD APU. You won't approach the levels of performance that you might get with proper dedicated cards, but you'll have slightly above average performance, all the new DX11 features, and decent battery life. You'll be much better off than with the Intel Integrated graphics.


#4942987 Need some advice on Game Engines

Posted by orizvi on 24 May 2012 - 01:31 PM

Don't give up... But its important to have realistic expectations.

The language you use is going to be among the least important decisions you'll make in the process of making the game. Pick any major programming language and just start programming random projects. In a few years you should have a more realistic idea of what will and won't work and then you can proceed from there.


#4942983 C# under Windows XP... DX9, SlimDX, or SharpDX?

Posted by orizvi on 24 May 2012 - 01:15 PM

I would personally recommend SharpDX or SlimDX. They're extremely similar so which one in particular doesn't really matter.

SharpDX claims better performance than SlimDX - but its a tiny difference and both perform well enough to create just about anything.

SharpDX is mostly a computer generated wrapper for DX, and SlimDX is mostly hand coded. Functionally I'd say they're about 99% the same.


PARTNERS