Hey guys, I am fairly new to Love2D, and I decided to make a simple random word generator.
There are 30 different word possibilities that you can generate. Anyways, you guys can take a look at the code if you want and tell me if this system is horrible or not, lol...
Peace.
Random Word Generator
- XxSolidJelloxX
- Prole
- Posts: 25
- Joined: Sun Jul 14, 2013 2:46 am
- Location: The Stars
Random Word Generator
- Attachments
-
- RandomWordGenerator.love
- (1.2 KiB) Downloaded 293 times
Re: Random Word Generator
Quite cool. I like it
"In those quiet moments, you come into my mind" - Liam Reilly
Re: Random Word Generator
seems interesting.
- XxSolidJelloxX
- Prole
- Posts: 25
- Joined: Sun Jul 14, 2013 2:46 am
- Location: The Stars
Re: Random Word Generator
Thanks, glad you liked itEamonn wrote:Quite cool. I like it
Yes, it runs on a simple tick system that I just thought of the other day.jjmafiae wrote:seems interesting.
Re: Random Word Generator
Hardcoding it is a pretty bad idea, since you're going to end up with absolutely massive if statements if you ever needed a significant amount of words (ie >1000). You could try reading all the words from a file into a index'd table, and simply generate a random number between 1 - sizeoftable, then print out that.
- XxSolidJelloxX
- Prole
- Posts: 25
- Joined: Sun Jul 14, 2013 2:46 am
- Location: The Stars
Re: Random Word Generator
Yeah, I was thinking the same thing, but I guess this could still be useful if there isn't a significant amount of possibilities.MPQC wrote:Hardcoding it is a pretty bad idea, since you're going to end up with absolutely massive if statements if you ever needed a significant amount of words (ie >1000). You could try reading all the words from a file into a index'd table, and simply generate a random number between 1 - sizeoftable, then print out that.
Last edited by XxSolidJelloxX on Fri Aug 09, 2013 8:03 pm, edited 1 time in total.
Re: Random Word Generator
it would not be hard to add tables that store every word.
- XxSolidJelloxX
- Prole
- Posts: 25
- Joined: Sun Jul 14, 2013 2:46 am
- Location: The Stars
Re: Random Word Generator
Just got done doing that, lol. Check it out, this way of doing it is waaaaaaaaay more efficient in every aspect.jjmafiae wrote:it would not be hard to add tables that store every word.
- Attachments
-
- RandomWordGenerator.love
- (1.1 KiB) Downloaded 179 times
Re: Random Word Generator
good job
this will work much better.
this will work much better.
Who is online
Users browsing this forum: Google [Bot] and 3 guests