Question: making an online randomizer?

Recommended Videos

xdiesp

New member
Oct 21, 2007
446
0
0
Hello! Tough question here, coding related. I can ask a coder I know to work on it, but I figured some gamers might direct me to a way to do it myself.

So I'm doing work on a sort-of board game, and I need a randomizer for player equipment. And I did, with a free utility to write random plots such as what happens on this site: http://writers-den.pantomimepony.co.uk/writers-plot-ideas.php

My question is: do I need to learn java or something, to make this randomizer into an online thing? Because as an utility to download it's good, but online would be perfect. Tnx for any insight. BTW the utility is this:

http://www.mediafire.com/?xg271zy14vwo6va
 

Esotera

New member
May 5, 2011
3,396
0
0
I think you should be able to deploy Java applications in a web browser online without too much modification, but it's not really that common these days. Why would you need to have it online anyway?
 

DoPo

"You're not cleared for that."
Jan 30, 2012
8,663
0
0
Sorry, let me see if I understood it correctly - you have a game, that is offline, but you need something to randomise equipment (is that loot or just the inventory?) but...online? If so, do you need it randomised before download or am I misunderstanding something - is the game perhaps online?

What I can tell you right now is that every programming language has a (pseudo) random number generator - you can, and in fact you should, use it for this sort of task. I'm not sure why you need an online randomiser, though - you could use JavaScript or even PHP or some other server-side language (assuming you have it as an option). Or you could have the randomisation happen in-game. If it's loot you're talking about, that's what most ARPGs do - essentially a loot table and you pull out random stuff from it.
 

xdiesp

New member
Oct 21, 2007
446
0
0
To further clarify, basically what my offline utility does, is to read a "structure" file made like this ("1.txt, 2.txt, 3.txt") and pick up a random line from within the 3 txt files included. I wish it was possible from an online page.

Esotera said:
I think you should be able to deploy Java applications in a web browser online without too much modification, but it's not really that common these days. Why would you need to have it online anyway?
You are right that it hasn't to be only, but people these days won't be bothered to download and run an exe... at most I can give them a link. :(
 

DoPo

"You're not cleared for that."
Jan 30, 2012
8,663
0
0
xdiesp said:
To further clarify, basically what my offline utility does, is to read a "structure" file made like this ("1.txt, 2.txt, 3.txt") and pick up a random line from within the 3 txt files included. I wish it was possible from an online page.
So...you have an offline application but it has to get some info from the web, is that correct? And that info would have to be collected from several files and then a random one is passed back? Is it necessary to have internet connection, since you can do that offline - just give your app all the info needed and it can pull random bits of it when it's needed.

Or if you do need it online, it's pretty easy to do, too - do you have a web server of some description? You'd want a serverside language operational, probably PHP is easiest one to have but it could be whatever. Basically, what'd you'd do is point the offline app to http://yourdomainname.com/getrandomtext.html (for example) and that would read in the text, pull a random line and return it. It would be...I dunno, probably like 10 lines of code to do it. Or 20-ish - somewhere there.

I'm still not sure why you want it online or what facilities you have available. I can give you sample code otherwise.
 

lechat

New member
Dec 5, 2012
1,377
0
0
it should be easy enough for you to code yourself. specify a range of numbers then use the random function to pick one