Saturday, September 18, 2010

Modeling A Preserve Jar

A Wings3D video tutorial, in case you missed it. Covers basic box modeling and UV mapping, as well as some of Wings3D vector operations. Dunno who reads this blog, but what the hey!

Quite a bit, isn't it? Hopefully something can be learned from it.

Saturday, July 24, 2010

Menus: Dropdown vs Pulldown explained

I was looking for some reference to clarify this issue on the web, and what do I see in the first couple hits on google? Bad information on the topic. It seems that a lot of sites say there is no difference between dropdown and pulldown menus. Guess what? THEY'RE WRONG!

Here's the difference:

Dropdown menu: When you click on the menu header to access the menu, the menu stays on the screen until a selection is made. Note that clicking outside the box also counts as a "selection".

Pulldown menu: You have to hold the mouse button down to access the menu. If you release the mouse button or drag off the menu, the menu goes away. In other words a PULLdown menu is a DRAGdown menu, but it is not a DROPdown menu!

A subtle difference I'm sure, but it's quite a big one in regards to UI workflow. Also note that a dropdown takes two mouse clicks. One to access the menu, and one to access the menu item. A pulldown (dragdown) only takes one click, but you must hold down the button as with a mouse drag operation.

Now is it clear? I hope so.

Thursday, June 24, 2010

Cassius & Cassandra

This is probably what I'd have for a webcomic if I regularly did webcomics. No, actually I'd have something more random. This is just something from a sketchbook of mine that I figured was funny enough to share. But I'll leave the contents of the previous page up to your imagination.

Friday, June 11, 2010

Spacewar in under 100 lines?

I'm a little crazy, but I'm trying to code a clone of the ol' classic game "Spacewar" in under 100 lines in ActionScript 2. I did this before with code spread about on different movieclips and had a semi-playable game working. But now I'm trying something a little harder. This time I'm trying to keep all the actions together on the main timeline with the added challenge of trying to make better use of OOP conventions to better cover steps that repeat. So far I got it up to the point where it makes the bullets, but it doesn't quite shoot them. Hell, it's hard enough trying to figure out how I did it the first time around - being that I haven't done much in scripting for a long time. Anyhow... Here's the code:

// This is the section with the actual game.
// Create the Ship() constructor class.
function Ship(rot, xP, yP, player) {
this.rotation = rot;
this.xVelocity = 0;
this.yVelocity = 0;
this.hitPoints = 100;
this.player = player;
// Adding methods to Ship class.
Ship.prototype.applyThrust = function() {
trace("Applying thrust to "+this.player);
angleDeg = (this.rotation<0)*360+this.rotation;
angleRad = (angleDeg/180)*Math.PI;
this.xVelocity += (Math.sin(angleRad)*.75);
this.yVelocity -= (Math.cos(angleRad)*.75);
Ship.prototype.turnLeft = function() {
trace("Turning "+this.player+" left");
this.rotation -= 10;
Ship.prototype.turnRight = function() {
trace("Turning "+this.player+" right");
this.rotation += 10;
Ship.prototype.fireGun = function() {
trace(this.player+" is firing their gun.");
_root.attachMovie("bullet", this.player+"Shot_mc", 10);
_root[this.player+"Shot_mc"]._x = _root[this.player+"_Ship_mc"]._x;
_root[this.player+"Shot_mc"]._y = _root[this.player+"_Ship_mc"]._y;
Ship.prototype.calcMovement = function(clipID) {
clipID._rotation = this.rotation;
clipID._x += this.xVelocity+((clipID._x<0)*640)-((clipID._x>640)*640);
clipID._y += this.yVelocity+((clipID._y<0)*480)-((clipID._y>480)*480);
var P1_Ship = new Ship(0, 10, 10, "P1");
var P2_Ship = new Ship(0, 100, 10, "P2");
for (var prop in P1_Ship) {
trace("property "+prop+" value is "+P1_Ship[prop]);
function testLoop() {
if (Key.isDown(87) == true) {
if (Key.isDown(65) == true) {
if (Key.isDown(68) == true) {
if (Key.isDown(83)) {
if (Key.isDown(38)) {
if (Key.isDown(37)) {
if (Key.isDown(39)) {
if (Key.isDown(40)) {
setInterval(testLoop, 60);

Oh, and I'm using only 3 movieclips if you haven't figured it out. And adding sound shouldn't be too terrible either, even though I haven't got to that yet.

Wednesday, June 09, 2010

SEO in Waukegan is easy.

Check this out. If you're in a city of less than 100,000 and you localize your information on your website or blog, it's really easy to optimize for a search engine. If you put enough info, it should happen on its own. Regarding that, I'd be willing to bet a dollar that this blog will be somewhere in the first three pages containing the words "SEO" and "Waukegan". And I'm not really trying hard. If you're paying a lot for such services, and you're a small town business catering to a small town audience... Well, you know the ol' adage about a fool and their money.

But hey I'm just one guy that does freelance work as a graphic artist. So what do I know about this kind of stuff? And it's not like you found my blog via those keywords right? ;)

Friday, June 04, 2010

The Smallest Graphic Design Place in Waukegan

This is it, my freelancing is the smallest graphic design place in Waukegan. I haven't seen a mention of this site in regards to my hometown, so may as well make it be known. (Although I try to do most stuff over the net, but still I think there may be location specific stuff available.)

Some people may claim to be small, but me? I don't even have a large format printer yet, and I'm a one man show. The real problem is letting people know that there's good talent in their own backyard. And short of doing print jobs (which would still have to go outside), I can do some pretty cool things design-wise. If you want 3D visualizations or animations, Illustrations, and Logos, it will be harder to find better bang for the buck.

So if you've managed to stumble on this, fire off a comment. Or give a hint at your email. Or if that's too much work, here's a hint of mine: pop alpha uniform luck jump snake 7 5 (at) hotmail.

Sunday, May 23, 2010

This is for you flash people...

I know I'm far from the world's best ActionScript coder, but here's a nugget from something I made a good while back that may be fun to look at and play with. (I know it works in AS2.0, but YMMV with other versions.) Oh yeah, I should mention that it goes on a movieclip.

// Set up initializing parameters.
onClipEvent (load) {
var inertiaX = 0;
var inertiaY = 0;
var angleRad = 0;
thruster_sound = new Sound();

//Stop sound and thruster animation.
onClipEvent (keyUp) {

onClipEvent (enterFrame) {
//Turn left when "A" is pressed.
if (Key.isDown(65) == true) {
this._rotation -= 5;

//Turn right when "D" is pressed.
if (Key.isDown(68) == true) {
this._rotation += 5;

//Convert _rotation to 360deg and radians.
angleDeg = (this._rotation<0)*360+this._rotation;
angleRad = (angleDeg/180)*Math.PI;

//Go forward when "W" is pressed.
if (Key.isDown(87) == true) {;
thruster_sound.start(0, 2);
inertiaX += Math.sin(angleRad)*.5;
inertiaY -= Math.cos(angleRad)*.5;
trace(angleDeg+" "+angleRad+" "+inertiaX+" "+inertiaY);

//Fire shot when "S" is pressed.
if (Key.isDown(83) == true) {
_parent.attachMovie("shot1", "shot1_mc", 10, this);

//Keep spacehip on screen by wrapping.
if (this._y<0) {
this._y = 400;
if (this._y>400) {
this._y = 0;
if (this._x<0) {
this._x = 550;
if (this._x>550) {
this._x = 0;

//Make spaceship move.
this._x += int(inertiaX);
this._y += int(inertiaY);

//Pass variables to shot fired.
xInit = this._x;
yInit = this._y;

//Check if enemy shot exists.
if (_parent.shot2_mc) {
//Check for enemy shot collision.
if (this.hitTest(_parent.shot2_mc._x, _parent.shot2_mc._y, true)) {
trace("Hit P2 shot hit P1");