Search

3D Dice using PV3D

Posted by Nate Chatellier on April 3rd, 2008

Okay, so it’s actually one die not two dice (so far), but here’s the story. My employer is making a dice based game (which means I can’t release the source, sorry) that will be played on a touch screen. I whipped this little demo together fairly quickly using Papervision3D Great White.
But, I still have two major kinks to work out:

1. The rotation is not always accurate.
2. There are no true ground physics going on yet, so the dice can land on a corner.

Regarding (1): The way that the axis rotate in Papervision seems a bit odd to me. Try this:

-Slowly move your mouse “North” and note how the cube rotates.
-Now rotate the cube one face to the East or West
-Again, slowly move your mouse “North” and note how the cube rotates.

Repeat this process and you’ll notice that the axis itself gets rotated with the cube causing a different rotation to occur depending on which face is up. This makes sense, but the funny thing is, if you try to compensate for this by rotating it about the z-axis when certain faces are showing, you’ll notice that the z-axis does not seem to rotate, unlike the x and y-axis. Odd…

Regarding (2): The physics that are in it currently are basic “hack” physics that I wrote. I’m not (currently) using a full-fledged physics engine. The “bounce” that it has off of the ground is done with Tweener. I think I’m about to start evaluating using some real physics engines. I’m considering Box2DFlashAS3 or APE (Actionscript Physics Engine). Both of those are 2d engines so I’m not sure how much tweaking it would take for them to work in 3d. It looks like the WOW AS3 3D Physics Engine (which is based off of APE) does not yet support what I would need it for. The final option would be to convert the JBullet physics library from Java to AS3.

I think I will probably start with WOW, but let me know if you have any suggestions…

3D Dice thumb

Re: The Open Web is Slow

Posted by Nate Chatellier on April 3rd, 2008

This is in response to Ryan Stewart’s post: The Open Web Is Slow.

Thanks for the post Ryan. I agree with much of what you are saying and as a non-Adobe employee, I definitely agree that Adobe does better-than-most commercial companies at contributing and fostering the open source community. In-fact, the Flash community, by and large, is  a community that really believes in Open Source, whether it’s for silly experiments, or full blown engines like Tweener or pv3d.

However, I believe it would help the community if there was some sort of post explaining Adobe’s reasons for not open sourcing the Flash Player. I can speculate reasons, but it seems open sourcing it under the right licensing structure would be beneficial for everyone.

At the company I work for, we do a lot of development using Qt by Trolltech. They have a great licensing structure that states the following:

“The main licensing options available are:
* Commercial Licensing. This is the appropriate option if you are creating proprietary applications and you are not prepared to distribute and share the source code of your application.
* Open Source Licensing. This is the appropriate option if you want to share the source code of your application with everyone you distribute it to, and you also want to give them the right to share who uses it.”

Trolltech gets free contributions from the community to their source, and they foster a community that does free advertisement for the company (by the sheer nature of Open Source). Their commercial licensing is not cheap, so the company still makes great money. It’s a win/win for everyone.

Flash has such an extremely creative community that is always pushing Flash to its limits. I believe the tools that would be created if the Flash Player were open source would be incredible. At the same time, I love Adobe’s products and do not want the company to decline financially. But I believe the opposite would happen: even more people would desire to use Flash as the tools for developing it get better and better.

We’re Hiring: ActionScript 3 Engineer

Posted by Nate Chatellier on March 26th, 2008

Well, we’re basically always hiring (so apply even if this ad goes away), but given that the OSFlash Job Board just had a relaunch, we thought we’d try our luck at using it.

Here’s the contents of the job posting:

ActionScript 3 Engineer
DigiDeal Corporation, Spokane Valley, WA

Deal yourself a winning hand! Join DigiDeal and develop digital games for the gaming industry! DigiDeal is the worldwide leader in electronic table game development. Our Digital Table System and game portfolio are recognized around the world for engineering excellence and innovation. We offer fully paid benefits, matching 401k plan, and competitive salary/incentives. DigiDeal is an EOE. If you’ve got what it takes, get in the game and work with the most creative and dynamic casino game developers.

DETAILS
-Develop multi-player Flash-based games
-Write Flash apps for touch screen technology
-Code exclusively with ActionScript3
-Join a team that is always trying to push Flash to its limits!

REQUIREMENTS
-3+ years software development
-BS/MS in CS or equivalent experience
-ActionScript 3 (preferred), AS2, Java, or C++
-Strong OOP skills is a must
-Game development is a plus

You can also apply be e-mailing me directly: natejc at this domain name dot com.

Adobe MAKE SOME NOISE

Posted by Nate Chatellier on March 18th, 2008

I was also having problems with the SOUND_COMPLETE event. I discovered Andre Michelle’s post petition about it and promptly added my name to the list. There have been multiple other people posting about the problem also. Unfortunately, the only response that I could find from Adobe was by Brent Baker on a bug report for the issue that states:

“FlashPlayer issues should be reported here. Also you will need to provide much more information on the issue: http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

It seems that the bug was closed without actually looking into it. Bummer.

Adobe, MAKE SOME NOISE

Adobe MAKE SOME NOISE!

Automatic Flash X,Y Wireframe Preview

Posted by Nate Chatellier on March 14th, 2008

At the company I work for we use Functional Specification documents for any new Flash game that we make. Before any of the developers start any coding, the design team puts together a simple frame by frame Flash file to make it easy to see what things will look like in the various states of the game. This will eventually become screen shots put into the spec. There will be an additional section put into the spec that includes all of the top-left and center x,y coordinates for each MovieClip on the stage during each frame. That was usually a tedious part of the job that none of the designers liked doing. When they brought this to my attention, I decided to make a quick script to do this for them. Here are the results:

USAGE:

  • Copy and paste the code into frame 1 of any Flash file
  • Make sure all objects that you want wireframes for are Symbols (for some reason, the x,y is off if they aren’t)
  • Run the swf
  • Use the arrows keys to change frames
  • Use space bar to toggle wireframe view
  • You may press the space bar multiple times to get new random colors
  • You can click and drag on the x,y text to move it to a new location

SAMPLE:

Flash ActionScript 3 X,Y Wireframe Preview, 1

Flash ActionScript 3 X,Y Wireframe Preview, 2

demo | source (.fla) | source (.as)

Web Collage - Cool Idea

Posted by Nate Chatellier on March 12th, 2008

I stumbled across a site today by Jamie Zawinski that randomly pulls various images from the web blindly (I do not know the workings of the algorithm) and throws them together every 60 seconds or so into a collage. If any of the images spark your interest, simply click on it to go to the website. Pretty fun idea and a nice thing to have running in the background while you’re doing something else. I know that people have done similar things with flickr before, but it’s nice that this is not limited and that it doesn’t require any browser plugins. Here are a couple of sample screenshots:

WebCollage screenshot1

WebCollage screenshot2

Warning: Unfortunately there seems to be occasional “rated R” pictures. It would be better w/out that, but still a nice idea.

www.jwz.org/webcollage/

mouseEnabled and mouseChildren Affect CPU Load

Posted by Nate Chatellier on March 11th, 2008

I was reading a post from Keith Peters today and noticed a comment made by Ryan Taylor mentioning that mouseEnabled and mouseChildren affect the CPU load. I had to know if this was true or not so I promptly created an experiment app. The app randomly creates 700 parent sprites and 700 nested children sprites. You press the SPACE bar to toggle .mouseEnabled and .mouseChildren for all of the objects.

I couldn’t believe it. Although disabling these properties did not seem to affect the FPS, it definitely affected my CPU. When tested on my WinXP,SP2 machine with a P4 3.4 HT CPU, the swf was taking 13-16% of my CPU. When I set mouseEnabled and mouseChildren = false, the CPU load dropped to 4-6% total! It cut down the CPU usage by about 300%! Very good to know. Thanks for the tip Ryan!

mouseEnable CPU Test swf

demo | source

I now have Adobe AIR on Linux!

Posted by Nate Chatellier on March 10th, 2008

Adobe accepted me into the AIR on Linux Alpha tester program! I just finished downloading everything and will let you know how it runs shortly. On a side note, I’m hoping it will fix the long-standing “while connected over an XML socket to a server, play a sound file and the network connection gets dropped” bug. More info as soon as I’m permitted to give some-stay tuned!

Update: My initial tests have shown many of the AIR-specific features running excellent! Way to go Adobe!

Mac vs PC vs Linux, South Park Style

Posted by Nate Chatellier on February 28th, 2008

The first one was hilarious:

The new one is good too:

Adobe AIR on Linux!

Posted by Nate Chatellier on February 26th, 2008

With the release of AIR 1.0 for Mac and Windows, Adobe is now focused on getting AIR 1.0 out for Linux. Currently, they are at the alpha stage and are taking applications for “Pre-Beta Testers”. Here’s a video of Kevin Lynch (Adobe’s Chief Technical Officer) demoing Parleys.com AIR app in Ubuntu (about 1:15 in) at Engage 2008:

Hopefully Adobe will consider me worthy of being a “pre-beta tester” and I can blog some more about the hard details in the near future.

MD5 Checksum Doesn’t Match in swf Files

Posted by Nate Chatellier on February 13th, 2008

In the gambling industry, software integrity is vital. It would be all too easy for someone to write a magical up, up, down, down, left, right, left, right, b, a, sequence into an electronic gambling machine, tell a few friends about it, and make some money. To prevent this, most jurisdictions require the game to go through an approved lab before they will allow it. In the US, the primary lab is called GLI (Gaming Laboratories International). GLI requires a copy of our source code and the ability to build the game in-house. They then use the md5 (Message-Digest algorithm 5) checksum from this in-house build to compare with any other created “copies” of the game to determine if any tampering or errors have occurred.

This works fine for C++ code, but what about compiled swf’s? Using the Adobe Flash CS3 IDE, I compiled one swf, duplicated it, and then used the Windows freeware tool MD5sums 1.2 by Jem Berkes to see if the checksums matched. Sure enough, a perfect match. So then I recompiled the swf without changing anything at all, and retested the checksums. No match. Well, I assumed that the compilation date would give me a problem, but I thought that I might be able to do some code injection to fix this issue. So I ran a hex compare on the two “should-be-the-same-swf-files” to see what was different. There were TONS of differences! Way more than could be warranted by just a time stamp change.

Adobe, help me out. As Flash broadens its competing markets and as it becomes more and more common on the casino floor, there has to be a way to compile two swf’s that will be byte for byte identical. I wonder if Silverlight allows this?

Whatever happened to Saffron UML?

Posted by Nate Chatellier on January 14th, 2008

Back in May 2007, I posted about Flash and UML. I mentioned Saffron in the post and Samuel Agesilas (author of Saffron) posted a comment saying, “I’m honored that you would like to be on the private alpha. I most certainly can put you on that list. I will email you all of the info,” but I never received any info, even after a couple of follow-up e-mails.  Then, he finally responded saying life got busy (I can definitely relate, understand, and sympathize) and that he was planning on posting a public beta the 2nd week of December and he said “I will however shoot you an early build sometime before [then],” but I still haven’t seen anything. His last Saffron blog update was back on October 6th.

Maybe life got too busy and he’s no longer working on it? I would gladly continue work on it if you happen to be reading this and need any assistance Sam. I would have started my own Flash UML project had I not discovered Saffron and seen how gorgeous it looks. I hope to see this project’s development continue!

Does anyone have any further information?

Flash in Casinos and G2E recap

Posted by Nate Chatellier on November 21st, 2007

I returned from Las Vegas a couple of days ago where the company I work for, DigiDeal, was an exhibitor at the biggest casino/gambling convention in the world, G2E (Global Gaming Expo). There were two highlights for me:

1. My parent company, IGT, has a distribution and development agreement with Microsoft for their Surface computing. I got to ‘go behind the curtain’ (literally) and have a personal demo of the multi-touch technology. Oh man is that stuff cool! I truly believe this is going to be something that changes the future. If you’re not sure you agree with me, check out the three video clips here. I can imagine some sweet multi-player Flash games!

2. It was very interesting to me to see just how many of the latest electronic casino games are using Adobe Flash for the front end. It seemed like every third game I checked out was done this way. Once Adobe releases AIR 1.0 and includes Linux support, I expect this number to raise significantly. It is very cool for me to see how many very unique implementations and applications Flash has found its way into. You rock Adobe, just get me AIR on Linux soon  ;o)

Particle System, v0.1

Posted by Nate Chatellier on November 9th, 2007

I have seen many particle systems released on many different blogs. I’ve always thought that they were pretty cool and I’ve thought multiple times about making one myself, but decided not to for the single reason that I didn’t want to be just the next guy to jump on the bandwagon of things that have already been done. But, after seeing Seb Lee-Delisle’s presentation on particle systems at Flash on the Beach ‘07, I became a little more interested in doing it. Then, at the end of Robert Hodgin’s extremely cool presentation about processing, he left us with one simple image:

Robert Hodgin's motto

I don’t want to make the same crap that everyone else has been making, but I feel like you need somewhere to start. If a particle system was a good enough starting spot for Hodgin, it is for me to. So, on the plane ride home yesterday, I made my particle system from scratch. I didn’t want to look at anyone else’s code or algorithms, for better or worse, I just wanted to go for it. So, this may or may not be the most efficient way to do it, but here it is:

Particle System, v0.1

demo | source

More work on this to come in the near future…