Categories
Uncategorized

Getting bids on a new project

I have a new project I’m working on. I wrote a 15 page detailed design document. I then decided to spend a week finding bids.

Roughly:

5 companies didn’t respond at all
5 responded with they couldn’t do it
2 responded, but mentioned they charge $2000 a day
1 responded with a rough estimate, and a high price, and asked me if I wanted to continue
3 Signed the NDA and came back with a quote, without further communication
1 Signed the NDA, actually spoke to me by email over several days to clarify it, and came back with a quote
3 got the requirements document, but I never heard back again. They are probably studying it, unaware that spending more than a couple of days to answer means they lost the bid.
2 were extremely slow to respond, where it took the whole week to even sign the NDA
1 immediately wanted a phone meeting, without even looking at the requirements document. After sending the requirements document, they wanted a meeting again, without stating why.

The company that clarified the requirements document was my first choice, but couldn’t do it for various reasons. So I’m going to go with one of the companies that just placed a bid. Payment is for completed work only, so there’s no risk or cost to me other than wasted time.

Generally, the small companies were the ones that came back with bids or comments. The large companies were slow to respond, and either wanted a meeting or were so slow to respond I haven’t heard from them by now, and won’t wait any longer.

Is it unreasonable to expect to get a quote within a week’s time?

Categories
Uncategorized

Scaleform partnership for a lobby integration

Whenever a customer has difficulty with RakNet, or a feature of RakNet, I reflect on what I could have done better to help them. So when Stardock, used RakNet as part of their lobby system, I noted that it took them an alarming amount of time and resources relative to my expectations. Part of this was that RakNet’s NAT punchthrough feature was not as sophisticated as it is now. And part of it is just the magnitude of this feature, involving:

  • Remote server hosting
  • Proxy server hosting
  • UPNP
  • Handling difficult to handle failure conditions

The only way to help the customer get around this is to do it for them, which involves lobby and UI code.

Scaleform by far has the best cross-platform solution for UI. So I negotiated a partnership with them, allowing Jenkins Software LLC to use and release Scaleform integration code to our customers. This was done for the Autopatcher. And I’m now having our own Lobby system made. This is a huge feature, but when done can encompass things such as user registration, game rankings, clans, friends, emails, rooms, and NAT punchthrough. All the end user would need to do is license Scaleform and skin the UI that RakNet provides. From a competitive standpoint, this puts us on par with other major middleware providers and eliminates the last reason any developer may have to use their services rather than RakNet.

It’s a pretty big deal, and when done, I believe will be a huge boost to sales and a serious threat to the competition.

Categories
Game Development

New congestion control thanks to UDT

A few years ago, a user in the forum stated that UDT had much higher throughput than RakNet for LAN transfers. I took a look at it and it was made by a couple of research scientists for the purpose of being faster than TCP. While they published details of their work, the documentation is extremely technical and academic. Anyway, I said at the time that RakNet was designed with different goals, and if all they wanted was high speed LAN transfer to use UDT instead.

Since that time, I had ongoing problems with congestion control. Every 2-6 months I’d try a different approach with incremental improvements. But with the wide range of scenarios under which RakNet is used, there was always a new scenario where it didn’t work. So I basically gave up, and turned to UDT for help.

My first approach was to directly integrate UDT into RakNet. I spent about a week removing all exceptions from the UDT source, changing to the RakNet memory allocator, and integrating RakNet to use UDT for sends and receives through RakNet’s own sockets. I had it working, but had problems where UDT didn’t connect as fast as RakNet. UDT also didn’t support priority levels or different sending types other than RELIABLE_ORDERED. I wasn’t happy about having another UDP library integrated into my core product just for one feature (congestion control). In the end, I released this an optional define flag. It’s present in version 3.62 though I left it disabled by default.

At random, I saw an advertisement by one of the authors of UDT, Yunhong Gu, for paid contracting. Rather than have him code a solution, I had him write a technical design document on how the UDT congestion control was implemented, so I could implement it myself.

The result of my implementation

Using DevPartner performance analysis I eliminated the top 20% CPU utilization from RakNet. I also reduced the bandwidth overhead, even though more information is sent. In the end, I raised the file transfer rate on localhost from 2 to over 20 megabytes per second (I’ve seen it go as high as 40 on another computer). And the transfer rate to my remote server went up by 50%.

I’m pretty happy with the end-result. This is probably the most significant improvement to RakNet I’ve made since it was developed. I’ll be releasing this as version 3.7 in the very near future.

Categories
Uncategorized

Fixed spam links in RSS feed

Looks like wordpress got hijacked and was sending out spam in the RSS feed. Sorry to all those that experienced it. This is the 2nd time wordpress has gotten hijacked. Seems like it’s not a very secure system, as much as i otherwise appreciate that it’s free
URL with fix (See last post)

Sorry if I accidentally deleted your account. I had to delete all with usernames or email addresses that looked automatically generated.

Categories
Uncategorized

Rich people during the downturn

I was reading an article today about rich people having a harder time during the downturn in the economy. What really struck me was the some of the comments.

1. It’s ridiculous to say you cannot sell your house (now that you can no longer afford to maintain it). You just can’t sell it for more than its market value. Doing so involves admitting that you overpaid when you bought it. You made a bad decision, accept the consequences. Staying in a house you can’t afford only worsens your loss.

2. People that make more money than you do do so because they made better decisions earlier in life, and took successful risks. With the exception of circumstances outside of your control (abusive parents, birth defects, traffic accidents) everyone in the US has a reasonably equal opportunity in life. Most disadvantages at the start can be overcome if you work harder.

3. College is only unaffordable if you make it so. Jr. college costs a few hundred per semester, and that’s for 2 years. Another 2 years of college at 2K per semester is 8K. Live with your parents, go to whatever is nearby, and get a degree. It only matters for your first job, and if you excel at your first job you’ll catch up quickly enough. If you’re too old to live with your parents now, that’s your own fault for screwing around when you had the chance. You’ll have to work harder to make it up.

4. Rich is relative. I make more than the person in the article, yet I’m only middle class. I can’t afford to buy a house. Federal income tax takes over 30%, state tax another 10%, Social security another 10K, sales tax is at 8.5%, and so on. My rent is $3000 a month and while I’m renting a house, it’s not a mansion by any means. Federal taxes do not take into account cost of living. You may make more, but you pay progressively more in taxes, and have to pay more to live.

5. For every business owner, there are 9 that failed. For every rich business owner, there are 9 that are not rich. And every business owner works 7 days a week 24 hours a day. Perhaps not directly in the office/shop/restaurant. But the business is always there, demanding your attention to make it successful. So successful people deserve the money they made, and if they play golf all day, it’s because they worked hard earlier. Are there rich people that don’t deserve it? Of course. But that’s the aberration, and sooner or later it’ll even out.

6. If you can’t save, look at your spending habits. There are very few people that cannot afford college were they to control their expenses to the true necessities. That is why foreigners get ahead. They really did have nothing where they came from, so they understand how to save and what is really a necessity.

Categories
Game Development

One of those rare cases where a linked list is the best data structure

I have a B+ tree containing pointers, sorted by key. I had a queue which mirrored that tree, but was ordered by a fixed-interval timestamp (from most recent to least recent). I recently encountered a situation where I was able to look up the pointer by the key in the B+ tree, but didn’t know its index into the queue. Since the queue could be tens of thousands of elements long, and the same op. had to be repeated many times, it was too slow to stick with. So I changed to a linked list. That way I could remove from the middle of the queue and readd at the head of the queue without scanning the queue for its index.

Categories
Uncategorized

Why every programmer should start their own business

1. You can write off everything that you buy related to your business, which for me is a 30% discount for almost everything I spend money on. You’d be surprised at just how much can be considered a business expense.
A. Eating out while at a job site (though they limit this to half the discount, so 15%)
B. Buying computer games, when used for ‘market research’
C. Buying computer parts
D. The portion of my home I use for my home office applied to my rent
E. Similar to D, but for utilities
F. Auto depreciation and expenses (again just for the job site, but for me that’s practically the only place I go)
G. Common supplies – paper, pencils

2. You can demand more money from those you work for, if you work as a contractor, which is now easier if you contract through your own business. See my Contract pay calculator. It’s not one-sided. It actually costs your employer/customer less to hire you.

3. Using some of the money from item 2, you can buy your own health insurance. That means you don’t lose your health insurance just because you lost your job. It also means you can pick the health insurance you actually want.

4. In CA, and perhaps other states, having your own company means you can buy group health insurance. By law, you don’t have to disclose preexisting conditions with group health insurance. This is why you can have your family insured when you would otherwise start a new job as an employee without them requiring that your wife and kids get a checkup and turn over their medical records first. If you just went and bought individual coverage you’d have to do that.

5. If you do get hired as a contractor, you get emotional benefits from being your own boss. The freedom is great too – decline meetings you don’t want to go to, come in whatever you want, work for other customers at the same time, and often maintain ownership of part all of your work Of course this can be abused and you can get in trouble, but as long as you get your work done the customer has no basis to complain.

6. Now that you actually have a business license (which takes only a couple of hours for everything), if you want to sell goods or services, or do contracting, it’s much easier.

7. If you incorporate as an LLC, then you are personally shielded from the liabilities of your business. This means if you were to contract for or sell to company X, and they sued you for whatever reason, the most they could get is whatever was in your business bank account, and your business assets at the time you were served. The franchise fee in CA is $800 a year, less in other states. Keep your business account separate from your personal account, and you no longer have to worry about losing your house. (Within reason, see Piercing the corporate veil)

The only real downside is that contract work tends to be temporary. Some managers have this perception. However the way I see it, it’s no less temporary than being an employee, as employees can be fired too. As long as you are making the company money and doing a good job they have every incentive to keep you on as a contractor.

Categories
Uncategorized

Playing music from Visual Studio

1. View / Other Windows / Web browser
2. Enter http://www.pandora.com
3. If desired, drag the tab off to the bottom of the code edit pane, and slide it down to minimize it.

So you can play Pandora without having another tab open in your taskbar and accidentally closing it.

Categories
Game Development

Function calls as data

I’ve been using a function object design pattern for my Lobby system and it’s working well enough that I wanted to post about it.

The concept is very simple. Encapsulate the input and output parameters to a function, and the function call itself, in an object. This lets you manipulate a function call the same way you do objects.

Some useful things you can then do:

  1. Serialize them over the network
  2. Save them to disk
  3. Put them in a queue, for a test execution path
  4. Save them to call later
  5. Move the inputs and outputs around between threads
  6. Log what runs
  7. Perform operations on a set of function objects via the base class
  8. Give the user more functions by giving them more function objects from a class factory, making the system easy to extend.

So the lobby system exposes a large set of function objects. The user gets one from the class factory, with an identifier for what function to perform. The input parameters are filled in. They are serialized, processed remotely, and sent back. The user has all the contextual information because the input parameters are sent back as well as the output parameters. And a cool thing about this is the memory for function call lives on the internet. From the client’s point of view it is stateless. The client doesn’t have to track what is running.

It’s also useful for asynchronous operations.

In my case, rather than having a function pointer, the functor’s operation is in the functor itself (e.g. DoWork()). The needed parameters are passed to DoWork(), and operate on the database.

Categories
Uncategorized

How to deal with customers in a financial crisis?

One of my best customers has run into financial problems. This affects me because I contract for them on a routine schedule, and they missed the last payment by a week, with no solid ETA on when they can make it.

It’s an interesting question on how to handle this.

1. I could immediately suspend contracting services. This would insulate me from further potential loss, and I could use that time for other customers. But I’m a critical person they are counting on, and if I were to stop services they’d probably not be able to ship the game with multiplayer, or at least not on time.

2. I could give them a hard deadline to pay by. I’m exposed to further loss (over 25K in fees owed), but they might make the payment and I can continue contracting. They pay very well and I’d like to keep the contract if I can do so with reasonable assurance I’ll get paid.

3. I could give them a soft deadline to pay by. By this I mean being flexible and agreeable to whatever dates they offer as to when I will get paid. On the positive side, this maintains good relations, they’ll probably finish the game, and if they finish the game I’d probably be more likely to be paid than otherwise. On the negative side, if they DO go insolvent, as a contractor I’m an unsecured creditor behind the employees, and I could end up losing 50K in fees.

For option 2 or 3, suppose I set a deadline and they meet it. Should I continue on as if nothing happened? Or should I demand assurances for future payments, such as payment in advance, or requirement that the money be put in escrow? How about insisting on adding interest or late payment penalties to the contract? I’m critical enough I could probably get whatever I asked for, though they may not want me to contract after the game is done.

Suppose I set a deadline and they miss it narrowly. Should I bother coming back? And if I come back, should I demand assurances, as above? There are arguments both ways. Usually if a company is late on payments it’s because they are going to fall further and further late over time. Plus if they can’t meet a deadline to the point of losing key personnel, it doesn’t say much for their solvency. However, they did pay in the end and causing their game to likely fail regardless is kind of an asshole thing to do to a customer. Assuming of course they stay in business long enough to finish it.

In the last extreme, if I don’t get paid at all, yet the company stays in business should I file a lawsuit? That’ll definitely ruin relations and any chance of them recontracting in the future (assuming they did eventually pay, but much later).

As further background:

1. The company is very large – if they really wanted to I know they could make the payments, if nothing else by selling assets or reducing the salary of the CEO. But my payment has a lower priority than that of their employees and management (who did get paid on time, at least this last pay period)

2. I don’t think the finance officer’s handling of the situation is very respectful. Maybe it shouldn’t be a factor, but I feel like I’d be a lot more motivated to be flexible if I was told something like “Sorry, we’re having problems making payments. I was told we might have the money by Friday, and I hope you don’t mind waiting until then. I’ll try to see that this does not happen again.” vs. “I hope you’ll get paid next Friday” which is he actually said. It’s just words and doesn’t change the reality of the situation, but it does affect how cooperative I feel about the situation.

3. I’m not relying on the contract, it’s just one revenue stream among many.

4. The contract didn’t have provisions for late payments