A bit of nostalgia

I recently stepped on a folder on my desktop, containing several old pieces of code, and most of them actually still worked well. So after several screenshots and a bit of nostalgia, here there are.

Video mapped landscape (with lighting)
Video mapped landscape (with lighting)
This small project was a test to ensure I could delegate per-pixel process to a pixel shader. I had to map the video on a model, use an orthographic projection, and make sure the shader will properly be applied to pixels in the video.
However, once I was done with the video mapping procedure, I couldn’t resist to map the video on a funnier model than the quad I was using. So here is my perturbated landscape, with a live video stream coming from a locally connected webcam.

Cartoon rendered model
Cartoon rendered model
When working on the Teapotware, we tried to separate the rendering from the world/scene design. We ended with a plugin based system that allowed the same scene to be rendered with Direct3D, OpenGL, or even sub-flavored renderers. The picture shows a simple scene (with only one object and one light) rendered with the our Direct3D – Toon rendering plugin.

Realtime Raytracer
Realtime Raytracer
At the engineering school, I worked on a raytracing renderer. It worked well, but it was full-software (not HW accelerated), and as a result, pretty slow. A couple of years later, I came up with a new idea: things could be partly accelerated with OpenGL: instead of calculating all the rays at once, the idea was to trace only a subset, and let opengl interpolate the colors between the rays. Then, once the scene/camera is still, the intermediate rays are traced, improving the quality of the overall render.

As you can see, there is no antialiasing, and the scene is not particularly impressive (a mirror on the back, a partially reflexive sphere, and a mat box). However, this is realtime.

Nowadays, it could be even easier with GPGPU, but I coded this years ago, when the only thing I could use was PS 2.0.

The maze project, first person
The maze project, first person

The maze project, top view
The maze project, top view
I worked on this project while I was in Japan, as a freelancer. The idea was to provide a tutorial-like app, with a set of constraints: a maze was described in a file, and a maze crawler (the white shpere) had to follow a path to collect objects in the maze at a given speed.

I also opened the source of a couple of those projects, and thanks to the teapotware, it was impressively clear and lightweight. For instance, the whole videomapped landscape project contains less than 180 lines of code.

I’ve recently (about 2 month ago) decided to remove the dust of the teapotware. There are things that can clearly be improved (the memory manager for instance), and even the design of some classes/interfaces can be discussed. On the other hand, the purpose of the library remains the same: to provide a robust crossplatform library applied to multimedia. I’m afraid I can’t give any release date yet (my weekends are pretty short these days), but it shouldn’t take that long.

Read More

Gametools 1.5 Released!

Months after the initial release of gametools, I am very pleased to announce the release of the 1.5 version.

What changed? Not much, but a lot in the same time. The biggest modification was in the XNB support. Files are now parsed directly, not loaded in an XNA app to extract things. As a result, many limitations of the 1.0 version were fixed. (loading an asset on a different platform or with different profile for instance). It changed a lot the architecture of GXView. GXView is more stable, and a wider selection of XNB is viewable.

SpriteFont and Audio can now be previewed/extracted! And I expect to be able to load/extract 3D models and cubemaps really soon.

HMEdit can now generate normal maps (here above). So the tool is not only dedicated to landscape generation, but can help you to create good looking materials.

And ScreenBuddy can now batch-create thumbnails. (Useful to create thumbnails out of a folder containing images, or to generate websites thumbnails)

The licensing terms did not change, nor the download page. I want to warmly thank every donator. It really helped to keep this project alive, and I hope you will like this new version.

The download page: here

Read More

Easy to use software licensing system

As promised, the beta version for SimpleLicensingSystem, aka SLS, is now available in beta. This first version is designed for .NET application, and will let you setup the licensing of your app in no time:

  • – Add SLSLib.dll as a reference of your project
  • – Create a instance of a TWLicense, with your product name and a private ID
  • – Test the presence of a license with methods such as IsTrial or IsExpired
  • – Allow your users to enter a license key to enable their license

A tool (SLSKeyGen) is included to generate your license keys.

A sample (in C#) is also included in the package. As you can see, it’s a less-than-10-lines piece of code.

The sample source
The sample source

More functions will come soon, such as a C++ API, a more optimized license format, and the possibility to use the license as a container for variables & files. Please contact me if you need more info about the project.

About the security:

The main goal of this project is to provide a very straightforward API. The license and the keys are heavily encoded, and shouldn’t be easy to crack, however the API itself is based on .net, and even it was obfuscated, it could still be reverse-engineered. On the other hand, it’ll do the job to protect your app from what a standard user can do. If someone skilled enough decides to crack your app, he will probably succeed, even if you spent big bucks in the security. That doesn’t mean I won’t improve the tool: the next version will be based on native code, with a lot more of security locks/checks. However, the main objective of this project will remain the ease of use.

Download the package (you’ll need the .net 3.5 framework)

Read More

Many news!

Hi everyone!

It’s been a while since I didn’t post anything on my blog. As a result, there are plenty of news I’d like to share.

First of all, I fathered my first kid a little more than a month ago. (Which mainly explains why I was so silent on this blog). The name is Akio, and both the mom and the baby are healthy. We’re now both discovering the real value of sleeping…

Celine Piat, from LivingColors took many superb photos of the baby. If you need a professional photographer to take pictures of your wedding/baby/family, I couldn’t recommend you more to check her website.

It’s not the only good news: I also registered Teapot-Hosting as a company. There is sting many things to do, and things don’t go as fast as I wanted, but the business is on its rail. The website was reshaped, business cards were printed, and every user of the service seem to be happy.

As for Teapot, while the hosting is still the main activity, I also planned to release the tools I designed to help me to handle the business. Namely EasyBiz, a piece of software to handle customers/invoices/transactions with many cool features (graphical dashboard, customizable API, reports, plugins…). SLS, The licensing API and the keygen I use to deliver license keys for the Gametools Suite will also be released soon.

I’ll post here as soon as the betas are available.

Read More

Paypal API: Made it simple with TeapotWare

Hello everyone.

I wanted to use the Paypal API from a C# project recently. Since they propose a SOAP interface for their API, I naïvely thought I could just consume it with the great “web reference” tool from visual studio.

However, I faced many disappointments: first, the WSDL contains errors, and if you want to use it in VS, you’ll have to manually download the wsdl (and every included definition files), correct the errors, and add a web reference from your locally modified WSDL.

This was not a good sign: clearly the people from paypal didn’t bother to check their WSDL, and on paypal forums, they suggest the complaining developpers to use their former web API (NVP).

I kept trying, and eventually could make VS create my web reference. But then faced another issue: the interface doesn’t match the informations you have. To access the API, paypal gives you an ID, a password, and a Signature string. There were several fields, but nothing was close to this, and there was absolutely no documentation.

On the paypal website, they suggest to use a .net 2.0 class library you have to compile, but I feel there is something wrong about this: First, what’s the point to publish a WSDL to expose a webservice if you need a special wrapper to use it correctly. Then, if we have to use a wrapper, then the old style API is more accurate, since it’ll avoid the SOAP overhead. And the binary they ask us to compile is fairly complex, so I really didn’t feel like using it.

Since I didn’t want to use the wrapper they suggested, and couldn’t consume their service directly, I decided to create my own class library to access the service.

It’s small, simple, and accurate (it uses the NVP).

So far, I implemented 2 method: TransactionSearch and GetBalance. The first will list all the transactions between 2 dates, and the second returns your current account balance. Both method are very straightforward:

PaypalMgr mgr = new PaypalMgr();
mgr.SetCredentials("paypal_api1.yyy.com", "MYAPIPASSWORD", "MyApiSignature");
double balance = 0;

// Prints the account balance
if (mgr.GetBalance(ref balance)) Console.Out.WriteLine("Current account balance: " + balance.ToString());
else Console.Error.WriteLine("An error occured: "+mgr.LastError);

// Prints all the transactions of the last you received during a month (until now)
List<PaypalTransaction> list = mgr.TransactionSearch(DateTime.Now.AddMonths(-1), DateTime.Now);
if (list == null) Console.Error.WriteLine("An error occured: " + mgr.LastError);
   Console.Out.WriteLine("Last month transactions\n---------------------------------------");
   foreach (PaypalTransaction pt in list) Console.Out.WriteLine(pt.ToString());

As you can see, it only takes a couple of lines to retrieve your balance or a transaction list. In order to use the PaypalMgr class, you only need to add TWCS.dll as a reference in your project. If you need to support more methods, don’t hesitate to contact me.

Download TWCS.dll: here

ps: for those who remember TeapotWare, twcs is the rebirth of the project, as a .net class library.

Read More