Chessmind3D, 1 month later
2012-03-23 00:39:32


It's been a little more than one month since the launch of Chessmind3D on the Android Market (or let's call it Google Play).

With 3 822 installs by now, It's a mixed feeling : a good success, that I should be happy with, but not the takeoff, I've dreamed.

Daily revenue are a bit erratic, but most of all, this figure is not impressive at all, and showing no sign of improvement while my user base is still growing.
Presenting Chessmind3D my new Android application
2012-02-13 03:11:40


Available on Android Market:
https://market.android.com/details?id=org.nicolasmy.chessmind3d


Chessmind3D is a free chess game for your Android device.

Enjoy the most visually impressive chess game available on the Android ! Play against CPU in a stunning 3D environment.

Play the way you like:
* Pause and resume the game at will
* Switch from landscape to portrait.
* Zoom and rotate the board in any direction

For full visual effects and a better usability, a Tegra 2 device with at least a 5 inches screen is strongly recommended.

Chessmind3D is featuring:
* Solid AI play
* Beautiful 3D graphics (with high-end devices)
* Seamless pause and resume
* Portrait and landscape support with "on-the-fly" tilt
* Pinch zoom and rotate gestures support
Kivy contest : LandingZone ranked 8...out of 11
2012-02-07 11:32:07
I can't help feeling kind of bad about the results, I wouldn't mind the ranking if the others applications where amazingly innovative or featuring ground-breaking graphics.
The mark LandingZone received places it right into the line of the "very" rough game attempt. Whereas LandingZone is really meant to be a playable game with an original game concept.
I know:
- The physics engine is buggy
- It lacks graphics assets
- Presentation/menu screens is not at it's best

But it features:
- Innovative touch oriented concept
- It's simple but own graphic style
- Some nice effects (smooth camera motion, particles)
- Very generic/flexible code : I've realized that I genuinely tends to write code with reusability in mind => Using separate components and class inheritance, even when writing short timing code. Yet my engine could really be used to make an Angry birds clone with very few modifications.

Anyway I'm thinking about completing it, that is :
- Fix the physics engine
- Add some more graphics
- Work on more levels and challenges (I've got different ideas : wind, very low gravity)
- Release a stand-alone prepackaged version on the Android Market (add supported (?))

The main things that concerns me about releasing an Android version is:
- Kivy Framework/Python on Android is sloooooooow ! The game barely reaches 30fps on my tablet and I don't think it's only because of lack of FPU on the Tegra 2.
- Does Kivy feature a consistent way for my application to know the actual screen resolution on Android ? Because I couldn't find out.

I've mailed Mark Virbel, the organisator of the contest (wich is actually French as me huhu!) to know his feeling about my game, I get clear answer, thanks to him:
-----------------------------------------------------------------------
Hi Nicolas,

We (as all the judges (5 peoples)) have judge you on 5 criterias and you've got low score on Usability and Usage of Kivy logic/language.

My personal point of view is that:
* your graphics are awesome, but you just stop here, the win/fail is hard to read, no main screen (game title), no explanaition, just play/quit, no sound, low interaction, no score
* the code is mostly "Python", not kivy: no usage of EventDispatcher or Widget baseclass, duplication of Vector2D (kivy.vector)...
* you're rebuilding the graphics every frame, and not reusing the previously generated graphics (The way with a single main loop and drawing everyframe are not what we are doing with Kivy. )
* the whole game is mainly not using Kivy: you basically embed your "generic xml" app into a single kivy widget. Mean your whole game is not using kivy tree, events, properties. It's like you've a system based on xml + physics engine, and you just use kivy graphics to display content at the right place. Using pygame wouldn't change your code a lot.

Anyway, your game is fun to play :D You can still continue without using the Kivy logic (contest is over so...), and release it on android market? :)

If you go more inside Kivy, then i would be glad to hear what you're missing in the toolkit :)
LandingZone : my entry to the Kivy 2012 programming contest
2012-02-02 00:15:01

I've manage to release something for the contest. It was overall, a ridiculously hard work, lots of time spent, nights, week-ends. Working in a contest does makes the thing even more thrilling, with the last bugs fixed in the very last hours before the deadline.
LandingZone is by no mean an Angry Birds clone, but does features physics based gameplay.

Yes the code is available on GitHub.
http://github.com/kobr4/LandingZone

Without such a short deadline, I think that I would've never been able to learn so many things in so little time : new language, new framework, new physics engine algorithms, even some home made vector graphics, that says something.

Python is a very simple and elegant language and Kivy( http://kivy.org/ ) is very simple yet powerful framework for designing user interface, a very pleasant experience.

I am anyway relieved that it's finally finished so I can move to other stuff. Fu !
How to make Angry Birds
2012-01-18 11:10:47


In mobile games, the enormous success of Angry Birds is something that I'd love to reproduce. The addictive principle of this game rely on simples but efficents coding techniques :
- Attractive and smooth user interface
- Solid 2d physics engine.
Actually Angry Birds is using a famous and free library for its physics management : Box2D, which has created a fuss because, Angry Birds makers didn't give any credit for Box2D author.

Nevermind, here is a valuable collection of articles about implementing these two aspects of Angry Birds.
http://www.wildbunny.co.uk/blog/2011/05/12/how-to-make-angry-birds-part-1/
Book review: The Pragmatic Programmer: From Journeyman to Master
2012-01-11 12:08:40

Written by Andrew Hunt and David Thomas

Here is the synopsis:
"Straight from the programming trenches, The Pragmatic Programmer cuts through the increasing specialization and technicalities of modern software development to examine the core process—taking a requirement and producing working, maintainable code that delights its users. It covers topics ranging from personal responsibility and career development to architectural techniques for keeping your code flexible and easy to adapt and reuse. Read this book, and you'll learn how to"

As a passionate professional, I always look for ways to improve my skills and work efficiency, therefore I could walk straight to this book just seeing its appealing title.
I must say that I already to follow most of the book guideline:
- DRY : don't repeat yourself
- Write flexible, dynamic, and adaptable code
=> That's pretty "Master of the obvious" if you ask me.
Some other advise are interesting:
- If it's broken, fix it : I often walk trough pieces of code that are not satisfying or even completely broken. I tend to postpone any improvement because of other pending task, but the author brings a rightful metaphor for this: when a public real estate, a glass is not replaced another glass gets broken, and people tends to be more and more careless to the point of the place being a complete dump, whereas when things are immediately fixed, people tends to keep the place clean.
- Use the right tool for the job:
master of text editor: text editor is the most used software, but I used so many different ones that I've mastered none. Mastering shortcut and macro is the key of higher productivity.
use code generator: I've never used code generator extensively but I must say that it's very useful for doing repetitive and uninteresting coding part while increasing code reliability
- Always learn bleeding edge technology: as most of people I think, when I get comfortable with a programming language/framework, reaching a high degree of productivity, I'm reluctant to get into new stuff, starting from scratch and advancing very slowly in my project. The time spent struggling with a new technology is never lost but account for a programmer's experience. Technologies that I should learn about: Boost framework is supposed to be state of the art C++, Ruby on Rails : this web-based Ruby framework enjoys a growing popularity.
Frame by frame animation with Kivy Framework
2012-01-06 02:11:05
I've been toying around a bit with the Kivy framework (http://kivy.org). Kivy is basically a portable Python framework designed around "Natural User Interface" that is touch/tilt and other smartphone-like interface.
One big point of using Python is of course the ease of programming : no need to setup a full Eclipe/Android SDK, just install the Python interpreter and Kivy, grab a text editor of your choice and you are ready to develop cross-platform touch oriented applications. You even can imagine coding an application from an Android device itself.
It's also great for fast prototyping.

Here is my first app, showing how to animate a sliding rectangle around the screen.
 
from random import random
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.graphics import Color, Ellipse, Line, Rectangle
from kivy.graphics.texture import Texture
from kivy.graphics.instructions import Callback
from kivy.clock import Clock
 
class YourWidget(Widget):
texture = 0
position = [0, 0]
def __init__(self, **kwargs):
super(YourWidget, self).__init__(**kwargs)
#self.update_graphics()
#self.bind(pos=self.update_graphics,size=self.update_graphics)
# create a 64x64 texture, default to rgb / ubyte
self.texture = Texture.create(size=(64, 64))
 
# create 64x64 rgb tab, and fill with value from 0 to 255
# we'll have a gradient from black to white
size = 64 * 64 * 3
self.buf = [int(x * 255 / size) for x in xrange(size)]
# then, convert the array to a ubyte string
self.buf = '
'.join(map(chr, self.buf))
# then blit the buffer
self.texture.blit_buffer(self.buf, colorfmt='
rgb', bufferfmt='ubyte')
# that'
s all ! you can use it in your graphics now :)
# if self is a widget, you can do that
Clock.schedule_interval(self.update_graphics, 1 / 60.)
 
def update_graphics(self, *largs):
self.canvas.clear()
with self.canvas:
Rectangle(texture=self.texture, pos=self.position, size=(64, 64))
self.position[0] += 1
self.canvas.ask_update()
 
class MyPaintApp(App):
def build(self):
return YourWidget()
 
if __name__ == '__main__':
MyPaintApp().run()
 


Just copy these lines in a fu.py, then launch "python fu.py". Freaking simple knowing that any "hello world" Eclipse project ends up creating zillion of files and dependencies !
Kivy contest #1 is starting : rules published !
2012-01-02 17:18:56


RULES
----------


1. The participant must create a game, solo or multiplayer. Be creative!
2. The participant must licence the game under an OSS licence.
3. The participant must submit the game developed using Kivy by uploading it on Github provided space before the January 31, 2012, 23:59 GMT Deadline.
4. The participant is allowed to use Kivy and standard python libraries. Usage of pure python libraries are tolerated, if they are embed within the application.
5. The participant must respect the Application layout defined in Kivy documentation.
The game must run on latest Kivy (1.0.9), with the command "python main.py"
6. Usage of externals libraries using ctypes, compiled extensions or specific OS code are forbidden.
7. Usage of custom OpenGL is not allowed. Your application must be compatible OpenGL ES 2.0.
8. The game should be tested before hand. A failure to start will result in negative points.
9. Any Adult or Offensive content is forbidden. The game should be kids friendly.
10. Entries will be scored and prizes awarded by Panel of judges who are excluded from participating.

Really interested by this contest.

It's interesting in many aspects :
- Must be open source, so it's unlikely to attract commercials companies
- New/uncommon framework : everybody start equal, having to learn a new technology
- 1 month contest time span : very limited time, go to the essential.
- modests prizes : it's mostly for fun ( and for fame )
- Python only : great to learn a new programming language
Getting the R.A.T 7 Contagion to work in Ubuntu 11.10
2011-12-31 00:58:39

Even though I'm no more a die hard gamer, I just bought the pricey Cyborg R.A.T 7 Contagion mouse, honestly I just choose it because of its stunning look : there's nothing else like it. Freshly excited by my investement, I've almost faint when I saw that my expensive new toy didn't work properly in Ubuntu in a very weird way: buttons wouldn't alway respond, window couldn't get focus.

A little internet browsing and I could see to my relief that I wasn't the only one in trouble with this mouse (note that the availables solutions usually deal with the black model of the RAT7 and should be modified for the white RAT7)

So I've successfully workout the solution by editing the xorg configuration file:
 
sudo gedit /etc/X11/xorg.conf
 


Then adding the following lines:
 
Section "InputClass"
Identifier "Mouse Remap"
MatchUSBID "06a3:0ccd"
MatchDevicePath "/dev/input/event*"
Option "ButtonMapping" "1 2 3 4 5 6 7 2 9 10 11 12 0 0 0 16 17 18 19 20 21"
EndSection
 
Kivy Programming Contest
2011-12-27 11:44:45
http://kivy.org/#contest

A software company is issuing a programming contest. I might consider entering. Not for winning but the thrill of competition always bring something.

Goals of the Contest
* Encourage and give you an opportunity to learn more about Kivy.
* Build some fun and exciting apps that will run on Android, Linux, Windows, OSX (and iOS).
* Show to the world the kind of awesome things that can be built with Kivy in a short amount of time while having fun.
* Improve Documentation based on participants feedback during contest.
See 10 older news | Back to the top