Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 23 Feb 2001
Offline Last Active Today, 03:00 PM

Posts I've Made

In Topic: Question about encryption and ransomware.

20 May 2016 - 03:03 PM

I have next to no experience or knowledge of encryption, so I am asking this out of pure ignorance. Let's say that I got bit by ransomware (thank God I have not!). On my desktop is one solitary file that I downloaded off the internet. That file gets encrypted. I know where to get the exact copy of that file and re-download it. Wouldn't it be possible to compare the original and encrypted versions and work out the necessary key?

Suppose we use a very simply encryption algorithm, like the rotation cipher. A => B, B=>C, C=>D, etc. This would be a rotation of 1 to the right. The algorithm would be "Letter+1". Very easy to decrypt, right? Let's make it slightly more complicated by letting the number of letters we displace be a random value between 0-26. We get this random integer value by using 

int offset = rand() % 26;
char ROT = (Letter + (char)offset) % 26; //let Z + offset loop around

Note that every time you run the rand() function, you're generating a sequence of random numbers. Because the rand() method is a pseudo-random number generator, the sequence of random numbers will always be the same, every time you run the application. Here's an example:

Random output sequence the first time the app is run: {23,14,21,7,16,3,21...}

Random output sequence the second time the app is run: {23,14,21,7,16,3,21...}

However, if you seed the random number generator, you're going to generate a different sequence of random numbers. But, every time you use the same seed, you'll generate the same sequence of random numbers. So, if we treat the key as the generator of the seed for random numbers, can we derive the key from a sequence of random numbers?

Even if I give you the code which generates the random numbers, the plain text which was encrypted, and the resulting cipher text, is it possible to derive the key from a simple ROT cipher without using brute force? 

//from rand.cpp in the stdlib

// Seeds the random number generator with the provided integer.
extern "C" void __cdecl srand(unsigned int const seed)
    __acrt_getptd()->_rand_state = seed;

// Returns a pseudorandom number in the range [0,32767].
extern "C" int __cdecl rand()
    __acrt_ptd* const ptd = __acrt_getptd();

    ptd->_rand_state = ptd->_rand_state * 214013 + 2531011;
    return (ptd->_rand_state >> 16) & RAND_MAX;

I'm not a crypto-analyst, so I can't say with any authority, but I imagine it would be difficult?

If I was going to try to attack this encryption method, I'd brute force it and use a large bank of computers and have them start creating sequences of random numbers to try to match the known sequence of random numbers. We'd just create a loop which iterates through every possible random number seed until we find a perfectly matching sequence of random numbers. But hey, that's brute forcing and if we can force a brute force attack to be the best chance, then the encryption system wins. All we'd have to do is exponentially increase the time it takes for the brute force to be effective. 100,000 years on one computer, maybe 1 year with 100,000 computers?

In Topic: Game Prices on Steam: should there be regulation/guidelines?

17 May 2016 - 02:19 PM

One thing I've learned from selling stuff: The price of an item is not the value of that item.


A hair clip costs $0.30 to make in China. We can then sell it for $10-15 in America. Profit margins may appear to be high, but so are overhead costs (booth fee, transportation, food and lodging, time and energy, etc). Yet, people buy hair clips; It's something they like and want, solves a problem, and makes them feel pretty and good about themselves.


Almost a decade ago, I sold Cutco Knives to people. A full set went for about $750-800. "How will I ever convince people to pay that much for knives?!" I wondered. "Isn't that too expensive?" I found out the price doesn't matter.

With every sale, you're playing a juggling act. You've got the PRICE which you're asking for the item, and then the potential customer has the PERCEIVED VALUE of that item. If Price > Perceived value, then no sale. If Price < Perceived Value, then sale! A sale is ALL about the pitch. The art of sales is to increase the perceived value above the asking price.


When I did computer services for people, I hated it and wanted to stop providing my service. My strategy was to double my rate to $60/hour so that people say, "That's too expensive, no thanks!". Instead, it backfired. I got more business! Why? Because by charging higher rates, people thought that I was worth what I was charging. The high number increased my perceived value! Whoops! But, it also works in reverse! If you sell an item way below the perceived value, then the perceived value is also lowered!


So, what do idiot people do when they suck at sales and want to sell something? They drop their price instead of trying to increase the perceived value of their commodity! But, does it matter to others? I would argue "No! Not at all!". It doesn't have to be a race to the bottom as you guys might fear, it just means you have to create a compelling pitch about the value of your game and why it's worth the money you're asking for. We could build a compelling pitch for most decent games selling for $2 and get people to pay $10. Oh no! Sales volume drops! Okay, suppose the volume of your sales drops by 50%. Instead of making 1,000 sales for $2, you make 500 sales for $10. The 1,000 sales gives you $2,000 but the 500 sales gives you $5,000. Now, do you want sales volume or sales value?? Even if your sales volume dropped to 20%, or 200 sales, you'd still break even. You increase your sales volume through marketing and compelling sales pitches, NOT by dropping your price. That's generally an amateur move. Don't think your game is worth $10? Well, your opinion on the value of your game doesn't really matter. If it helps you sleep better at night, maintain high production values throughout the development of your game! At the same time, stop undervaluing yourself!!!

In Topic: Looking for game engine

10 May 2016 - 03:45 PM

I really like your quotations and was attempting to return it the same way.

But yeah, let's list it then:
1. Yeah, i'm too stupid but i want to understand this lean "CPU, GPU hardware print." Baking took awhile and it creates something about 300 MB. 
Also everytime i need to build "shaders" it takes too long. I just want to render flat shaders, like handpainted textures, and it always goes back and render like 100 thing in the background. And i could never get flat shaders from it, and the forum gave me no solution.
2. Clearly. it's not a sausage machine. it's a cow butchering, meat refinery factory. See answer one again. 
3. it's not stylized. Basicaly i'm removing everything from lightmass, shadows, motionblur into raw stuff, just texture and mesh.
4. again, it's an answer i found somewhere, that flat shading is not supported in unreal.
5. cheers. I think unreal is solid too. Stable, but man, it's heavy in visual. I want it stable and lean, and unity can provide it much faster than unreal in blueprint and cpp.
What a shame since i still can't find the solution to strip it all.
6. i am glad that it's lacking splashscreen. Clarification: since unity needs you to pay for pro to remove splashscreen. 
7. blender game engine is out of the question for now. What i meant is that since python library needs to be reinstalled everytime the runtime is created.
but that's an entire different story.

But i suppose all these counter argument of mine is just making it all messy.
I want to use Unreal, but apparently it keeps going on' Building shaders(100 something)' and i can't get it to make simpler games.
i have like zero programming skill and to wait until i am "proficient", will i even get to ship a game? 
That's the question.

1. Okay, I remember a while back I had a "problem" with the engine always compiling shaders. It was nearly constant on my computer, but my artists computer never had that problem. After a bit of investigation, I figured out that it was a problem with my CPU. I didn't have enough cores on it, so the compile shader thread was not a background thread and it kept on interrupting my work flow. So, I went out and bought a high end processor and the problem took care of itself.


3. You can remove a ton of shader code by unchecking a bunch of default properties. Don't want lighting and shadows? Make your shader unlit. Don't want shadows? Turn off "casts shadows" on the mesh. Got a favorite shader material but want to tweak a few settings? Make it a dynamic material instance and change shader properties on the fly! There's a lot of advanced stuff available with the shader system, but just because there are advanced capabilities doesn't mean you have to use them. They're there if you ever need them though ;)


If you're brave, you can also write your own HLSL code and inject it into the UE4 shader as a "code" node. You can come up with a super simple vertex shader and pixel shader, and ignore the other stuff, like fragment shaders and geometry shaders. I personally use custom HLSL code very sparingly since the engine can't optimize it.

In Topic: Looking for game engine

10 May 2016 - 03:34 PM

Nevermind, let's ask the question.

 What is the learning curve for Unreal engine? How long does it take an average person to get proficient with the engine?

i know there's an online documentation so far.

It depends on your experience levels. Before using UE4, I wrote my own engine from scratch. Picking up UE4 took me about 1 month of full time effort to get to a point where I knew how to be proficient. It took about 3 months of full time effort to become an advanced user. My technique was to just dive right in and start building, and leaning on my existing knowledge about how to build games and scenes.


For someone with no programming experience or experience building games, it will take a lot longer. You won't just be learning about how to use an engine, you'll be learning about the engine agnostic stuff, like "what is a vector? what is a dot product? how do I use trigonometry to make games? how do I write good AI? What is a for loop?" etc. If you dedicated a lot of time, you could get really good at this in about 6 months. I think I'd put UE4 and Unity both at 6 months for 100% proficiency.

I don't know about unity, but there are hundreds of youtube videos for UE4 which can get you started at any experience level. The engine developers also do two live twitch streams every week, so if you have a burning question, you can ask them live and they'll be able to give you an answer.

In Topic: Looking for game engine

09 May 2016 - 06:01 PM

"Why not Unreal", apparently i need something lightweight. Unreal uses different algorhytm to render its mesh. I want hand painted 3d. To do it in unreal would be reengineering the whole system. And high quality games is not something i can do alone.

Unity, almost has it, in terms of simple rendering...
but some things only the Unreal has it. Particularly this "ClosestPointonMesh" node. Let's you find nearest mesh in collision and its normal without exactly "colliding" on it.

Also it's lacking a splash screen, unlike unity. 
I don't exactly have all the funds.

I am tempted to use blender...but it's runtime has this... Console.
And it's ask you to install the entire python library instead of simple binary...
is it common? 
What if you want to move it to mobile?

Despite your objections, Unreal is still your best choice.


Let's look at your objections:
"apparently i need something lightweight"  - Define light weight. UE4 can bake a game down into a very lean CPU, GPU and hardware footprint. Performance has never been a problem in UE4.
Unreal uses different algorhytm to render its mesh." - in 99 out of 100 cases, how the sausage is made on the backend is irrelevant.

"I want hand painted 3d." - This is entirely possible in UE4. You can achieve this very nicely with materials. There are plenty of stylized demos which show how to do this.
To do it in unreal would be reengineering the whole system." - What are you talking about? The whole point of using a game engine is so that you don't have to reengineer anything. I think this is a flawed assumption and you'd need to elaborate a lot more to justify this.
"And high quality games is not something i can do alone." - I'm glad you're thinking about building a high quality game. I would hope that high quality is a standard you look for regardless of what game engine you choose. But, I think when we say "high quality", we might be talking about different definitions of the term. You may mean "visual quality" and I mean "stable, functional, bug free".

"Also it's lacking a splash screen" - Other unreal developers have placed a splash screen in their game. See Eve:Valkyrie. Regardless, this shouldn't be your primary deciding factor on what game engine to use.
I am tempted to use blender" - Blender is not a game engine, it's a 3D rendering program.
What if you want to move it to mobile?" - this is a good question and worth looking into if you're design calls for it. Decide this before building your game. Both UE4 and Unity support mobile development, but you'll want to explore the range of features they both offer before making a decision on one engine over another.



The most important questions you aren't asking:
1. Myself or my team has a programming skill at X level, what is the best engine to support our programming skill level?

2. What is the learning curve for each engine? How long does it take an average person to get proficient with the engine? What kind of online documentation is available?