Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - 6DollarSuit

Pages: [1]
1
Programs / Re: This program generates Bad Outfits
« on: August 29, 2018, 04:27:53 pm »
Thank you! This grid has been a huge help:
 
grid12.gif

Without it, plotting the coordinates is like playing battleships against myself in the dark.

2
Programs / This program generates Bad Outfits
« on: August 29, 2018, 10:58:35 am »
This is a type of program I've wanted to make for a year or two, and have failed several times at creating. The one thing all those failures had in common (other than me!) was that they were all text-based. In text, you can describe anything, so the number of possibilities for things like shirt color would quickly get out of hand. This one, being entirely graphics-based, was limited in color and complexity, which wound up being a good thing. It's quite short, but I think it works pretty well for a little over 1 hour of work:

Code: QB64: [Select]
  1. bottomcolor% = INT((RND * 16) + 1) 'generates from 0 to 15 then adds 1 to get results from 1 to 16, avoiding 0 (black)
  2. LINE (20, 440)-(200, 200), bottomcolor%, BF
  3. skirt! = RND
  4. IF skirt! > 0.5 THEN LINE (110, 440)-(110, 280), 0 'pant leg seperator if it isnt a skirt
  5. shorts! = RND
  6. IF shorts! > 0.5 THEN LINE (20, 440)-(200, 340), 0, BF 'coin flip for bottoms length
  7. topcolor% = INT((RND * 16) + 1) 'same method as bottomcolor
  8. LINE (600, 40)-(440, 200), topcolor%, BF
  9. sleeves! = RND 'single with decimal
  10. IF sleeves! < 0.5 THEN LINE (440, 80)-(280, 40), topcolor%, BF
  11. IF sleeves! > 0.5 THEN LINE (440, 80)-(360, 40), topcolor%, BF

(hopefully these attachments work)
 
outfit 1.png
 
Outfit 2.png

The left side of each image shows the program's output, the right side is an example of how it could be interpreted into a real outfit. These outfits aren't terrible, but most of the ones it comes up with are pretty bad. An interesting thing is that I'm pretty sure there's a 1/1000 chance that the shirt will have no sleeves at all, since "sleeves!" could be exactly 0.5, instead of greater or less. This is my first post, so I hope I formatted it correctly.

Pages: [1]