JavaScript Projects

  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post February 16th, 2010, 9:37 pm

Yeah, I got that part... I just have to find out how to dynamically retrieve the positions whenever the user moves the DIV...
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 16th, 2010, 9:37 pm

  • marinepower123
  • Born
  • Born
  • No Avatar
  • Joined: May 30, 2011
  • Posts: 2
  • Status: Offline

Post May 30th, 2011, 11:39 am

Hello, sorry for the necropost, but I just wanted to thank you for posting such an interesting javascript project. This was my first time using javascript and I think it turned out quite nicely.

I uploaded the result to my site if anyone wants to see:
cremelianwars dot com/experiments/Product%20Game/index.html

There are win / lose conditions now too. The default target value is $90k, so you need to make an average of $1000 a day to win.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 8922
  • Loc: Seattle, WA & Phoenix, AZ
  • Status: Offline

Post May 30th, 2011, 11:58 am

I tried it out, seems to work great! I lost though, only made about $200 a day. Did you learn much during the process of re-creating the game?
Ozzu Hosting - Want your website on a fast server like Ozzu?
  • marinepower123
  • Born
  • Born
  • No Avatar
  • Joined: May 30, 2011
  • Posts: 2
  • Status: Offline

Post May 31st, 2011, 4:11 pm

Thanks for trying it out! I did indeed learn quite a bit. Towards the beginning I was dynamically generating all of the javascript code using document.createElement(), but eventually realized that most of the html code can be generated beforehand and simply hidden until needed.

The one thing I'm still not sure about is how to best access the html elements. Throughout the code I've used document.getElementById(), document.getElementByTagName(), and element.childNodes[0].

Also, I accessed a couple of elements through their .className property, so I'm not sure if that's a good practice, since the .class essentially represents the visual display rather than the inner structure.

Post Information

  • Total Posts in this topic: 19 posts
  • Users browsing this forum: No registered users and 278 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.