Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 03 Mar 2006
Offline Last Active May 31 2012 04:03 PM

#4934192 Problem: turning a bit shift into a division

Posted by Antheus on 23 April 2012 - 12:40 PM

First of all, this is C, I don't care about what the flags are or anything (the compiler takes care about that). And this code assumes overflow shouldn't happen (if it does then it's considered a bug in the game).

Second, the only behavior that matters here is the result the function returns, not what the compiler decides to do inside (though ideally the compiler should not do stupid things to achieve it!).

No, the compiler is, by spec, required to do stupid things. Result of bitshift on a signed number is compiler-defined.

So whatever you're trying to emulate "correctly" has nothing to compare to.

The following function is correct:
int32_t speed_to_int(int32_t value) {
   if (value + comma_offset >= 0) return (value+comma_offset) / 256;
   return rand();
For a given compiler that chooses such behavior. C language does not forbid it, compiler that generates code like above is perfectly C standard compliant.

Since that is probably not what you intended, it is up to you what the supposed result will be and how it's implemented.

If log replayes across machines (as mentioned above) are important, then any behavior will do, as long as its consistent.

But there is no way to provide 1:1 correct version, since original one is undefined, the only thing one can do is compare against a specific result of a specific compiler.

#4934088 Problem: turning a bit shift into a division

Posted by Antheus on 23 April 2012 - 07:21 AM

the code relies on this behavior

Algorithm you're dealing with here is black box. There is no division that would make it more portable or better.

Because it gets worse. If you rely on exactly identical behavior, then you not only need to properly emulate operation, but also overflow behavior and CPU flags. And perhaps something else, who knows, there might be an interrupt hooked on overflow.

Code like this wasn't written for longevity, it's defined by the code itself.

As for >> and signed types - it wasn't until recently that developers finally realized that it doesn't work quite correctly for negative numbers. Before, >> was the equivalent to division. Best part - nobody noticed it wasn't correct.

Then there's matter of larger values - does it perform identically across 16/32/64 register sizes?

If trying for emulation, then the rabbit hole goes really deep.

#4933347 Looking for a tutorial on how to make an update server

Posted by Antheus on 20 April 2012 - 02:52 PM

You will also need a domain name, either regular one or a dyndns.org style one to allow clients to update when the patch server's IP changes.

Things get trickier if you want binaries to be signed.

For longer term solution it might be worth following the Microsoft's planned App Store and their terms/restrictions.

#4933301 Looking for a tutorial on how to make an update server

Posted by Antheus on 20 April 2012 - 11:54 AM

What type of updates?
Which platform? OS? Desktop? Mobile?
What kind of update mechanism?
How frequent?
What kind of audience?

#4933292 How do I make a 2.5D facebook mmorpg

Posted by Antheus on 20 April 2012 - 11:22 AM

You need to know Flash for the game, HTML5/JavaScript/CSS for integration with the Facebook API, probably LAMP stack for the server and ability to administer one of server platforms, such as Amazon's S3, Heroku (if using Ruby or node.js), Rackspace/Linod/anything or whatever you choose for hosting.

C++ will be of no use anywhere.

Also have $500 or so saved for each month of operation, hosting costs can quickly jump up, it's not uncommon for people to be hit with several $1000 bill at the end of month.

#4932476 Is it to late?

Posted by Antheus on 18 April 2012 - 07:54 AM

Age is irrelevent, talent is everything.

Age plays a crucial factor for the following reasons.

Entry-level jobs don't pay well, so unless you transition into a position, you'll be fighting with recent grads with no salary expectations and all the time in the world.
Alternatively, you do internships/apprenticeships and transition into job from there.

The question you need to ask yourself here is: In X years, after you graduate, can you afford the chance to start at the very bottom of the foodchain. Consider that your competition will have 4+ years of demos and examples to show that they were building during spare time.

Second very important question is: How is the industry near you? Do you live in a place where you can even get hired? What about relocation abroad?

Here the first problem comes into play. Assuming you find your local options limited, but to move abroad you'll need several years of experience. Moving at 30+ is much harder than at 22.

Regarding quality of local employment, there's a simple way to verify your prospects. Look at local companies, look at their hiring requirements, look at their age demographics for individual positions as well as turnaround rates. it should give you a good indication of your prospects.

Next you'll need to examine your prospects at those companies. Career is 30+ years, how will you handle that.

#4931762 Are Pack Files (PAK, ZIP, WAD, etc) Worth It?

Posted by Antheus on 16 April 2012 - 09:29 AM

Thousands of files in one directory will simply kill Windows-based machine, regardless of whether NTFS or FAT, SSD or regular, AV or not.

I don't know the reason, but this has been pathological worst case, perhaps due to CreateFile() or something.

At minimum, put all those files into an uncompressed zip and it will improve access times dramatically, despite same amount of data.

#4931727 Component Object Model Examples?

Posted by Antheus on 16 April 2012 - 07:22 AM

I developed Autocad applications using COM, 10 or more years ago. Autocad is absurdly proprietary and locked down, written in something. At the time I used Delphi.

I'd import the API, then work as if I had Autocad source. Similar to this:
Autocad a = new Autocad();
Document d = a.newDocument();
d.drawLine([100, 100, 200, 200]);
Without having source or anything else, just exposed COM type libraries.

As Autocad went through versions, the COM API remained the same. So my applications written 10 years ago in Delphi still work today with 10 later versions of Acad.

And since COM completely abstracts the running environment, Acad can use my applications, without Autodesk having to add support for it.

But between WinRT, .Net and managed languages, it's a legacy technology that involves a lot of pain and suffering, so unless you have a well-paying job lined up, it's best left forgotten.

#4931492 What Branches Of Mathematics Does A Voxel Engine Require?

Posted by Antheus on 15 April 2012 - 11:56 AM

If you look at your screen with a magnifying glass, you'll notice it's composed of small squares or dots.

These are called pixels.

A pixel is single element of (usually) rectangular grid:
| | |
| | |

A voxel is 3D equivalent. Instead of small squares, you have boxes.

There is no real mathematics behind it, no more than it takes to draw a cross word puzzle or tic-tac-toe board.

Voxels are problematic due to storage. To represent complex object at sufficient resolution, one needs vastly more storage than is available today. A petabyte (1 million gigabytes) would be quite a good start.

So voxel handling techniques deal mostly with solving this problem. While storage is cheap, we cannot access it fast enough.

Simple voxel manipulation doesn't complicate, it simply splits world into equal rectangular chunks and only draws those that are visible. Stuff presented in video comes closer to cutting edge, so there's a combination of techniques.

Background needed to implement such engines is covered by standard low-end CS curriculum which covers computer graphics, linear algebra and computer architectures.

Some other applicable semi-mathematical fields would be information theory (encoding, entropy) and compression.

Voxels are, at least today, an engineering problem, since the hardware we have isn't capable of working with them directly. As far as their structure goes, they are absurdly simple - just a bunch of boxes.

#4931193 OpenMP and std::copy

Posted by Antheus on 14 April 2012 - 08:08 AM

The problem here is you're not thinking with portals. Um... OpenMP.

#pragma omp parallel for
for (i = 0; i < N; i++)
  result[i] = source[i];
OMP now chooses how to split this into blocks, how many threads to use and so on.

It also exposes a potential flaw, namely 'result' being shared, which may cause certain side-effects and unexpected stalls.

#4931030 How much work to make a game client like bloodline champions?

Posted by Antheus on 13 April 2012 - 01:22 PM

You've got absolutely no idea what I'm even talking about.

So it would appear. Which is why I repeatedly asked for clarification.

There doesn't have to be any 3d characters... and even if there was it's just a picture. Not code.

Yes. Which is why it's easy and only a few lines of code. Of course, i don't know who will provide the pictures, the programmer won't.

So you're saying I can create BLC client in 20 lines of code... bullshit.

No. You asked for a simple lobby. The BLC client is $200,000.

At least go and look up some info about BLC if you gonna start posting in this thread.

I did.

Relfos is the only one that has really contributed so far with something that's reasonable and makes sense so far.

If you take that estimate just for the "lobby client", you got ripped off. A lobby client is simple. If you want a full BLC game, then the estimate is reasonable.

Unfortunately, you still haven't been able to articulate what you actually want.

If you're looking to spend money on this, you will get ripped off for no result. Simple as that, there's an industry based around that.

#4931016 How much work to make a game client like bloodline champions?

Posted by Antheus on 13 April 2012 - 12:41 PM

buying characters choosing what game mode

That means there is a 3D game somewhere.

You cannot have "choosing characters" and "game mode" without having the game and gameplay itself.

You're asking for a movie trailer. Just the trailer, with Brad Pitt and Angelina Jolie, directed by Michael Bay and set on the Moon - but without actually hiring any of these people, having a script or having a single second of footage. But it needs to be exactly like Transformers. But just the trailer - everything but the movie.

How complex is a lobby? it's about 20 lines of code. So about one hour of work, deployment and all. Of course, it will do absolutely nothing useful, nor will it have any appeal to anyone, since there won't be a game or game mode or characters - since the game doesn't exist. There also won't be any graphics, since programmers can't do them and artists don't have a concept to go from - there is no game.

Lobby is not something by itself. Lobby is a mechanism of a game.

It's possible to make a concept, a demo if you will, but there is nothing of use - you first need a game, then you can make a lobby.

#4930998 How much work to make a game client like bloodline champions?

Posted by Antheus on 13 April 2012 - 11:34 AM

That's not what I want. Those kind of info are for millionaire studios.. Not for indys.

You have the numbers - which do not add up for you.

Instead, you have $5000. Now it's up to you to figure out how to get $200,000 worth of work out of $5000.

That's what indie means.

You need a way to convince a person in a regular job with benefits and seniority, pulling $100k a year to abandon that and go work for you.
You need a way to identity and persuade a good student to work for you, instead of joining Google Summer of Code and get paid $3000 + a very good job reference.
You need a way to get a post-grad to drop their internship at BigName Co. with good networking to go work for you.
You need a way to filter out 15 offers on eLance between duds and an odd chance of someone who might be roughly what you want.
Or, a way to learn yourself how to do it and not rely on others.

You have an estimate of monetary worth of such work. Total would be $1 million or so - for an indie, several times that for a commercial entity.

Think about it, why would these companies pay so much money if they could get the same results for 5k? It would increase their profits tenfold. Why would they hire people if they could just be sole owner and take 100% of revenue as paycheck?

similar client that BLC uses (NOT the actual playing with running around with character shooting etc)

If you don't mean the BLC client, then you'll first need to specify the requirements better first. BLC is a 3D game. If you mean something else, then estimates might be different.

#4930993 How much work to make a game client like bloodline champions?

Posted by Antheus on 13 April 2012 - 11:04 AM

I just don't believe it can take 12 years to make a more than normal advanced "lobby" client.

3-4 years CS university, 2 years experience, 1 year on your project, given 2-3 people that's 12 man years.

If they come with experience, you pay for your project only, so 1 year per person.

Then there would be zero indy games out there.

These indy people spend several years developing before they invest 1-2 years into their project.

MMORPG's get created in less than 12 years even if they create their own engine.

MMOs take thousands of man years.

Social games on Facebook have ~500 developers/art/content people total who work full time. That's 500 man years each year.

So how long is a man year?

One person working full time one year is one man-year.

8 people working 1 hour a day is 1 man year.

A project that takes 200 man years will take 200 years to complete by one person. It will take 1 year to complete by 200 people. it's not a perfect metric, since 2 million people will not complete in a day, but it's usual estimate.

it also allows cost estimation, just multiply by hourly pay.

#4930982 How much work to make a game client like bloodline champions?

Posted by Antheus on 13 April 2012 - 10:34 AM

how much it would cost to hire a programmer to make a similar client that BLC uses

About $200,000.

quality programmer

Quality programmer has a salary in range of $60-90k per year, but only in an established company that has track record of actually paying such sums as well as established development process. If hiring outside of that, cost may vary, it will need to compensate for risk.

But, programmers alone will have hard time steering the project, so you need someone to lead the project, or hire someone senior enough to understand the deeper issues.

and how much time it could take on average that would be great so I know if I can even fund something like this.

About 3 man years for experienced team, 12 if you they have no previous experience.

This accounts only for programming for release ready code. it doesn't include cost of software, management, promotion, etc...

It also doesn't include art or other aspects, such as server administration, web presence or account for exponential complexity of coordinating these aspects. A good manager that can handle all of that may quickly come at 6 figures alone.

(NOT the actual playing with running around with character shooting etc)

That would be content and to have any hope of success, it needs to be developed in parallel with engine, so that they both play of each other's strengths and limitations.