Author Archive

Workin and playin

I have been working, on my projects and on paid work, and it’s been good. My own project is moving along fine and I should have something new to show pretty soon. As for work, well it’s going. I haven’t got much to write about, what about is mostly some little quirks inside of Flash Professional itself.

But I want to write about this little game I found: The binding of Isaac. I am pretty sure it was made in Flash and a demo of it can be found on Newgrounds. It’s a pretty well done game and it reminds me of the dungeons in Zelda and Kid Icarus. It’s got that same feeling, with upgraded graphics. The lore is also pretty funny, it’s got a really skewed sense of humor but everything fits and I find it very funny. Now the concept is really simple, but because they created so many power ups (each with their own hilarious visual) it makes it so that every run of the dungeon is different and it adds a lot of replayability.  Anyway, that is the kinda game I aspire to make. I advise you to go buy it on Steam, it’s only 5$.

, , , , ,

2 Comments


On my own; two weeks after

So from my last post you know that I left B-Reel and that I am back in Montreal. I haven’t posted much because I haven’t been working much. It’s been really good times, but not that good work wise. There are a lot of reasons for that, but mostly because I am in what I would call a transition state. I am not living in my apartment yet (September 1st) and that causes my lifestyle to be quite different (lots of travel time, no desk, no office, no gym, lots of food). But I did get some work done just not that much as I could have.

Building games is not building websites

It is quite different to be franc, mostly because the challenges are different and because of that I haven’t found much topics to write for this blog. I think it is my fault a bit, I chose to do a game that is very close to an application and doesn’t rely so much on the graphics. I thought this would be a better idea, because I could save a lot of time by doing so. The good thing also is that it is based on a lot of interfaces (visual, not code) and I website building made me very good at making interfaces. The challenge that I face is more about where to put the logic and how to organise my code.

Finding how to make it work (or make me work)

My trick right now is to go to a coffee place and work from there. That has been working quite well for now, but starting Tuesday I will have an office space and I really look forward to it. Working from home is just not doing it for me, I watch TV or do some other random stuff that I won’t do if I am in a working place. Now all I have to figure out is how to wake up earlier in the morning.

, , , ,

4 Comments


Goodbye B-Reel and on to the next one, again

Yeah, big news, I will be leaving B-Reel and New York and going back to Montreal mid-August.

But why o why?

Well, really nothing against B-Reel, these guys are awesome, but it has more to do with the realization that I might not be at the right place. I mean B-Reel is the best production company in the world and they paid me a trip to London and the Alps, so if I’m not happy there, maybe the problem is not them. But I do have a lot of gripes with the Advertising Industry in general, a lot.

First, the more I do it (build marketing experiences) the more it grows futile. Secondly, it’s a pretty savage industry if you consider how it handles it’s people. Yes it pays well, but the hours and the pressure are pretty high, which is very alienating. I don’t think I have any power to change this and I don’t feel the urge to participate in this system. Thirdly, I’m pretty tired of being told what to do, part of that comes from the fact that this industry is stuck in a old model where the creative director is the rockstar and tech people are tools (it is getting better), but also as long as there will be a client there will be someone to tell you what to do.

So what is next?

Nothing really, or everything I guess. Haha, if I wanted to be more vague I wouldn’t know how to write it. I won’t be getting a job, that I know for sure. It’s a funny thing to tell people, they don’t really get it. The thing is, I have a plan, now I just have to do it. I want to make games. It’s been something I have been wanting to do for a long time, I even started multiple ones (mutant farm, doodle destroy, a nameless rpg) but never got to finish any of them because of time and life constraints. Well now I am giving myseld the time to finish them properly. While in New York, I was able to put some money on the side, so it only make sense that I return to Montreal, where life is cheaper, and spend some time doing personal projects. I am at a good place in my life to do so.

The plan in detail

Basically rent a desk somewhere not to expensive and get things done 7 hours a day, go to the gym, take some mix martial art class, pass my driving licence test (cause the joke as gone on long enough, I’m 30 and I don’t know how to drive), write more on the blog and finally maybe do some freelance if I really need to put bread on the table ( I think I should be ok on that side, at least for 6 months). If I can do that and get a game or two out, than I don’t care about the outcome, the worst that could happen is that I find another job, but let’s hope it doesn’t come to this haha!

5 Comments


A little about web fonts and @font-face

Hey I know it is not Flash related but I did a little research about web fonts and since I found a lot of bad information out there I thought it would be a good thing to post more good ones.

Ruling out the easy solutions

So basically my goal was to do as Flash does and have a website that uses a font that is not commonly on every computer. I had heard that you could do that now, so I set out on that quest. First thing I checked out was Google Web Fonts but the font that  the designer had chosen was not in there (obviously, why should it ;) ). Same thing with Typekit. I would have felt pretty comfortable using these services, they seem to make it easy and they handle browser compatibility, but I guess it would have been too easy. So I had to learn the hard way.

The hard way is not so hard after all

So my next hint was to investigate the css @font-face thingy (I have no idea how to call this: attribute, selector?). It looked good until you figure out that every browser interprets it differently and when I say every browser I mean Internet Explorer. The thing is it requires a different type format EOT (Embedded Open Type) which I had never heard about and if you don’t use it, it just won’t work. So after searching a bit more on EOT topic I found the solution to all my problems : Font Squirrel. Font Squirrel is basically @font-face made easy. You basically upload the font that you want and it is going to generate all the font files that you will need plus some examples on how to use them. It’s pretty neat. One thing to note is that if you put it in Expert mode you can tell it to just generate TTF and EOT which should be enough and will lower the number of files you need.

Here is what the css for @font-face look like:

@font-face {
    font-family: 'TradeGothicLTStdBdCnNo.20';
    src: url('../font/tradegothicltstd-bdcn20-webfont.eot');
    src: url('../font/tradegothicltstd-bdcn20-webfont.eot?#iefix') format('embedded-opentype'),
         url('../font/tradegothicltstd-bdcn20-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

And here is how you use it somewhere else:

.pageDescription{font-family: 'TradeGothicLTStdBdCnNo.20', sans-serif;}

Lastly, if you are going to use that font on the web, you will need the rights to do so. Some fonts are rights free but I guess most fonts aren’t, you’ll need to find a site where you can buy the rights to use them online.


				

, , , , , , , , ,

No Comments


Wonka – The Imagination Room

My latest project was for Wonka and is basically a 360 video player. It was fun and little and made me explore a bit. I got to play with Stage3D to compare the speed, plus I tried the new native mouse cursor (MouseCursorData). None of that made it in the final site but still was fun to try out. So here you go explore the Imagination room and don’t forget to look around:

Wonka – The Imagination Room

, , , ,

4 Comments


A language of my own

Today I was checking out an introduction video to CoffeeScript and it got me thinking about programming languages in general and where they were heading. The thing is, I think I would go in a different direction. Haha, that’s a pretty bold statement and I don’t know that many programming languages to be frank, but the last two I checked out, Python and Coffee Script didn’t have the same values that I think a future programming language should have.

You see if I look back in time ( with my time machine glasses) at first there was byte code, which was the summum of being cryptic, after that there was assembly code, which I manage to pass the class by acting as if I knew wtf it was meaning. C code was already more readable but still pretty hard to juggle with and I ended up with Java / ActionScript / C# which were the most readable in all the languages I had learned. When I say readable in all this I mean closer to the English language. That for me should be a primary value when creating a new language. I think the more readable a programming language is, the less barrier there is to creating code. You wouldn’t need to translate what you think into something else, you think, talk, write and program in the same language, that would be the best I think.

There is all lot of really easy thing we could do to turn Java into something already more readable without changing the syntax. Most of it would just be replacing shortcuts like for if statements “==” would be “is equal to” so

if (myCat == yourCat)

would become

if (myCat is equal to yourCat)

I mean this is a pretty simple example, but push this further and say we add a lot of these changes where we remove symbols like > < =  / ! || && and put words instead, I think it would make code really easy to read. I think that if it is easier to read, it is easier to grasp and if it is that way you can build more complex programs more easily. When all those simple swaps are done we could work on the syntax to make it more like English and then we would have a new programming language. I would like to reclaim the dot (“.”) to mark the end of a sentence like Latin languages.

So yeah I think we should create a new programming language where you have to write more code to get things done but that has less abstractions. That might sound stupid but I think it doesn’t matter, where the language gets longer to write the code editor should pick up and do code completion to speed things up, like FDT does so well for ActionScript.

Anyway, I will probably never do so because I am not a compiler genius, but I think it would be great to head in that direction and see where it leads. Anyone thinks the same? Anyone knows of a languages that tries to do this as its primary objective?

, , , , , ,

4 Comments


Lady Gaga and MAC VivaGlam

It took me a long time to post this work we finished a couple months ago, but we were still working on it so it did feel completed. Probably the biggest project I have ever worked on, mostly because of the 9 languages part (Chinese and Hebrew are very challenging). So here it is MAC VivaGlam!

, , , , ,

2 Comments


Away3D and Stage3D (Molehill)

I posted an article earlier this week about Away3D and the VideoMaterial and since I also made tests on Stage3D (Molehill) while doing that research, I thought I would post them here. My point with all this is to show that working with the new version of Away3D is going to be a little different. Here is the code to do mostly what the other post was doing, mostly mapping a texture to a sphere and having the camera in the middle (not a video here, just a bitmap).

public function Main(){
  stage.scaleMode = StageScaleMode.NO_SCALE;
  stage.align = StageAlign.TOP_LEFT;
 
  view = new View3D();
  addChild(view);
 
  view.camera.z=0;
  view.camera.y=0;
  view.camera.x=0;
  view.camera.lookAt(new Vector3D(0,0,1));
 
  light = new PointLight();
  light.radius = 200;
  light.color = 0xffffff;
  light.castsShadows = false;
  light.position=new Vector3D(0,0,0);
  view.scene.addChild(light); 			
 
  spherecontainer = new ObjectContainer3D();
  view.scene.addChild(spherecontainer);
 
  var material : BitmapMaterial = new BitmapMaterial(new Albedo().bitmapData);
  material.bothSides = true;
 
  sphere = new Sphere(material);
  sphere.radius = 500;
  spherecontainer.addChild(sphere);
 
  addEventListener(Event.ENTER_FRAME, _handleEnterFrame);
  stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
  stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
}

To get starting for Molehill I followed the simple instructions and used the FDT template found on the powerflasher’s site. As you can see if you compare the code, there are some differences. You don’t need to create a scene and a camera, they are already there for you. You need a light and you add that light as any 3D objects (no more using addLight). Lastly, which was my biggest problem, your texture need to be a square otherwise it won’t show. That was really bad for me cause I wasn’t seeing anything and the textures I was using were working fine in Away3D 3.6. But in the end I made it work. Anyway, Adobe needs to release that shiz fast cause it’s awesome!

, , ,

No Comments


VideoMaterial with Away3D (version 3.6)

I was trying to map a video to a sphere today, so I wanted to use the VideoMaterial in Away3D, but I wasn’t finding any example on it. Also seems like it is not that straight forward so let me put an example here.

Here is the base code for it (I guess SphereView could be compiled):

public function SphereView() {
  scene = new Scene3D();
 
  camera = new Camera3D();
  camera.fov = 35;
  camera.z = 0;
 
  view = new View3D();
  view.scene= scene;
  view.camera = camera;
  addChild(view);
 
  material2 = new VideoMaterial({lockW:2000, lockH:1000});
  material2.loop = true;
  material2.file = "../flv/test2.flv";
  material2.smooth = true;
 
  sphere = new Sphere();
  sphere.material = material2;
  sphere.radius = 2000;
  sphere.segmentsW = 40;
  sphere.segmentsH = 20;
  sphere.invertFaces();
 
  spherecontainer = new ObjectContainer3D(sphere);
  scene.addChild(spherecontainer);
 
  addEventListener(Event.ENTER_FRAME, _onEnterFrame);
  addEventListener(Event.ADDED_TO_STAGE, _onAddedToStage);
}

I had to fiddle a bit with the Away3D VideoMaterial.as to make it accept my very wide video. Find the function playStream and replace it with this one:

private function playStream():void {
  _netStream = new NetStream(nc);
  _netStream.checkPolicyFile = true;
  _netStream.client = CustomClient;
  _netStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler,false,0,true);
  _netStream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, ayncErrorHandler,false,0,true);
  _netStream.addEventListener(IOErrorEvent.IO_ERROR,ioErrorHandler,false,0,true);
  play();
 
  if(video == null){
    // Setup video object
    video = new Video(_lockH, _lockW);
    video.smoothing = true;
    sprite.addChild(video);
  }
 
  video.attachNetStream(_netStream);
}

All I needed to do was add _lockW and _lockH to the Video constructor, but it improved the quality of the played video (it was 320×240 before, the default value of Video). Now with this you should be able to start mapping your own videos inside of a sphere. Oh yeah if you want it, here are the functions that are missing in the first snippets, they basically enable you to move the camera around.

private function _onAddedToStage(event : Event) : void {
  view.x = stage.stageWidth / 2;
  view.y = stage.stageHeight / 2;
 
  stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
  stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);			
}
 
private function _onEnterFrame(event:Event):void{					
  if (move) {
    spherecontainer.rotationX = (mouseY - lastMouseY)/10 + lastRotationX;
    if (spherecontainer.rotationX > 90)
      spherecontainer.rotationX = 90;
    if (spherecontainer.rotationX < -90)
      spherecontainer.rotationX = -90;
    sphere.rotationY = (lastMouseX - mouseX)/10 + lastRotationY;
  }			
  view.render();
}
 
private function onMouseDown(event:MouseEvent):void{
  lastRotationX = spherecontainer.rotationX;
  lastRotationY = sphere.rotationY;
  lastMouseX = mouseX;
  lastMouseY = mouseY;
  move = true;
}
 
private function onMouseUp(event:MouseEvent):void{
  move = false;  
}

, , ,

4 Comments


TLFTextfield blocking “ENTER” Keyboard event

Probably my last post about TLFTextfied for a little while. This is going to be a quick one and was actually found by my colleague Will Adams. Also he found the solution somewhere else on the web but I can’t find it anymore so I thought it would be good to post it here too.

So here is the problem, if you use TLFTexfields as input fields for your form and you want to listen for the user pressing the “ENTER” key to submit the form, if at that moment the focus is on the input field, you won’t be able to listen for it. So normally, you would put the Keyboard event listener on the stage so that it doesn’t matter which textfield the user is on, if he presses “ENTER”, it will submit the form. Turns out that for some reasons, TLFTextfield will block that event from firing. Funny thing, is that it doesn’t block other key press events from firing just the “ENTER” (or “RETURN”).

Now for the quick fix:

_tlfTextfield.getChildAt(1).addEventListener(KeyboardEvent.KEY_UP, _onKeyPressed);

So you will have to add this to every of your textfields, which is a bit annoying, but it will make it work. I don’t know how the guy that found this found it, but I’m sure glad he did.

,

2 Comments