AS3: bytesTotal not working with Flash 9 Public Alpha

Jan 18th, 2007

That's right, the flashplayer that goes with Flash 9 Public Alpha just doesn't show the bytesTotal real value, the value is always 0. It compiles everything fine tho.. Don't blame Adobe for that, that's what 'beta' means.

So, well, now you know, I hope I'm the only one that lost that much time with this thing. So, compile with the public alpha and then try your stuff with the systems/browser flash player.

#permalink

PV3D Panorama (Animated this time...)

Jan 12th, 2007

It's 8mbytes big so It will take a bit to load. And someone will ask... Why is it that big? Easy:

20 frames * 6 sides = 120 frames
120 frames = 120 textures
1 texture = 512*512 pixels

Well, it's amazing that Flash can handle all this that well! :D



View PV3D Panorama Animated


PS: To the people that has post a comment recently, don't worry I didn't lost them, I'm just re-doing the comment-moderation system Sorry about that.

#permalink

PV3D Panorama / 360 & How to create your own CubeMap textures with 3D Studio MAX

Dec 23rd, 2006

Longest post title in the blog for sure!

So, well.. this is a non-finished work (i'm looking to do something else with this) but I guess I got something interesting to show alredy...

Using Carlos' Panorama as base I've created my own one but also with my own scene and textures.


View PV3D Panorama with custom 3D scene
(It takes a while to load (600kb, 6 x 1024x124 textures there).

In a way, this is just a trick to have a scene of 186.122 polys, 20 lights, raytrace reflection and fog in realtime ;) Well, it's not, but you get it looks like. In a lot of games and demos they use this trick to simulate complex 3Dscenes when in fact they are rendering 6 textures to a cube and having the camera inside it.

So, if you were wondering about how to do this with your 3D scene, here it's a nice and simple how-to.

As some of you know already (and probably hate), I've used the Greeble to create the object (based on a tube). Then a couple of lights to the scene, created a material for the tunnel using raytrace for the Reflection and then adding the fog to the camera.

I'm not going to detail on all this, I would asume you know how to create 3dmodels and texture them... the point of the article if about how to get the 6 textures you need for doing the cube map of your scene.

So, after doing all this I end up with an scene like this:



At this point, what you have to do is create a box on the middle of the scene:



And then, create a new material. We only need to put a Reflect/Refract map on the Reflection slot for this new material.



Going inside the Reflect/Refract parameters we wil find everything that we need there. As you can see, 3D Studio MAX has a batch texture renderer in this section (kind of hidden). If you check the opfion "From file", then you will be able to specify where you want to save the textures and the prefix name (I've used frame01 as a prefix name). Then the last thing you need to do is after clicking on "Pick Object and Render Maps"... well, select the box, and it will generate all the maps for you.



And that's as simple as it's. This will generate these 6 images:
frame01_BK.png, frame01_DN.png, frame01_FR.png, frame01_LF.png, frame01_RT.png, frame01_UP.png (which are the Back, Down, Front, Left, Right, Up textures).

Now if you want to see how it looks, here you have the Source Code!
(this is just a small modification of Carlos original source code, so say thanks to him! :D Also, these sources doesn't include the PV3D AS3 classes)

You can also check out the .max file.

Enjoy! Doing 360 panoramic views with Flash hasn't ever been that easy! :)

PS: As a side note, one of the things I thought that wasn't doable with PV3D is in fact doable! Amazing!

#permalink

Interviewed at Promsite.org

Dec 15th, 2006

And another interview ;) Looks like xplsv.tv worth it :D Again, sorry for the people than can't read spanish :(

xplsv.tv in motion! interview

#permalink

Papervision3D + texture + dynamic flat lighting = doable :)

Dec 4th, 2006

I've tried another way of doing it and as I was expecting it runs much more faster now :) So I can see a future full of lights in flash ;)

dynamic flat lighting+textures, 2nd try


o/

#permalink

Papervision3D now with lights

Dec 4th, 2006

A good example of why marketing and the execution of the projects it's very important would be Papervision3D. Sandy has been around for a couple of months already, but they didn't find the good examples to impress the people. Papervision3D didn't really has anything you new. Probably it was faster tho, but everyone was talking about it :) And I can tell you that was because Carlos nice demos of it.

So, because this, and also for the fact of helping a bit the project of another spaniard I added couple of classes (light3D and color) so now it can render with lights (well, only 1 by now).

flat shading example

The bad news that I also implemented it to work with textures (something I didn't seen on the flash-3d scene yet). And the results doesn't look very well :(

flat shading + texture example

This is the very basic approach tho. There are still some things I can test with, but to be honest, I don't have too much hope on this :(

See how everything goes this month, as Papervision3D should be released by the end of it (I guess).

#permalink

Actionscript Basics - Class Files

Dec 2nd, 2006

Spring Digital approached me again with an interesting project. Preparing a Class for their designers to explain a little bit the basics of Actionscripting. I never did something like this before, I mean being a teacher and doing a 4hours session about anything. So I didn't know how it was going to work.

The first idea I had about it was doing my own powerpoint/keynote thingie (I called it keydoob ;)) to prepare slides and keep a bit of structure for the class. Then I had to prepare all the contents and that's where I had some problems as I just didn't know how to prepare something and guess that will take 4 hours to explain answering the possible questions, so as I added a bit more of content just in case.

I had to do the same class twice, for 2 groups of designers, so after doing the first one I amended a bit the slides and I was able to explain everything a bit better.

Although the class was supposed to be about the basics of Actionscript I think I really said a lot of stuff, if I was totally new it would probably damage my mind ;) But I wanted to give a bit of info about everything and stuff that they will probably find at some point, and maybe whenever they test about something they will remember the class and me saying something about it, so they would have a bit of idea or they will feel that they're doing things properly.

So, for the non-attendants (you), I'm afraid I don't have a video or anything of me blabling and blabling but the good news are that I will share the slides, the source file of keydoob, and also the files I created in each class, with the source code (.fla) so you can check some actionscript code if you feel like doing it :)

Actionscript basics 1.1 presentation

(LEFT & RIGHT to change slide)

Actionscript basics 1.1 presentation - source files

#permalink

Flash+PHP, secure high-scores

Nov 22nd, 2006

I've been doing a couple of flash games these days, and there is always that request of having to add a high-score system on the background. Sounds simple to do, but you will get the high-scores hacked very easily if you don't do it carefully. This is the research I've done by now:

The first thing we need to know is that Flash+PHP is totally insecure, you got a program on your client requesting server information. You can always use a program like live http headers in between to check what is the flash asking to the server. Another problem is that you can decompile the .swf with a program like Sothink SWF Decompiler to check out the code and have more information. However I found out this encrypter which by now is doing the job very well.

Long time ago I did another game and my approach on that time was loading a game_loader.php (instead of the .swf itself), and then checking the referer on that .php. If the referer wasn't the one I was expecting, then the .php wasn't giving back the .swf. I thought It was a great idea, but after finding out about cURL it doesn't look any good as you can fake the referers with it.

So the next idea was to try hacking one of the famous games out there to see how do they do it. If you ask me about famous games out there, my first answer will be probably Orisinal. Orisinal have been famous for their cute games, and in the background also have been famous for having non-hacked high-scores list. So that's where I went. So yesterday I spent a couple of hours trying to hack the bugs game. That's as far as I got... to request the table of highscores you only have to access to this link. And then, if you want to submit your score you need to acces to this link. The problem was that the las link wasn't really working as expected. One guess maybe that he could have a code that if there is some IP trying to access to link and without having all the information correctly (like for example seding the Host), then the system adds the IP to a ban-list and from there you can't go anywhere (otherwise I've no idea why isn't working, feel free to push all this further, but keep it serious, please).

After my unsuccesful attemp to hack Orisinal then I moved to the Yeti game. I checked the code long time ago and seemed quite easy to hack, but checking the code this time, I've found that many things to take care of that I just didn't have time to spend that time. So I forgot about it.

So. I guess, a combination of encrypting the .SWF, using a PHP to give back the .SWF in case you're asking for it from the correct URL, then adding a security code on each action, and as the last thing adding a ban list for IPs trying to do weird stuff will do by now. Also, in this case I've a username/password system, so the game only submits the scores if the user is logged. But to be honest I don't think that helps at all.

And that's kind of it, if you have any experience with it, or any suggestion, you know that I want to hear it!! ;)

(More details about hacking Flash Games Scores here)

#permalink

Flash: another nasty thing

Nov 17th, 2006

Anytime you want to copy paste the image you're working on Photoshop to Flash, don't do it by copy/pasteing, it will modify a bit the image sizes.. in instance, if the image is 700px of width, it will paste it as 699.7. And these kind of things make the final product very pixel non-perfect, specially when your flash needs to integrate with the html design.

So, to avoid that, save the image as PNG or something and then import in on flash. Very silly thing but it really means a lot!

#permalink

mrdoob.com, finally an ID

Nov 5th, 2006



Yey, I've finally done a logo/style for myself as webdesign/dev freelancer. Until last week I had phodoob as homepage and I didn't like the idea of having pictures of myself in parties and stuff when showing my website to clients ;)

Well, I didn't care that much but well, I made a holding page by now.. slowly but secure :D

#permalink
Pages:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Webs / Print / Logos... everything I do will be listed here.



If you're looking for my Actionscript experiments, here you have: