Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411589 Posts in 69386 Topics- by 58443 Members - Latest Member: Mansreign

May 07, 2024, 12:32:52 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsThe Game Developer's Kitchen - The Real Texas - DONE!
Pages: 1 2 [3] 4
Print
Author Topic: The Game Developer's Kitchen - The Real Texas - DONE!  (Read 15959 times)
handCraftedRadio
The Ultimate Samurai
Level 10
*



View Profile WWW
« Reply #40 on: December 30, 2010, 11:55:07 AM »

Awesome man, its nice to see this game is about done! I did some testing before and I would be down to try it out again.  Wizard Hand Thumbs Up Right

I like to hear when long term projects get finished, it gives me hope that I may be able to finish mine some day.
Logged

PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #41 on: December 30, 2010, 01:12:06 PM »

@handCraftedRadio: Thank you! I have mixed feelings about long term projects, myself I try and mix them up with some smaller ones.

@shrapnel: Glad you like them! I put lots of effort into them and try to give away all my secrets... =)

@floatstarpx: Again, thanks! I'm doing my best with the game, it is pretty huge-- at least for an indie game I think...
Logged
PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #42 on: December 31, 2010, 02:11:24 PM »

2010 A YEAR IN REVIEW

READ IT HERE, IF YE DERE

Yes, I did one of these. But I'm not crossposting it here, because it is rather a lame excuse for a dev blog post. However it is obligatory.

The highlights are:

- I finished actually a LOT of games in 2010. I predict I will finish more in 2011.

- I got a new bike and went to Victoria/Seattle.

- The Real Texas is almost done, but you already know that!
Logged
PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #43 on: January 18, 2011, 05:34:36 PM »

The Human Touch



There is a common idea with artistic development that you will go through a period of experimentation and immitation, finally settling into a style of your own.

I'm not going to pretend that I have settled into my own "style" but certainly my technique has become fairly standard. It's just based on what appeals to me:

The Human Touch.

Awwww...



Tartan Blanket

Right now, I'm going through The Real Texas and basically leaving nothing unfixed or unimplemented. Some items or textures were drawn very hastily, or very early on in the project. I've developed since, and so I am reworking and redrawing things.

Luckily, when it comes to 3D models, I made everything a square, and so very little (if anything) needs to be re-modeled (there are a few trees and other objects that have been fleshed out, though.)

Just now I took this tartan texture, and redrew it. Some people might find it less refined, but that's OK! It's one of those times you have to just say as a designer, "I'm right about this one, sorry!"





In-Game Tartan Blanket

Here is what it looks like in-game.





Overall Progress and the IGF

Things are coming together really well. I won't waste time talking about it, this phase in game development is about millions of things like the above tartan texture redraw. I am pretty confident that Texas is going to amaze and amuse people.

I entered Texas into IGF and it wasn't selected. I won't lie, I was very disappointed even though all the nominated games were amazing. Truthfully the biggest benefit to being nominated would have been personal validation! Well, not even personal validation, but maybe something nice to tell family members who have supported me (and keep supporting me.) I am lucky to have people that support me! Not just people in my life, but also other game devs, and people who send me encouraging words online! Thank you!
Logged
Aquin
Level 10
*****


Aquin is over here.


View Profile WWW
« Reply #44 on: January 18, 2011, 06:35:28 PM »

Yeah I remember what little I got to play (like a year and a half ago) and I was pretty impressed by the art style; glad to see you're keeping on keeping on.  Gentleman
Logged

I'd write a devlog about my current game, but I'm too busy making it.
Inane
TIGSource Editor
Level 10
******


Arsenic for the Art Forum


View Profile WWW
« Reply #45 on: January 18, 2011, 10:29:43 PM »

I like all the sketches in this thread, and the various textures in game that remind me of bacon. So, go go go finish it!
Logged

real art looks like the mona lisa or a halo poster and is about being old or having your wife die and sometimes the level goes in reverse
PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #46 on: January 20, 2011, 07:30:36 AM »

@Aquin thank you! I'm always really happy when people say they like my art, because that is something I have been working hard to improve for some time now...

@inane I just finished my cereal so it's time to get down to businesss!!
Logged
PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #47 on: January 25, 2011, 08:59:26 PM »

Point Queries
Let's break it down mathematically for just a second here, ok?

For our purposes, a Discrete Point Set is a collection of objects which can be differentiated from each other somehow. We call each element in the set a Point.

Points themselves are unordered; the set may be infinite or it may be finite. An infinite DPS would be for instance the set of all 2-dimensional (x, y) coordinates within the unit circle on the real plane. A finite DPS could be the list of letters { A, B, C, D, E, F }.



DPS's in Your Game World
Often in the course of developing a game, you need to perform an action on or find something relating to an object or a group of objects. An explosion needs to know all the enemies in it's area-of-effect, or the player object needs to know if it's next to a treasure chest.

Because game objects are always discrete (i.e., they are a separatable thing) the game world can be thought of as a DPS. Note that this does not mean it only contains what you think of as your game objects; think for a second and you will realize there are lots of "non-object" things in your game world, too. If it's a 3D game, it contains for instance all faces on all 3D models, all velocity trajectories of all particles, and so forth.

Note also that when we say "Point" we don't mean just an N-dimensional point such as you may be used to thinking of; in fact we could even mean something that doesn't exist spatially at all, such as an AI routine or a store item price.



DPS Query
Let's grant that your game world is always an infinite DPS (we can argue this in the comments, if you like.) We will define a DPS Query as a function Q:

  • Q(x0, x1, x2...) : W -> R where R in FDPS, R = { P | P in W }

Where W is your game world (an infinite DPS), R is the result set, and FDPS is the set of all finite DPS's. So, a DPS Query takes as input some number of arguments and returns a finite set of things. The arguments could be a 3-dimensional point (X, Y, Z), along with a radius R, and the finite set of things could be all objects that are near enough to (X, Y, Z). You could name your query function something like:

set< object* > find_all_objects_near_to_point (double X, double Y, double Z, double R);

Now let's get rigorous: why W for the domain? Suppose some parameter xn being passed to Q were not part of your game world DPS. In this case, it's hard to imagine how this parameter would relate to anything in that same domain at all. To wit, if the point (X, Y, Z) does not exist in your game world, how are you finding things that are close to it? This is an interesting detail to ponder.



This is useful HOW?
Very likely, you already have a world class or module or something to that effect. I'm just encouraging you to think a bit mathematically when it comes to what kinds of functions you might put on it. In short, it gives you this rule:

  • Any public function of the World class that is a DPS Query is A-OK

For instance, you might well want a function like:

vector< object* > get_all_enemy_objects ();

In fact, this is a DPS Query. Once you see that fact, you realize that other query functions might be useful, such as:

vector< object* > get_all_enemy_objects_with_hp_less_than (double Value);

or:

vector< object* > get_all_enemy_objects_in_state (string State);

Now you know: these are all perfectly valid functions to have on your World class, because they are all DPS Queries.



Takin' it TOO FAR
You can extend the rule:

  • Functions on the World class that are NOT DPS's MIGHT BE BAD NEWS

Let's say you've got a function like:

void damage_all_enemies_in_radius (double X, double Y, double Z, double R, double DamageAmount, string DamageType);

That seems well and good. A Fireball spell might call it with damage type "fire" when it explodes. But by the above rule, we should perhaps rethink whether this belongs as a member function on World. True, it's handy. Also true: it's pretty specific!

In fact, we might give our head a check and think about whether it's really the World's business to hurt things in itself, or whether that action is better thought of as being done by the spell entity. Isn't the interaction between (burning hot plasmic air) and (orc flesh) better thought of as being direct, rather than being intermediated by the World class?



Advanced DPS Queries
We shouldn't stop with game objects. For instance, suppose that you've got an arrow that needs to fly through the air, and stick into the first wall it finds. If you've coded 3D before, you know that at some point you will probably be doing ray-triangle intersection.

We can imagine a DPS Query that does this, like:

vector< world_face* > get_ray_collision_faces (double X, double Y, double Z, double DX, double DY, double DZ);

The necessary intelligence to perform these collisions will live inside our World class. This is probably a good thing, and here's why:

We might find a world_face on terrain, buildings, or an object. World is going to be a collection of these things, understanding how they are laid out and interacting. The arrow we shoot need not be concerned that lava has now also been implemented, at least not directly. So the entity that needs to "know" about such things in terms of detecting arrow-collisions is also the entity that is responsible for managing these things in the first place, which is good design.



Final Notes: Finiteness, Ordering
A couple of things: remember that we are always returning a finite set of things, even though the game world is (uncountably) infinite. This limitation means we are going to package our query results into a vector<> or set<>, or we could create something special for iterating through as with a database engine. Not all DPS Queries would need to return their results packaged the same way, of course.

Now a note on ordering. We can of course order our results in any way we want, but sometimes we won't be able to, so it's important not to be part of the definition of DPS. An ordering is a linearizing operation, i.e., it takes things and puts them on a one dimensional line. Games are usually spatial and so many times, ordering does not really make sense. So some queries are going to have a natural ordering to their results, and some will not.
Logged
PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #48 on: February 08, 2011, 01:31:55 PM »

Star Wars and Restraint
Today I am working on the final denoument cutscenes in The Real Texas.

Coincidentally I have been watching the amazing fan-made documentaries on the original Star Wars trilogy (

,

and Returning to Jedi by Jambe Davdar.)

Star Wars Begins - Part 11



The Original Triogy, Ebert Was Right
Seeing how the Original Trilogy was put together in more detail has given me a lot more appreciation of film techniques. Last year Ebert said that games are not art, and the gist of his argument is that games cannot manipulate scenes as finely as films can.

Suicide-inducingly boring debate aside, the second part of this seems true to me. Each scene in A New Hope is absolutely filled with detail, carefully scripted. In film, the camera never wanders beyond very tightly proscribed bounds.



The Trash Compactor Scene

Consider the large metal bar in the trash compactor scene. Han picks this up and attempts to use it to brace the walls from closing in. It is very effective to see the bar bending: it shows us how powerful the compator really is, outlines their desperation, and creates a sense of panic as we can relate to it in a physical sense (we can imagine ourselves trying something similar, and understand how hard it might be to properly position it.)

In a game, the requirements for this simple prop are much deeper. If that bar braces the trash compactor, it should brace other things. We will need a physics engine that can somehow handle malleability and ductility. We have the ugly choice of letting the player carry it with them if they choose, and then making sure it can't break gameplay or cause strange glitches in other scenes, or of forcing them to leave it behind.

But it's actually worse than this: even if we implement such a prop, we can't force the player to use it, anyhow!





Restraint and Creativity

When I watch these documentaries, it creates in me a burning desire to imitate. This is by now a familiar feeling for me, maybe it is for you too. What I have come to believe is that this particular burning desire is the harbinger of creative suicide.

To create, we need to take ourselves out of this particular kind of inspiration to imitate, no matter how strong it is. In the case of making games, we need to take a deep breath when we watch great movies.

If we attempt for the same kind of tightly-controlled and yet varied effects that film makers have at their disposal, we will find ourselves creating a badly-scripted, weakly-interactive non-movie non-games.



Simplicity

Instead of trying to co-opt this power of tightly-framed scenes, let's examine our own constraints.

First, the player is not an actor. In fact, the player is the only element we explicitly do not direct. This is a difficult constraint to stick to when we are trying to imitate film effects. It's very tempting to have the player character stop and walk to a certain place, or perform a certain action at an opportune time, but we should stop and look for another solution.

Second, in place of varied effects put interesting rules. Rather than constructing elaborate scenes requiring a certain set of actions, build several flexible props and then experiment.

Recently I added a certain weapon to The Real Texas with a long reload. The player always has control over whether they want to reload, but they can't change that it takes a lot of time to get ready for another shot. It's a simple prop that in no way violates these rules, but it creates a lot of dramatic tension. Observing this, I put in another constraint (again, on the prop, not the player) which would highlight this tension (a minor spoiler, so I won't tell.)



Some Wind Waker Critique

I've also been playing through Wind Waker. I enjoy this game very much, but I have some funny criticisms. Basically, I think the game relies on too many different props that ultimately don't have very many uses. Most items can be used as a weapon in addition to one other effect. There is even significant overlap-- for instance the grappling hook ought to make the hookshot a nonentity.

I would have rather played a game with sword, shield, grappling hook, and maybe one other weapon, but which all interacted strongly with all props (e.g., grapple anything). Instead, it feels a bit scripted at times, because I know in many situations that I must use item X (say, the hookshot) because no other item will work.

Wind Waker - Grappling Hook
Wind Waker - Hook Shot
Damn what a great game. However... why do we need both Grappling Hook and Hookshot?



Finally, It's Easier

Last thought before I wrap this up. It's easier to design games this way, because they are more natural constraints for our medium. It's fundamentally easier to work with just a few props and make them play with each other in interesting ways, than to relentlessly draw lines arond what the player can and cannot do.

When I find it hard to adhere to this, I take a deep breath. It just isn't film.
Logged
Geti
Level 10
*****



View Profile WWW
« Reply #49 on: February 21, 2011, 08:04:24 PM »

That was an enlightening read, and has made me go back and take a look at some of my system design for my games again. It's frustrating how difficult it is to get a good, flexible, generic interaction engine that allows you to make objects interact correctly for any given purpose.
This has put me in a good headspace regardless.

Thanks Psysal. Coffee
Logged

Zaphos
Guest
« Reply #50 on: February 21, 2011, 09:13:54 PM »

Been sort of casually scratching my head at the earlier DPS post for a while, and it still seems odd to me so I may as well ask -- Why are you using the term "Discrete Point Set"?  Your example of the points in the unit circle on the 2D real plane is not a discrete set afaik.  The objects involved need not be (conceptually) points.  I think it would be simpler and just as clear to just say "set" ... no modifiers needed really.

The concept reminds me of organizing your world with a database, which I remember being discussed over at the mollyrocket forums a while back as an interesting alternative to more oop-ish data organization.  Seems like a nice approach ...
Logged
PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #51 on: February 26, 2011, 10:40:03 PM »

Heya guys, sorry for the late reply! I have been hammering away at things lately.

@Jimmy My only advice is that remember that no such perfect system exists! I try to limit a world or game design to a few clear principles and then work within them... I'm glad you found my post helpful just take it with a grain of salt. As for me, my projects are definitely messy...

@Geti: Excellent question! The queries themselves return sets that must contain discrete points. So I call them, "DPS Queries", as in "Queries that return DPS'", not "Queries on a DPS".

Here is really the important thing, for me: The game world as you imagine it is likely not finite or discrete. Our intuitive way of thinking about game world is as a very infinite, very complicated construct. But what the world class does for us is provide a simple view of that infinite thing.

It is sort of like building a game world as a database, except the idea is NOT to include every possible "point" that could be returned by the world class in the database.

To sum up:

- Consider your game world to be some huge, uncountable, perhaps ill-defined and very probably complex entity.

- The World class does NOT model this entity. The World class provides queries that return finite sets of discrete points within this entity.

For me this solves a lot of problems. Somehow, you are going to have to model in some finite way enough of your world so that you can return slices of it via DPS queries. But what you model is NOT the same thing as your game world, and so your queries shouldn't be limited to returning specific data in your model.

Maybe it's splitting hairs, I don't know but it helps me because I can think of the World class as a window into something larger that doesn't always have to be that well-defined. As opposed to having the World class be a data structure that is somehow a model of the game world, itself.

Okay now back to working on BOBSLEDDER SPANK ARENA. =)
Logged
supershigi
Level 7
**


No Yoshi is an Island


View Profile WWW
« Reply #52 on: March 30, 2011, 10:47:04 PM »

I missed a lot of these entries so I went back and read them tonight -- I really enjoyed the one about warp gates and The Eucharist. 

Quote from: Psysal
Psychologists will proscribe sometimes physical actions for you to take in helping to grow past some difficulty you are having. Maybe this sounds crazy to some people but it makes sense to me.
I think it makes sense.  This is gonna sound nutty, but I actually tried out hypnotherapy this year and they focus a lot on these kinds of phsyical actions... It's not as hokey as I thought it would be; you're basically awake the entire time and there's no spinning rainbow thing or coin on a string.  It felt a lot more like counseling to me than anything else... with a lot of connecting physical actions and materials to mental patterns.  For example, the hypnotherapist had me create an "anchor" for when I started feeling anxious, and she made that anchor my ring.  Everytime I felt anxious I was supposed to tough the ring and think calming thoughts and take deep breaths.  Over time, touching the ring has become mentally linked with lowering my heart and breath rate and it's actually become quite effective at lowering anxiety. 

And congratulations on finishing The Real Texas!  That is so fantastic ^_^  I left you a comment on your blog (at least I think it did... not sure if it actually submitted), but just in case, I'd love to help out with beta testing. 
« Last Edit: March 30, 2011, 10:56:49 PM by supershigi » Logged

Laura Shigihara | Composer and Game Designer
Facebook | Youtube | Twitter
dasdsad
Level 0
***


View Profile
« Reply #53 on: March 31, 2011, 03:42:50 AM »

!
This is quite a plethora of intriguing information.
Certainly lets me see some things from a different perspective.  Gomez
Logged
PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #54 on: March 31, 2011, 08:00:21 AM »

@shigi Thank you! I am still bug-fixing and beta-testing, but everything is "in" and I don't see myself adding much (if anything) else! I've got you on the list for testing, of course!!

@Sir I will keep them coming! I got flooded out of my apartment about 3 weeks ago (one day after I finished it) and was living out of a hotel. I was able to work significantly on the Mac port but not do much else. I'm going to do another blog post one of these days but I'm just busy tidying up so many funny side projects and other housekeeping things right now.

Take care guys, thanks for your support!
Logged
PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #55 on: April 16, 2011, 10:32:10 AM »

Circles are Confusion


Did you learn about domains in high school? A domain of a function is "what it is defined over"; i.e., a function f(x) may be defined for x between 0 and 1, but not outside that. Or for instance f(x) = 1/x is defined over (-inf...0) and (0...+inf) but not actually AT 0.

A range of a function on the other hand is what it might output, for instance f(x) = x * 2 defined only over 0..1 can only return values in the range 0..2, so it's range is 0..2.


Circle Groups
Think about the function sin(theta). You could define this over all real numbers, but because the function repeats itself you could also define it over [0..2pi).


Note: this is actually cos(theta), sorry!

If we think about this domain, we might realize that is most intuitive to think of it as a circle. In this case, sin(theta) would be the y coordinate of a point on this circle, and cos(theta) would be the x.

So now, let's think about the unit circle itself as a domain. Assuming the radius of the circle is r, and the point (1, 0) on this point is 0, then going counter clockwise we can trace out the distance from the starting point as theta, which will go from [0..2pi]. Once we reach 2pi, we are back at the start.

This is one (not very rigorous) way to define a particular group. A group is just a set of things (such as our domain above, a set of points) together with an operator, op(a, b) which has a domain and a range of the set of things. In our example, op(a, b) takes an angle a (in 0..2pi) and rotates it by b (also in 0..2pi) radians; it "adds" the two numbers, modulo (wrapping at) 2pi.




Collision
Suppose two bobsleds are travelling along the line -inf...inf, in the real numbers. Let's call bobsled A's position (in 1 dimension) A1, and bobsled B's position as B1; further, let's suppose that a moment ago bobsled A was at position A0, and bobsled B was at position B0. That is, in some small timeslice, bobsled A moved from A0 to A1, and B moved from B0 to B1.

Our task is to determine whether, during that recent timeslice, they would have run into each other. In fact, this is fairly simple to check: Suppose that they AREN'T colliding. Then either max(A0,A1) must be less than min(B0,B1), or min(A0,A1) must be greater than max(B0,B1). Otherwise, they are overlapping and so colliding. This is essentially a bounding box check in 1-D.




Collisions on the Circle Group
It is (to me) much less obvious how to detect this collision on the circle group. That is, suppose that our bobsleds are not moving along an infinite line, but on a circle. Their coordinates are still 1-D: each bobsled has only an A0 and A1, somewhere in between 0..2pi; they are not allowed a traditional 2-D "vector" representation.



The first complication is that it's not obvious, given only A0 and A1, which direction a bobsled is moving. In fact, it could be moving in either direction, as shown here:



But let's suppose, for a moment, that we can overcome this problem of direction. One "sensible" thing to do might be to check which of the two possible curve segments would be shorter; and indeed if T is small enough this will always work.

Even then, we are still left with the problem that the above inequality makes no sense. For instance, the number pi is greater than pi/2 on the real number line, but not on the unit circle. To see why this is so, think about starting at pi, and adding pi*3/2 to it, we will arrive at pi/2. I.e., we can start at either point, rotate counterclockwise, and end up at the other point. So there is no way to define which is smaller, at least not in a way that is consistent with our circle group.


Because you can add something to pi/2 to reach pi, and also add something to pi to reach pi/2, you can't define one as being greater than the other.


Naieve Approach
We might try and adapt our approach for the real number line by "unwrapping" the circle into a line segment. In some cases this will work without a problem. But what if our "unwrapping point" (i.e., where we take our scissors and cut the unit circle) cuts through one of the ranges in question, as well?

In this case we will have to do some additional checks. In practice, this will create ugly code with several conditionals. If this is the only solution we can immediately see, we might decide we don't have the energy to actually code it, and decide to write a blog post instead.


Now imagine TWO such line segments, possibly chopped in half, possibly overlapping, in all possible configurations. It's feasable to code that but not if you are lazy.


ACOS
A better solution would be to think about this problem natively; that is, try and work within a domain that is natural to it. This would mean treating theta as an angle. In fact, what we could do is find the midpoint of each angle A0->A1, B0->B1, and how far out they "sweep", and then check to see if there is overlap.



This might at first seem to be trivially similar to the collision solution on the real number line; it is not. The reason is that the collision solution above checks bounds, whereas here we are checking distances. One is the equivalent of an N-dimensional bounding box problem where N=1; this is rather the equivalent of checking whether two N-spheres collide.

In the first case, we are doing an ordering comparison. Is this greater than or less than that. But in the second case, we are computing distance between two points, which is not dependant on something being ordered. Realize that absolute value is the distance function on 1-D, just like sign(x) is the "normal vector" of x in 1-D.

There is one remaining detail, which is to compute the distance between two points on the unit circle. In general, we could say they have two different distances, depending on which way you go (A to B will be a different length than B to A.) In our case though it is pretty obvious that we want to the smaller of the two distances, because if the larger one collides then the smaller one will as well.


Native Representation?
Because our CPU does not have a native representation for these kind of values (it might be interesting to think what a native representation of this would look like, in binary!) we will at some point have to convert back to the real number line. However, it's a lot simpler task to convert just the resulting midpoints to the real number line than it would be to convert the entire ranges, as in our first "naieve" approach.


Circles Are Confusion
Hopefully this blog was interesting to read. If you are looking for a better understanding of some of the mathematics here, I would recommend reading about Group Theory. (wikipedia)

Read about Group Theory on Wikipedia.


TWEETER
Finally please let me share a funny twitter exchange (I have ordered it chronologically). Bask in my multi-layered puns:


Srsly, I'm on fire tonite!
Logged
PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #56 on: April 16, 2011, 10:36:07 AM »

Hey tiggers, there was one other blog post that I didn't mirror here:

The Making Of...

Not a post-mortem but just talking about where things are at. I got flooded out of my apartment for about a month which put a damper (hah) on things. However right now I'm back at it, actually I have played it through twice without any major problems so I'm slowly starting beta testing.

Take care everybody!
Logged
mokesmoe
Level 10
*****



View Profile WWW
« Reply #57 on: April 16, 2011, 02:25:49 PM »


This is sin.
Logged
PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #58 on: April 17, 2011, 01:24:18 PM »


This is sin.

Aha, yes indeed, 2 people have pointed this out. Thank you!
Logged
PsySal
Level 8
***


Yaay!


View Profile WWW
« Reply #59 on: April 21, 2011, 08:32:20 PM »

Quandary of the Auto Updater

Part I: Thanksgiving



It was a dark and stormy night. Alison was on her way home to Maine, from her fancy New Hampshire private college and it's English Lit Major L'Escapades. The wiper blades went swooka-swooka across the window. Alison cursed: thanksgiving always had such shitty weather.

CRACKAA-BOOOM! Lightning struck close, temporarily blinding her, and she drove into the ditch. Luckily she was unharmed, but it looked like she'd be spending a night in that weird gothic castle she just spied...


Part II: Auto Updater

I'm almost ready to release an early version of a little game I called Bobsledder Spank Arena. I have some strange things planned for this, the least strange of them is adding tracks.

In Bobsledders, you race around a track and try to whack your opponent with a cricket bat. Typically you start off on opposite ends of the track, travelling in the same direction. You can reverse direction at will and there is no real right or wrong way to race around the track; you don't get any points at all for making laps, only a win by K.O.-ing your opponent. This setup is inspired by pursuit bike racing.

I'd like each track to be remarkable and interesting, so that may involve some extra code or other things added to them for visual effect, at least.

So I decided that what I really want is an auto-updater.


Part III: The Social Contract

Now consider this: you've written some software, let's say the new Web Browser. The user chooses to trust you and install this on their system. This Web Browser then dials into a website to automatically download updates. This is the same software that was originally installed, but improved. So it's natural that the update would happen at least semi-automatically, if not totally.

There is a social contract between the developer and the user-- they want this particular software installed on their system.

Now, if you were to download and install other software onto their computer, or install an upgrade that was vastly different, they might consider this social contract broken.


Part IV: The Hacker

Now imagine you make a game about Bobsledders that is quite popular, and there are a thousand or more players. Social contract in effect, you have an auto-updater set up so that you can easily push out improvements to the software. Of course, you have to be careful not to downgrade (e.g., break) everyone's installation, since they won't expect THAT, but it seems reasonable if you add new tracks or other bonus content that they will be glad to have it updated automatically.


Part V: Melphisto



Melphisto cackled loudly. His dirty T-shirt had a picture of an alligator eating a kitten, and the words MY KIND OF PURSE below it. Cracking his knuckles, he leaned back at his computer desk, in the top chamber of his giant gothic castle in Maine set against the same dark and stormy night from Part I.

Melphisto had managed to hack into the Bobsledders website, and uploaded a Bad Program. This would download everyone's Credit Card information and use it to purchase expensive marble from Italy for his castle.

You see, Melphisto had a dream. A dark dream. A dark dream that can only be dreamt by a video game nerd turned evil hacker.

His dream was to recreate Castlevania: Symphony of the Night. And this was going to cost MONEY.


Part VI: Rijn Belmont

Just like you shouldn't store passwords plaintext or weakly-hashed in your database, you shouldn't have an auto-updater that does not involve a public-key crypto system.

What you do as a responsible developer:

- Set up a local encrypted file store/container specifically for containing your private key.
- Put the corresponding public key IN THE UPDATER CLIENT ITSELF. These will never change, and the updater will ignore anything that isn't signed properly. The updater will never change these values (i.e., the updater won't update the updater.)
- When you are doing a new release, you need to sign each file that will be updated using your private key, so that it acceptable by everyone's updater.

This protects the people who trust you against these possibilities:

- Your website is hacked (happens all the time, man...)
- Your computer is stolen (less likely) or somehow hacked (since you will normally not even have the container with the keys on it mounted)

Of course, the down side is that is a lot of infrastructure for a simple updater. But this should be standard practice. Does FireFox do this? Does google chrome? Adobe? (at least adobe still ASKS if I want to update...) What about Windows Update? Debian? Ubuntu?

Millions of installations. One security breach. Mayhem.

Think about it.


Part VII: RSA

I actually have an implementation of RSA that I wrote some years ago. I did this for Venture the Void, because I wanted strong key generation. What it does is take your username that you use to access your acount, adds a salt to it, MD5s it, and then creates a signature. That is your "registration code".

This way, there is at least no way for somebody to write a code generator that could pair up usernames with registration codes. Side note, I think this might be a reasonable approach to DRM because it doesn't require an internet connection, yet any leaked codes can be traced back to an individual customer, meaning it should be less likely that they are leaked. But whatev'.

Of course only in my wildest imagination are people somehow wanting to pirate Venture the Void. **Sigh** But, it looks like I'll have another use for my RSA implementation, which is cool!

Finally, having implemented RSA, do you know the hardest part? LONG DIVISION. Yes, by far, the hardest part was doing long division. You can avoid this if you have a BigInt class of some kind (I did not) but my actual point here is maybe it would be a fun exercise to try and code a long division algorithm. It's really surprisingly convoluted.
Logged
Pages: 1 2 [3] 4
Print
Jump to:  

Theme orange-lt created by panic