Journal #7954

Posted 12 years ago2012-08-29 23:37:05 UTC
Notewell NotewellGIASFELFEBREHBER
I coded a random headline generator today.
You can download it here.

Be sure to let me know what you think about this first version!

If anyone doesn't know what to do with .7z files, you can use either 7-zip or Winzip/Winrar to open them.
Also, don't poke around the site or share the link around too much. It's a hideous school project website from a year ago, and the free host doesn't allow for much bandwidth. You are free to put up mirrors if you like, though.

11 Comments

Commented 12 years ago2012-08-29 23:46:33 UTC Comment #60987
I lol'd.
User posted image
Commented 12 years ago2012-08-30 01:24:45 UTC Comment #60980
"Will Gordon Freeman is the life, the universe and everything?"
Uh-oh.
Commented 12 years ago2012-08-30 09:38:52 UTC Comment #60981
"Will the US military find chemical weapons inside Dimbark?"

Seriously, why did you include only Dimbark?

Anyway, I can tell that you're using the pseudorandom generator included with most programming languages. Multiple results from a specific timeframe are similar.

This is somewhat amusing, I made a random poetry generator 2 years ago.

What's this btw? C# ?
Commented 12 years ago2012-08-30 10:01:14 UTC Comment #60983
Visual Basic, which I learned in school. It's not good at heavy lifting, it can't render even sprites, but it is simple to work with for things like this. And yeah, the headlines aren't 100% random, they use the pseudo random ".next" function to select sets of phrases (defined in my code as either nouns or actions) then put them in one of 4 or 5 (can't remember which offhand) headline structures.

Not sure why I included only Dimbark. Was contemplating adding Archie and Urby as well. I knew Dimbark would react well to it, I guess.

Scotch: I did have a grammar disclaimer, but it seems from Dimbark's screenshot that it either disappeared on the final compile and I didn't notice, or it only shows up on WinXP.
Commented 12 years ago2012-08-30 10:09:11 UTC Comment #60977
"Gays is Homosexual!"

lol'd for so very many reasons.
Commented 12 years ago2012-08-30 10:19:02 UTC Comment #60982
Hmm... well, in the end, this is nice.

But will it blend?
Commented 12 years ago2012-08-30 12:35:23 UTC Comment #60978
@Jeff: If it's VB.NET than it's exactly the same compiled code as anything written in C#. I can assure you that it can render far more than just sprites without hassle. If it's VB6 or under, then you might be right as I've never used it, but I would be quite surprised if even that didn't have reasonable graphics capabilities.

@Striker: Even though most pseudorandom number generators use timestamps (among other things), you won't get similar results from similar timeframes unless you generate two in the exact same millisecond using two generators that have been created with with the same initial seed value. I would say that the similarity of results you're seeing is based on a small sample size.
Commented 12 years ago2012-08-30 17:56:19 UTC Comment #60984
It's 6.0, (from VB Express '08) but according to Wikipedia it can be converted/upgraded to VB.NET. It would seem it either doesn't do this automatically, or there is some different method from the one we used in class, because I've never come across 3D support, and trying to use moving 2D raster images with transparency leads to visual glitches if the background is comprised of images as well.
Performance drops are also present when you try to add more than a few moving objects at once (killing them when they get offscreen) as the game I made in grade 9 can attest to.
Commented 12 years ago2012-08-30 20:52:01 UTC Comment #60986
VB6 is not the same as VB .NET 6.0.

VB6 is at least 15 years old and you may not even know it.
Commented 12 years ago2012-08-30 23:29:48 UTC Comment #60979
Visual Studio 2008 uses VB.NET 9.0, which is .NET 3.5. If you were using VB 6.0, you would be using Visual Studio 6 which was released in 1998. I think you might be a little confused :)

Anyway, assuming you're using WinForms, it's not optimised to do animated graphics. It's not difficult to hook into a control's "Paint" event and do your drawing on a lower level, I've done this and performance is reasonable. The rendering issues you were getting with transparent images is probably because you didn't set the control's "DoubleBuffered" property to true. 3D capabilities are available in .NET via frameworks like XNA (for Direct3D) and OpenTK (for OpenGL).

@Stu: VB.NET 6.0 doesn't exist, the first version of VB.NET is 7.0. It's the direct successor to VB6.
Commented 12 years ago2012-08-31 00:03:55 UTC Comment #60985
I guess I am confused a bit. I am most of the time, though.

I did set the images to be doublebuffered, it helped but didn't eliminate the problem. Of course, it was one of the first games I ever coded from scratch, so I guess problems like that are to be expected. :P

You must log in to post a comment. You can login or register a new account.