yet another question
i wanted to know is it possible to give ruby a console look? since that was the whole reason i was using .batch to create the game
Posted 03 December 2014 - 02:46 PM
yet another question
i wanted to know is it possible to give ruby a console look? since that was the whole reason i was using .batch to create the game
Posted 03 December 2014 - 03:13 PM
I man, I used to dabble in batch when I was about 15, I thought I was the coolest kid in the world because I thought I was coding. I actually made a fairly simple RPG with health, a rudimentary attack system and a little story. I lost it years ago and the knowledge to do it shortly thereafter but I will say batch is pretty easy to learn. Lots of echoing if I remember correctly. :3
Ask for my discord/Insta/Tumblr if you want.
Posted 03 December 2014 - 03:18 PM
yet another question
i wanted to know is it possible to give ruby a console look? since that was the whole reason i was using .batch to create the game
yep, a ruby app is going to run natively off an OS's command line normally (windows would be the command prompt). give me a few minutes and I'll download the ruby interpreter and give some screen shots.
Posted 03 December 2014 - 03:43 PM
yep, a ruby app is going to run natively off an OS's command line normally (windows would be the command prompt). give me a few minutes and I'll download the ruby interpreter and give some screen shots.
Firstly, you have to install the ruby runtime (see http://rubyinstaller.org/). After that you'll need to open a command prompt as administrator (right click command prompt application, run as administrator) and put in the following
assoc .rb=RubyScript ftype RubyScript=ruby.exe %1 %*
this creates a file association so .rb files get opened by the ruby runtime by default. you only need to do this once.
(do note this is for development, if you distribute the game you can package the runtime and all your code into a single executable anyone can run)
Now let's get into the code. Under C:\ create a folder called "Ruby" (you can name this whatever and put it whatever, but a root level folder is going to be a lot easier to work with). Then, open up notepad (or your text editor of choice, I personally prefer Sublime Text 2) and save the below as "hello.rb" (make sure the extension is rb and not txt)
print "Hi friend. What's your name? " name = gets.chomp print "Hello, " + name + "."
(edit: forum ate my images, I'll link to them instead)
After that open up the command prompt and navigate to the folder you saved the rb file to via cd. [image]
Next, type in the name of the rb file and hit enter and it'll start the application.
The first thing the application does is print out the text "Hi friend. What's your name?" [image]
Immediately after it see gets.chomp and waits for the user to enter in some text and hit enter [image]
Now the program prints out "Hello, [name]." Since there's no more code to run the application closes. [image]
Voila, ruby in the command line.
Posted 03 December 2014 - 04:09 PM
so i attempted this and...um i think i broke everything.... does me having windows 8 change anything? since windows 8 is the worst thing ever
Posted 03 December 2014 - 05:55 PM
yea i broke everything im just gonna ask someone who i know personally and knows what their doing to fix this (unlike me)
Posted 03 December 2014 - 07:56 PM
how do you mean broke everything? o.O
Posted 03 December 2014 - 08:07 PM
Posted 03 December 2014 - 08:49 PM
What did you do before this happened? Can we see what code you have written so far?
Posted 03 December 2014 - 09:57 PM
this is the exact code
assoc .rb=RubyScript
ftype RubyScript=ruby.exe %1 %*
Posted 03 December 2014 - 10:34 PM
You should be running command prompt, not start command prompt with ruby. Also, manually type it in or only copy -> right click -> paste one line at a time, hitting enter after each paste.
Posted 04 December 2014 - 11:47 AM
ah OK that was my mistake i just copy and pasted it but im still pretty sure its not supposed to do that.
Posted 04 December 2014 - 12:28 PM
I'm not entirely sure what you did to get the question marks but it didn't any damage or anything; failed to recognize it as a command and went on it's merry way.
Posted 05 December 2014 - 06:25 PM
Sweet sauce i finally got it to work with my minor skills! thanks guys!
Posted 07 December 2014 - 04:15 PM
Here is was I recommend, don't glue yourself to a project until you are done learning. It may seem like a good idea to come up with an idea early so you can try to excute on it while you are learning but that usually ends in disaster. Ideas are cheap and you will have plenty of ideas over the course of learning to program, write them down and when you actually feel like you can get everything to work see which stands out as the most doable.
As others have said, don't do games that draw on skills you don't have. So unless you can get a writer on your team having the game be heavy in writing is a really bad idea since it will be really clear to the audience.
By the way, who is your audience? Do you plan on releasing this game for money? If so you should keep in mind that most normal gamers don't known how to work in the terminal so that could become a problem down the line.
This kind of game would probably be more success will people who use things like DOSbox, but I'm not sure if Python or Ruby is compatiable with DOS.
Posted 29 February 2016 - 08:51 AM
Hello
I am trying to find out where I need to look to figure out how to start to a file search based on a payload.
In the end, Id like to play the searched media file to MPC.
How complicated is this going to be?
Edited by Undine, 29 February 2016 - 09:38 AM.
Stop with this.