another perlin noise experiment

I decided to work on a javascript canvas experiment where I can drag the mouse and scroll within a map. I got a simple "map" drawing colored squares that can be dragged around. I found a perlin noise library, and made the map look like wavy colors. It was pretty slow at that point, so I rewrote the drawing code so it writes directly into the image data. Now I have a smoothly scrolling wavy thing, but I'm not sure what I'm going to use it for. sproutworks.com/demos/perlin

Posted on: 18 November 2011 | 3:35 am

fractal terrain generation

The other day I read an article about how to create fractals using the midpoint displacement algorithm. It's a simple recursive algorithm where you take a square, and split it into 4 smaller squares while displacing the height of the corner where the 4 squares join by a random amount. This process is repeated, creating smaller squares which gradually make a smoother terrain. I spent an hour or two writing a PHP script to make a terrain image using this method. After I got some decent looking greyscale images, I added a color map so I could create colored oceans and mountains. Today I modified my old 3D graph script to generate 3D terrains using a bitmap and elevation map from my new fractal Here is what it looks like: sproutworks.com/artgraph.php?bitmap=image_1296466523.jpg&elvmap=elevation_1296466523.jpg&height=200 I might work on getting a terrain generator running in the iPhone, and rendering it with OpenGL.

Posted on: 30 January 2011 | 8:09 am

iPhone pixel data

The other night while watching a cartoon, I thought of a way to create levels for my iPhone game by scanning an image drawn on graph paper. To do this I need to access the raw pixel data from a CGImage. I already have a method that is loading png images into OpenGL texture maps, so I started modifying it to get the pixel data. I made some progress altering the pixels, which can lead to procedural texture generation later. I am going to try to make a program that detect shaded cells on graph paper and convert them to polygons in my game level.

Posted on: 13 December 2010 | 2:39 pm

Twitterfeed

I just discovered twitterfeed.com/ , where I can post to my blog, and twitter feed will find new posts in my RSS feed and post to twitter and facebook automatically. Hopefully this will encourage me to write in my blog more often, knowing that my posts will be distributed to more people without any extra effort.

Posted on: 14 November 2010 | 4:18 am

PHP 5.3

Dreamhost has just added beta support for PHP 5.3. I can finally start implementing the new language features I've read about. Unfortunately, I just discovered it breaks all my scripts that use GD, so I had to switch back to 5.2

Posted on: 14 November 2010 | 3:06 am

more iPhone coding

Yesterday I moved the code that draws the walls in my maze app to the MazeParts class. Now it can share memory with the floor drawing code and got rid of the allocating/deallocating memory on each frame rendered. I also enabled the depth buffer and depth sorting, finally the walls are overlapping correctly. I started adding some code to load a plist file into an array. This will help me create levels besides the random mazes it makes now.

Posted on: 12 August 2010 | 10:28 am

iPhone programming

Did some more iPhone programming. The other day I took some of the maze drawing code and put it into a new MazeParts class. This class will be handling the drawing of the floor and walls of the maze. It will make the renderer file cleaner and easier to work with. Today I rewrote the floor drawing code to use translation calls instead of rebuilding vertex and texture buffer data for each floor tile. Next I will do something similar to draw the walls. I also added a setting to my info.plist file to hide the status bar.

Posted on: 10 August 2010 | 11:22 am

QuickPWN iPhone 3GS contest

I'm excited about the new iPhone 3GS. The hardware support for OpenGL ES 2.0 will make it more fun to explore advanced graphics in my projects. I have a basic 3D maze running on my iPod touch, and it would be awesome to be able to add shader programs to it. Here's the link for info about winning an iPhone 3GS from QuickPWN www.quickpwn.com/forums/iphone-3g-s/4177-iphone-3g-s-giveaway.html

Posted on: 10 June 2009 | 12:47 pm

I got a Macbook Pro

Last month I purchased a new unibody 15" Macbook Pro. It is my first Mac in over 10 years. It's so nice owning a Mac again. I've been dabbling in iPhone development since I got it, and I have a basic OpenGL application working. My app lets me move a marble around the screen using the Macbook's accelerometer. I used the accelerometer simulator code.google.com/p/accelerometer-simulator/ and the unimotion program unimotion.sourceforge.net/ to accomplish this. It would be nice to have this functionality built into the iPhone simulator. I bought a book about game physics, and I'm on my way to creating a great game. Next I will be simulating interactions between multiple marbles, and figuring out how to load level configurations.

Posted on: 28 January 2009 | 1:19 pm

3D Digg Explorer

Presenting SproutWorks 3D Digg Explorer www.sproutworks.com/digg3d.php I have just put SproutWorks 3D Digg Explorer online. It is my latest attempt to display textual information in an interesting way. I use JavaScript with jQuery to script the interactive elements of it. It fetches a JSON string from my server, and creates a three dimensional scene using the data from it.

Posted on: 26 January 2008 | 3:13 am

ProBlogger $54,000 Birthday Bash

www.problogger.net/archives/category/birthday-prize-giveaway/ ProBlogger is having a birthday bash with $54,000 in prizes. ProBlogger is a blog dedicated to the topic of making money with blogging. It is a tantalizing idea, but I tend to spend more time programming my site than writing on it. Still, I enjoy reading the tips about blogging, which I may actually implement someday. I am writing this post as my entry to win 2 LG 20" USB LCD monitors provided by DisplayLink (www.displaylink.com) That would be an awesome compliment to my new 22" Viewsonic LCD. So, everyone check out ProBlogger, it's an interesting read.

Posted on: 5 October 2007 | 4:06 am

New logo animation

I have just added a new animation program to the logo area of this site. I have been working on variants of this system for a while. First, I wrote a JavaScript program that uses a drawing method similar to Google Maps. It uses square tile graphics, arranges them in a grid, and then moves them inside a scrolling area. When a tile moves off the edge of the scrolling area, it is moved to the opposite side of the area. Before it is moved, the tile graphic is updated with the graphic that is appears on the opposite side that is scrolling into the scrollable area. After I got a basic tile scrolling engine working, I made it work with several layers of tiles that can scroll at different rates. I then added the ability to make additional layers of objects that can be positioned anywhere. The animation at the top of this page uses this object layer system. I will make more interesting scenes as the engine becomes more sophisticated.

Posted on: 23 September 2007 | 7:45 am

Price Tracker Speed Boost

I have just optimized the performance of the Blogshares Idea Tracker's graph rendering program. The graphs are loading much faster now. The industry listing page now allows you to load the graph for any industry by clicking a button.

Posted on: 21 September 2007 | 1:55 pm

Viewsonic VG2230vm

A few days ago I ordered a Viewsonic VG2230 22" widescreen LCD for about $300 from www.newegg.com It replaces an ancient 19" Viewsonic G790 CRT display. I also have a little 15" Gateway LCD as a secondary monitor. So far I'm loving this new monitor. I have a lot more room to do stuff, and games look awesome on it. It is plugged into a DVI port on my Radeon x1950 Pro. I briefly ran Quake 4 and Half Life 2. I ran F.E.A.R. Combat but it insisted on running on the secondary display. I hope I can resolve this later. I still need to try Bioshock on this thing. This monitor can swivel on its base, and it has a height adjustment that can go pretty high. It has some speakers I will never use. This monitor will improve the many, many hours I spend on my computer. Now I just need to upgrade my secondary monitor.

Posted on: 18 September 2007 | 1:59 pm

new video games

I have purchased a few new video games over the last month or so. Here is a little info on each of them. I bought Bioshock for PC on it's release date, right after I got off work. Bioshock is set in 1960 in an underwater city called Rapture. Something has gone horribly wrong there, it appears to have something to do with the rampant genitic modifications performed there. The environment is really well done, it really seems to fit with the time peroid. Bioshock plays like a first person shooter, but you can use powers from plasmids in addition to the standard weapons. You find plasmids enabling you to throw fire, ice, use telekinesis, electrocute, and many other things. There are endless ways to dispatch the mutant freaks known as slicers. I may write more about Bioshock later, it is one of my favorite games at the moment. I also bought Metroid Prime Corruption for the Nintendo Wii. The game makes very good use of the motion controls. I like the puzzles and the varied worlds of the the Metroid universe. I picked up Brain Age 2 for the Nintendo DS along with Metroid. Brain Age is intended to be played daily, and it claims to train your brain. This idea seems to make sense. Each of the mini games makes you think in ways you normally don't. It tracks your progress in each game, and you can view a calendar of your results. Every day when you train your brain, you get a stamp for that day. Earning stamps unlocks more of the games. The creator of the game, Dr. Ryuta Kawashima, gives you brain tips in between games. I hope my neurons are making more synaptic connections as a result of playing Brain Age 2. Last Saturday I bought Castlevania, Portrait of Ruin for DS. It was on sale at Walmart for $25 so I just had to get it. I have played a few of the Castlevania games, including the original, Super Castlevania, and one on the PS2. It is a great series. Portrait of Ruin stars 18 year old Jonathan Morris and his 16 year companion Charlotte Aulin. They are on a mission to vanquish the vampire Brauner from Dracula's castle, where he is up to no good. I've played through a few worlds, which you enter from magical paintings. There is a large variety of enemies and weapons. You can upgrade your characters through earning experience points and collecting items. I enjoy this game, it has the feel of a classic platformer with lots of modern additions.

Posted on: 18 September 2007 | 1:49 pm

Idea tracker update

I just noticed that the Blogshares Price Tracker has not been updating for a couple weeks. When I looked into it, I discovered that something happened on the server so that the include files were not being found. A Dreamhost tech pointed me to their wiki page about cron jobs, where I found I had to change the path to PHP. After I got the updates going again, I rewrote a few key parts that were making the price tracker very slow. There were some SQL queries that were inefficient, so I rewrote those, and moved some data into different tables. Now the industry listing and details pages are much faster. I made the graphs a little faster, but they are still way too slow. The problem is that the graph script queries a table with over 10 million rows. I'll try to think of some ways to speed it up.

Posted on: 16 September 2007 | 7:20 am

Feedblitz features

I got an email from Feedblitz saying that they are adding some new features to the free accounts. I have customized the appearance of the email with some graphics I had laying around. I'll try to make a more extensive email template later.

Posted on: 10 September 2007 | 12:59 pm

Hoover Mach 5 vacuum cleaner

A few months ago I purchased the Hoover Mach 5 vacuum cleaner from Walmart for around $160 at Walmart. I was looking for a replacement for our Hoover Fold Away. The Fold Away did not have much suction power, and the filter clogged quickly. I originally sought out to buy a Hoover Fusion, which has Dyson-like cyclonic filtering technology. I discovered that the Fusion had been discontinued and replaced with the Mach 3. The Mach 3 has a cyclonic main filter and a washable pre-filter. It comes with a turbo brush tool, dusting brush, 2 extension wands, and a crevice tool. The turbo brush excels at removing pet hair, but I have found that it needs servicing once in a while. The pet hair tends to wrap around the ends of the brush where it rotates, eventually preventing it from rotating. It can be cleaned by disassembling it with a Phillips screwdriver. The Mach 5 improves on the Mach 3 by adding a HEPA filter, a dual chamber cyclonic filter, a retractable power cord, an adjustable handle, and a brush roll control. Cord rewind is a nice feature that reels in the cord at the press of a button. No more rolling up the power cord. Another nice feature is that the brush roll automatically turns off when the Mach 5 is in upright position. The Mach 5 offers many of the same features as a Dyson much less money. There are no filters to replace, and no loss of suction.

Posted on: 6 July 2007 | 4:12 am

Id tech 5

John Carmack demoed Id tech 5 at Apple's Worldwide Developer Conference. Id tech 5 is his latest game engine that features technology that allows artists to use unlimited textures. This sounds like a major development in computer graphics, which would simulate environments much more realistically. More and more the video game industry is contributing to the advancement of mankind by pushing the limits of real-time graphics and physics. The singularity is approaching. www.youtube.com/watch?v=HvuTtrkVtns

Posted on: 22 June 2007 | 2:42 pm

BlastEngine

I have just signed up at the search engine submission service www.blastengine.com . They submit to over 1 million search engines. I used this service a while ago and it resulted in more traffic for this site.

Posted on: 22 June 2007 | 2:33 pm

Captcha!

I have been busy at work, and I've been neglecting this site for the past few months. I looked at the forums today, and I was shocked to see that there were over 500 spam messages here. I have cleared out the spam and I also programmed a captcha system to prevent spam in the future. Captchas are those images where you have to type the letters in the image when you fill out a form. So now the spam should not come back.

Posted on: 28 May 2007 | 9:03 am

new design in the works

I have started work on version 7 of the SproutWorks layout. I have decided to incorporate a scrolling tile engine I made. It uses scrolling tiles in a similar way that Google maps does, only it's not for displaying maps. I intend to use it for games and animations. When the new layout is completed, it should look far more interesting than the current one. It will probably have some interactive elements in place of where the logo is now. Last night I wrote a PHP program that draws a spinning gear. It can draw the gear in any given size, color, and with different numbers of teeth. I will make some sort of interesting animation with the gears.

Posted on: 3 January 2007 | 1:58 pm

my new computer

A while ago my old computer's power supply fizzled out. I bought a 430 watt Thermaltake power supply, but something was wrong with the motherboard (an Asus A7M266-D with 2 Athlon 1900 MP processors). I eventually replaced the motherboard with an Asus P5B Deluxe, an Intel Core 2 Duo 6600, with an Asus Radeon x1950pro video card. The new computer is running great. I can finally play modern video games again. I have been playing a lot of F.E.A.R. Combat online. I just bought Quake 4 and FarCry, and have been having a lot of fun with both of them. Now that I have a video card that supports shader model 3, I can finally mess around with the examples in my programming vertex and pixel shaders book. I started a new Visual Studio C++ project where I copied an example program from the DirectX 9 SDK. I have been making a basic framework for doing 3D stuff. So far it just shows a textured triangle strip plane spinning around.

Posted on: 3 January 2007 | 1:44 pm

updated blog spider

I've just updated SproutSearch's blog spider. It now tries to fetch the RSS feed for a blog before parsing it with my HTML parser. This should save some CPU time and give me better results. It also gets the date and time of the blog's latest post and some statistics about the number of words used. This new data will allow me to generate better pages in the future. I am also brainstorming some methods of data mining I can use to make SproutSearch a bit more interesting. With over 8 million blogs in the database there are lots of possibilities. http://www.sproutsearch.com

Posted on: 18 October 2006 | 12:35 pm

MySQL optimization

I have noticed a lot of queries of SproutSearch's main database table are getting slow as SproutSearch passes 8 million indexed blogs. I finally decided to do something about it after trying to add alter this table. I attempted to add a column that keeps track of the date and time of each blog's most recent post. The alter table command ran for at least 8 hours, and then MySQL either crashed or the admins killed my process. I attempted this a second time without making a new index, which also failed. I figured I would just create a new table with the extra column and write a program to slowly copy everything over. The first version of this PHP program queried 10,000 rows of data from the old table and inserted them one by one into the new table. I set up a cron job to run this every 10 minutes. Once the new table started getting big, the cron jobs were overlapping, some records were not copied, and copy processes started backing up. It dawned on me that I'd better learn something about MySQL optimization. I read some online articles and decided to try using mysqli_multi_query to copy the records. That would reduce the network overhead. The program ran several times faster but I wanted to look into other methods. I tried using prepared statements, which wasn't much better. I found this excellent article (http://www.informit.com/articles/article.asp?p=377652&seqNum=4&rl=1) which said if I use the insert format like: insert into table (column1, column2) values(val1, val2), (val1, val2)... MySQL wouldn't have to flush the index after every insert. I made my program create a giant insert statement in this format. I tried it out and it only took a few seconds when the new table was empty. I modified the program to run 10 batches of 10,000 records, which would take a few minutes. This program has been running for a few days, and all my data is finally in the new table. I am still having problems with the table being locked during lengthy select statements. It causes certain pages to hang for a long time. I am now copying all the data from a MYISAM table to a INNODB table because it has row level locking.

Posted on: 16 October 2006 | 6:18 am