Jump to content

Photo

SCP text based game!


  • Please log in to reply
35 replies to this topic

#21 FurryEquinox

FurryEquinox

    Byte

  • Members
  • 67 posts

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


EjQK7ed.gif


#22 Calvary

Calvary

    Conceptual

  • Members
  • 6,621 posts
  • Locationwww.

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


tumblr_om7nwjm5Wm1rsea1wo1_500.gif
Ask for my discord/Insta/Tumblr if you want.


#23 Guest_ElatedOwl_*

Guest_ElatedOwl_*
  • Guests

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.



#24 Guest_ElatedOwl_*

Guest_ElatedOwl_*
  • Guests

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.



#25 FurryEquinox

FurryEquinox

    Byte

  • Members
  • 67 posts

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


EjQK7ed.gif


#26 FurryEquinox

FurryEquinox

    Byte

  • Members
  • 67 posts

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)


EjQK7ed.gif


#27 Guest_ElatedOwl_*

Guest_ElatedOwl_*
  • Guests

Posted 03 December 2014 - 07:56 PM

how do you mean broke everything? o.O



#28 FurryEquinox

FurryEquinox

    Byte

  • Members
  • 67 posts

Posted 03 December 2014 - 08:07 PM

http://imgur.com/m3AGISY

 

im pretty sure i have a special ability to do these kinda things


EjQK7ed.gif


#29 SushiKitten

SushiKitten

    Coffee Cat

  • Members
  • 1,916 posts
  • LocationCanada

Posted 03 December 2014 - 08:49 PM

What did you do before this happened? Can we see what code you have written so far?



#30 FurryEquinox

FurryEquinox

    Byte

  • Members
  • 67 posts

Posted 03 December 2014 - 09:57 PM

this is the exact code

 

assoc .rb=RubyScript
ftype RubyScript=ruby.exe %1 %*


EjQK7ed.gif


#31 Guest_ElatedOwl_*

Guest_ElatedOwl_*
  • Guests

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.



#32 FurryEquinox

FurryEquinox

    Byte

  • Members
  • 67 posts

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.


EjQK7ed.gif


#33 Guest_ElatedOwl_*

Guest_ElatedOwl_*
  • Guests

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.



#34 FurryEquinox

FurryEquinox

    Byte

  • Members
  • 67 posts

Posted 05 December 2014 - 06:25 PM

Sweet sauce i finally got it to work with my minor skills! thanks guys!


EjQK7ed.gif


#35 seakingtheonixpected

seakingtheonixpected

    Gigabyte

  • Members
  • 986 posts
  • LocationSomewhere beyond the sea

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.



#36 IvanoFFBaro

IvanoFFBaro

    Bit

  • Members
  • 2 posts

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.