Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 19th, 2008, 4:08 AM   #1
redfiretruck
Newbie
 
Join Date: Apr 2008
Posts: 23
Rep Power: 0 redfiretruck is on a distinguished road
VB Project (Grocery Store)

First of all, sorry about multi-threads but I honestly don't think these two are even closely similar or else I would put them both in the same thread .

This is a huge post because it has to be, I don't like when people say "here is my code, tell me what i did wrong" and I wouldn't feel right doing so... If you don't want to read it, then don't.


First of all, this isn't in order to get any achievement other than saying "yay i finished this" and it isn't for homework...


What is it? It is a Grocery Store simulation? It simulates (very badly) a person (npc) moving around the store and getting certain items and then going to the register and buying their item but only if a cashier is there of course right?

What have you done so far?
  • I have made a checker that makes sure they aren't going to walk into a wall or object (which is if it is within a certain top or left) and if it is it moves it so it won't. This is probably the thing I'm most proud of even tho it is simple .
  • I have made a random item grabber, and also a purchase code that actually purchases an item visually and in code it holds the amount of items the customers have bought...
-- Other random things that mean practically nothing xD.

What i haven't added?
  • A full analysis of all the information that has occured (tax info, item info, cash given back, bill given to pay with...)
  • Shopping carts

I'll add these later after i get the random and multi-image problem solved.

What doesn't work? (What i need help with)
  • The random class doesn't seem to work too well... What can i do to accomplish a hopefully truly random function?
  • The way i have it working (which is done with repeats) doesn't seem to be extremely functional due to it's inability to have two things moving at one time... How can i accomplish the same goal without the same limitations? My only thought is to have it with if statements and have true/false moving statements for each of the pictureboxes... But that seems like alot of work and too complicated for this...
I don't really know how people usually post their projects so I am using a zip file with the solution and all the form1.vb and stuff. Hopefully that is functional enough if it isn't what you guys usually do.

Direct Link To Download
-- Bit slow atm, dunno why but it will get there soon enough ... It is usually INSTANT 8(.

Explanation of how I have it working (since raw code is a pain to understand even if you wrote it yourself, and i hate doing comments and usually forget to because I'm so into my code xD.

The global variables...
  • b1/b2 is stored in case the cashier is Busy (1 and 2 meaning cashier #1 and cashier #2... is going to be used later when i get the multi-image working)
  • wi1, wi2, wi3 are all stored for the item the customer is with... Numbers held respectively to picturebox.
  • si, ci, pi, and bi are "soda integer" etc. They are the current count of how many soda/beer the customers have bought.
  • ccount1, ccount2, ccounttotal are all used to have the total customer count served and the amount of customers cashier #1/2 has gotten individually.
  • All the bads are the dimensions for all the objects... Bad1/2 for item 1 and so on... X being left and Y being top... Basically makes a square where the object is from the first dimension to the second dimension.
  • Black squares are the cashiers, Red is the new customer, and blue is the old customer (one that has already bought an item).
  • The function for soda/beer/cake/pill are just things to get the npc to go to that spot... It pulls a random number because I mean, how many times in a grocery store do you go to the exact spot right? .

-- I don't know how many problems there are of bad programs being shown, but I can tell you mine isn't a keylogger or anything... There aren't many lines of code and there all simple integers/images so it shouldn't be too hard to check it if you want to --

As an added note, I am not too good about making anything look good... Which is why i'm 24/7 at home and am into programming not image manipulating *cough* but anyway... As I said, I'm not too great at making things look good so this thread is a bit unorganized... But atleast i tried XD... Talking about looks, anyone else think cscgal is pretty hot?

Last edited by redfiretruck; Apr 19th, 2008 at 4:35 AM.
redfiretruck is offline   Reply With Quote
Old Apr 19th, 2008, 6:41 AM   #2
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 545
Rep Power: 4 Ancient Dragon is on a distinguished road
Re: VB Project (Grocery Store)

>>and then going to the register and buying their item but only if a cashier is there of course right?
Not in self-checkout lanes.

>>A full analysis of all the information that has occured (tax info, item info, cash given back, bill given to pay with...)

Should be able to pay in cash, credit card, debut card, link card, wick, or any combination thereof. And don't forget the tax-exempt cards. (Yup -- I'm a part-time Wal-Mart cashier)
__________________
True Terror is to wake up one morning and discover that your high school class is running the country - Kurt Vonnegut Jr.
Ancient Dragon is offline   Reply With Quote
Old Apr 19th, 2008, 6:50 AM   #3
redfiretruck
Newbie
 
Join Date: Apr 2008
Posts: 23
Rep Power: 0 redfiretruck is on a distinguished road
Re: VB Project (Grocery Store)

Lol, its a really poor grocery store i guess xD. I mean... it has 2 workers and 3 lines of food, it's pretty small.

Can't afford self-checkout lines or any card stuff .

I disagree with the 98% pot thing :O. I'm guessing 50-60% do pot... (i don't)
redfiretruck is offline   Reply With Quote
Old Apr 19th, 2008, 6:00 PM   #4
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,033
Rep Power: 5 lectricpharaoh will become famous soon enough
Re: VB Project (Grocery Store)

Quote:
Originally Posted by Ancient Dragon
Not in self-checkout lanes.
Ugh, sorry for the OT here, but I have to rant. I hate those self-checkout lanes with a passion. Half the time, the things don't scan properly, and most of the time when they do, they start beeping at you for not putting it in the scale fast enough, or putting it in too soon, or whatever.

Of course, what pisses me off most is the stores seem to think that it's okay to make the customers do, for free, the same job they pay their employees to do.

Okay, I'm done. I feel much better now.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Old Apr 20th, 2008, 4:45 AM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Re: VB Project (Grocery Store)

With the self-checkout things: I figure that if you don't want to use them, you can always go to a real checkout. I use them when I'm grabbing a sandwich and a bottle of water or when there's massive queues everywhere else - otherwise, I figure it'll be easier to make someone else do the damn work.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web 2.0 Business Project lalea Existing Project Development 0 Feb 1st, 2008 7:35 PM
Need help making a game plan for final programming project! codylee270 C++ 27 Dec 1st, 2006 7:29 PM
How to meet these cross-platform project goals? mattengland C++ 1 Apr 3rd, 2006 4:01 AM
Project List! raf_123 PHP 3 Mar 31st, 2006 2:32 PM
Project: Dedicated Stack Overflow Existing Project Development 0 Mar 31st, 2005 2:43 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:48 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC