JavaScript Projects

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

Post February 2nd, 2010, 4:17 pm

I decided that just reading through the whole book would really help me in learning JavaScript, so I decided I woulds start coding and trying to put in everything I've learning into the coding.

Problem is... I can't think of what to code. (Besides one little thing which I successfully did), but still. I'm out of ideas right now.

Any ideas?

Thanks.
"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 2nd, 2010, 4:17 pm

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post February 2nd, 2010, 5:20 pm

This is a game I wrote a few years ago, recreate it. :)

Looking at the source isn't going to help much, the ways I did things are outdated and the code isn't formatted in an easy to read way.

It will be a good exercise for working with forms and updating elements with the DOM. :D
Attachments:
product-game.zip

(15.33 KiB) Downloaded 397 times

Strong with this one, the sudo is.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post February 2nd, 2010, 5:32 pm

Alright... one question though. What is the purpose of that game? How to win? I don't really understand the game.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post February 2nd, 2010, 5:36 pm

Then recreate it in a way that it's easier to understand. It would be a good exercise in usability. Get used to it, people will drop bombs like this on you all the time. :D
Strong with this one, the sudo is.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post February 2nd, 2010, 5:38 pm

I can't recreate what I don't understand. The story is:

Quote:
You've just been fired from your job at the fast food joint. With your last check & bill money you've got $1,000 to your name.
What are you going to do about it ?
Use the controls below to buy/sell goods, manage your bank account, & go to day labor for a few extra bucks a day & to pass time. You've got 90 days before collection agencies will have you thrown in jail, see if you've got what it takes to move Product.

I'm not really sure what I'm supposed to do... I might change it when i code it, I just want to know what you wanted it to be.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 846
  • Status: Offline

Post February 2nd, 2010, 7:29 pm

I get it. It works a lot like the stock market. You buy items when they're cheap and then sell them when they're more expensive. You have to earn a certain amount of money before the 90 days is up by capitalizing on the products. The end result after your 90th day is your daily average of capital gain, you compete with yourself for the highest number. A great functionality would be a goal for the player to reach for a daily average, and a couple levels with a story line.
Use your words like arrows to shoot toward your goal.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post February 2nd, 2010, 8:37 pm

I know how to play. I know you buy cheap and sell expensive. I just don't see the point. No matter what I get for the daily average I loose. I had $1200 daily average.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post February 2nd, 2010, 9:24 pm

:lol: I just realized... it's always going to be game over no matter what :lol:
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post February 3rd, 2010, 12:52 am

Don't worry about how to play it so much as clicking buttons and figuring out what does what, then trying to recreate the functionality. :)
Strong with this one, the sudo is.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post February 3rd, 2010, 6:08 pm

Alright then. I got the buy and sell functions written. I just need to associate them with the price, add the max functionality and then create the stats.

Oh, and the bank thing. I still need to do that.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post February 15th, 2010, 10:45 pm

Alright this one aside (Not that I can't do it, I have some other project with a higher priority).

I need to make a movable DIV on my site... not only movable, but when a user goes from page to page, the div stays in that position (Not a pup-up since there are pup-up blockers).

I might resort to pup-ups if it goes down to it though... I"m hoping for a div though.

I think I would need some cookies to remember the position of the div.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 846
  • Status: Offline

Post February 15th, 2010, 10:57 pm

cookies or ajax to post the position to a php file on the server.
Use your words like arrows to shoot toward your goal.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 6130
  • Loc: Seattle, WA
  • Status: Offline

Post February 15th, 2010, 11:12 pm

mindfullsilence wrote:
ajax to post the position to a php file on the server.

Waaaaaay overkill. A simple cookie is more than sufficient for storing simple state like this, unless for some reason we're going to persist it on a long-term basis, e.g. for individual users.
The Beer Monocle. Classy.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post February 15th, 2010, 11:38 pm

Cookies would be fine... this would only be as long as they are logged in on my site and using that particular feature.

Now I would need to learn how to make it movable, post those positions in the cookie, have the positions in the cookie editable in case the user moves the div again, and retrievable so the div would be in that page on a different page of the same site.

Is that all possible?
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 846
  • Status: Offline

Post February 16th, 2010, 1:34 am

I'm sure it is. Just overwrite the original cookie with the new positions.
Use your words like arrows to shoot toward your goal.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 16th, 2010, 1:34 am

Post Information

  • Total Posts in this topic: 19 posts
  • Users browsing this forum: No registered users and 227 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
 
 

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