|
I'm writing a game, and have encountered a few nasties along the way.
I started off in WinForms and C#, but that was too slow so I replaced GDI+ DeviceContext with WPFs DrawingContext. All it does is draw lots of bitmaps and I thought (probably stupidly) that'd work fine. Then, when I got Windows 8 I discovered that DrawingContext didn't exist any longer.
So, it has to be DirectX which implies having to use C++, but in fact there's an open-source interop layer called SharpDX which takes that away, so now it's C#/DirectX through SharpDX.
That, actually wasn't too hard once I got my head around how DirectX works, sadly the thing which has caused me the most difficulty is something which should be easy.
The bitmaps and config sit in loose files next to the .exe, and I load them in when the game starts. All the normal FileStream/BinaryReader stuff I would normally use for this had either gone, or was unusable (I can't remember). Instead I have to use StorageFile, StorageFolder etc. which all use the new async/await pattern.
This is supposed to make asynchronous programming 'easy', but I found it to be anything but. Indeed your async method gets turned into some sort of hideous state machine and it's very hard to understand the execution flow. That and you can't call an async method from a synchronous method at all easily.
I have a Surface, and just on this device the sound breaks up, like the machine isn't getting there in time to fill the buffers properly. I've spent ages trying to fix this or work around it but no luck so-far. I'm hoping a firmware release might fix it one day.
Still, all that said it's going pretty smoothly and I've abstracted all the horror into a single assembly so that the actual game logic is just the usual C# stuff.
Interestingly, any concerns I had about the performance of C# have gone away. About 90% of the cycles are spent in DirectX so that's just fine. But I am alarmed by the ease of reverse engineering by unlocking the WindowsApps folder and using something like Reflector. I've heard rumours that obfuscating can get you into trouble in terms of certification, but that's unverified.
I also understand that if you offer your product as a "try it free" item a simple hack can convert it into the full featured app without paying for it which is pretty poor.
A lot of effort has gone into it, so I hope it doesn't tank when it comes out. If so, that'll be my app writing days over.
Regards,
Rob Philpott.
|
|
|
|
|
Today, I'd like to talk about a different behavior that seems irrational to me. There is a view that when you write software it should be designed around your database, simply because that is where you are storing your data. It sounds harmless, but the effects are quite negative over time. The first offense that always happens is your code starts to be structured the same as your database. Databases use a relational model, object oriented code uses an object-oriented model. These are not the same thing at all. Before doing something with your database, ask yourself: Would I do this on the filesystem?
|
|
|
|
|
Can't view this at work, WebSense blocks it as category "Sex"
|
|
|
|
|
I like that article: it describes the problems encountered with a database-centric design very well.
|
|
|
|
|
It’s been more than half a year since my last comparison of the C++11 support across different compilers. This time I’d like to see how different compilers stack up based on the documentation for the pre-release versions of these compilers.... I’ve also thrown in v.13.0 of Intel’s C++ compiler out of curiosity, although it isn’t pre-release and there were a few features I couldn’t find information about. I didn’t find any information about the upcoming version of this compiler. GCC and Clang are in the lead... which will come out on top?
|
|
|
|
|
From eConsultancy:
14 lousy web design trends that are making a comeback[^]
Quote: It’s a case of déjà vu. A decade ago the rise in popularity of Flash steered many web designers down the wrong path. It wasn’t the fault of the technology, but of the people using the technology. Just because you can do something doesn't mean you should. I'm all for innovation, but innovation should not be regressive.
--------------
TTFN - Kent
|
|
|
|
|
|
I remember back when RSS was amazing and something you paid for. I also remember when Google Reader showed up and very quickly started taking over. It was free. It was Google (back before we were all scared of Google) and it wrecked the market for all of the paid RSS services. We all wondered how Google monetized its Reader expense but we wonder that about most Google services so we all cancelled our paid services and lept. Now Google is yanking the cord. The end of Reader is bad for readers, but is it even worse for online writers?
|
|
|
|
|
I am a regular user of Google Reader.
Now searching for good web alternative.
Any sites please?
|
|
|
|
|
|
Yes bitterskittles. The Old Reader is good.
But the thing with NewsBlur is it is a paid service.
|
|
|
|
|
Look, we’re not going to really make any profound changes happen at Microsoft, I get that. Pragmatically, I’ve been recommending that users of the firm’s platforms learn the new way of doing things because this is indeed the future. And to that end, I’ve written over 60 Windows 8 tips and over a dozen Windows 8 feature focus articles, with more to come in each series. NT’s not coming back, I know. But you can get closer to the NT ideal by using ModernMix and, if you’re really hardcore, Start8. There are huge benefits to being on Windows 8 even if you’re not touching the screen. Don’t let Microsoft’s ham-handed design decisions get in the way of a good experience.
|
|
|
|
|
Terrence Dorsey wrote: this is indeed the future
No it's not, taking a dumbed down interface and shoving it down the throats of users is, if anything, going to make them stick to what they already know.
=====
\ | /
\|/
|
|-----|
| |
|_ |
_) | /
_) __/_
_) ____
| /|
| / |
| |
|-----|
|
=====
===
=
|
|
|
|
|
It is possible to play SimCity offline indefinitely, according to a video of a modded version of the game posted to YouTube. Modder UKAzzer uploaded the video which shows him disabling the game's disconnection timer. Previous tests confirmed that SimCity will kick a user from the game after roughly 20 minutes of offline play; however, while its impact on a number of features in the game means this offline mode is still not ideal, the video demonstrates some form of unlimited offline play is indeed possible. Sharks with frikin lasers attached to their heads add-on can't be far behind.
|
|
|
|
|
Everybody knows the value of pi is 3.14… er, something, but how many people know where the ratio came from? Actually, the ratio came from nature—it’s the ratio between the circumference of a circle and its diameter, and it was always there, just waiting to be discovered. But who discovered it? In honor of Pi Day, here’s a semi-brief history of how pi came to be known as 3.14(1592653589793238462643383279502884197169…and so on). Irrational, but fun.
|
|
|
|
|
Terrence Dorsey wrote: Everybody knows the value of pi is 3.14… er, something, but how many people know where the ratio came from?
Not a promising start that, anyone with half a brain knows that one of the most notable things about pi is that it not a ratio.
|
|
|
|
|
Rob Grainger wrote: Not a promising start that, anyone with half a brain knows that one of the most
notable things about pi is that it not a ratio.
pi (π) is Irrational which doesn't mean that it is not a ratio, BUT that it is not the ratio of two integers.
|
|
|
|
|
The symbols for the arithmetic operations of addition (plus; “+”) and subtraction (minus; “–”) are so common today we hardly ever think about the fact that they didn’t always exist. In fact, someone first had to invent these symbols (or at least other ones that later evolved into the current form), and some time surely had to pass before the symbols were universally adopted. When I started looking into the history of these signs, I discovered to my surprise that they did not have their origin in antiquity. Historical notations on mathematical notations.
|
|
|
|
|
Welcome to our continuing series of CodeProject interviews. We talk to developers about their backgrounds, projects, interests and pet peeves.
|
|
|
|
|
LINQ to Entity is a great ORM for querying and managing database. It offers a lot of things, so it is mandatory to know about performance of it. These are right up to a certain point as LINQ comes with its own penalties. There are some tips and tricks that we should keep in mind while designing and query database using entity framework ORM. Here is a list of some tips that I would like to share with you. 10 things you should always... no, no... never... do with your ORM.
|
|
|
|
|
Thanks for sharing such a nice article.
Explore, Dream. Discover.
|
|
|
|
|
Something disgusting, like six years ago, I listed on 43Things that I wanted to write a video game. I’ve actually made numerous arrested attempts ever since I started programming with my TI-94a back in 1983. My last attempt has been much less arrested (though still incomplete). I’ve learned a lot in my most recent endeavor, so it’s time to share. You can follow the actual work in progress, but my plan it to recreate the steps I’ve gone though over the course of a few posts. Christopher is on part 3 of his HTML/JavaScript game series. Start here to catch up.
|
|
|
|
|
Web apps can be split into two major components: a front-end that displays and collects information, and a back-end for storing the information. In this article, I’ll demonstrate what a relational database is, and how to properly design your database to store your app’s information. A database stores data in an organized way so that it can be searched and retrieved later. It should contain one or more tables. A table is much like a spreadsheet, in that it’s made up of rows and columns. All rows have the same columns, and each column contains the data itself. If it helps, think of your tables in the same way that you would a table in Excel. If you think "foreign key" sounds like music theory, JOIN us for this handy database primer.
|
|
|
|
|
Developing COBOL applications has, until now, been largely constrained to the desktop environment. One of the latest projects from the Eclipse Foundation is an online code editor named Orion. The Orion project aims to provide an environment for web based development tools. This means producing a platform that can be extended by developers, like us, to enable users to edit their code on the web.... We set out to change the limitations of developing COBOL applications on the desktop environment. You heard it here first: COBOL is the future.
|
|
|
|
|
There’s a lot of talk these days about what makes a good “culture”, whether you’re an engineer, a software developer, or a chef. It’s all about finding a work environment that not only is conducive to getting stuff done, but also makes it a pleasure to get up in the morning and get there. In this article, we’re going to take a look at a few prominent developer voices that have discussed the idea of what makes a good developer culture. Is it the perks? Is it being extra “geeky”? Is it looking for collaboration where collaboration doesn’t normally happen? Or is it a combination of all these factors plus something more? What kind of workplace brings out the best in your coding?
|
|
|
|