Jump to content

First time coding, need help in notepad.

Hey I'm trying to make a little game. I have never coded before and I found a tutorial online on how to make a text based game. Here's the tutorial: 

I have a few questions: he puts the colour as 0a and 1a could someone please give me some examples of other colours?

I changed the question in the game and I made the whole game Hip Hop themed, the problem is the person only made one level and I want to make another level with a different question. My version of the game is attached. I tried making a second level but it didn't show up in the game could someone please help me?

game.bat

Link to comment
Share on other sites

Link to post
Share on other sites

Notepad++ is good for coding if you're starting :)

CPU - i7-4790k | CPU Cooler - NZXT Kraken X53 | Motherboard -  Asus Gyphon Z97 Armour Edition | RAM - Corsair Vengeance (2x8GB) 2400Mhz | Graphics Card - MSI GTX 1070 | Power Supply - Corsair CS750M | Storage - Seagate 1TB HDD | Samsung 500GB 850 Evo | Case - Fractal Design ARC Mini R2 | Colour Theme - Generic Red & Black

 

Operating System - Windows 10 Pro | Peripherals - Corsair RGB Mechanical K70 Keyboard/Corsair M65 Mouse

Click here to give a damn

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Colours are in you case, hexadecimal. (0 to 9 + A to F) There are loads of color pickers, which give you a hex code colour. (max 6 characters long, for example 000000 or FFFFFF) Each 2 of those hex numbers, represent a colour. (red blue and green, might not be that order) Hope you can learn some of this, and that google can help you more.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Markercartoons said:

Hey I'm trying to make a little game. I have never coded before and I found a tutorial online on how to make a text based game. Here's the tutorial: 

I have a few questions: he puts the colour as 0a and 1a could someone please give me some examples of other colours?

I changed the question in the game and I made the whole game Hip Hop themed, the problem is the person only made one level and I want to make another level with a different question. My version of the game is attached. I tried making a second level but it didn't show up in the game could someone please help me?

game.bat

The second level now works

Link to comment
Share on other sites

Link to post
Share on other sites

if %hey% == y goto youwin
if %hey% == n menu
if %hey% == N menu
if %hey% == Y goto youwin

:the game
echo This is level 2 out of 2.

 

You should have changed thos to "the game", however I doubt that a space will work... But I never programmed in this language, so I dunno.

Link to comment
Share on other sites

Link to post
Share on other sites

14 minutes ago, Dutch-stoner said:

if %hey% == y goto youwin
if %hey% == n menu
if %hey% == N menu
if %hey% == Y goto youwin

:the game
echo This is level 2 out of 2.

 

You should have changed thos to "the game", however I doubt that a space will work... But I never programmed in this language, so I dunno.

yeah for some reason the "youwin" page doesnt work. After you finish the game it brings you back to the menu but it clearly shows code for another section called "youwin"

Link to comment
Share on other sites

Link to post
Share on other sites

I don't know this language. However...

 

:youwin // Start of a code block/function.
cls // Clears screen of all previous messages.
echo wow that was hard how did you win??? // Prompts you a message. (tells you something)
echo by // Prompts you a message. (tells you something)
goto menu // Makes you automaticaly go to the main menu.

Link to comment
Share on other sites

Link to post
Share on other sites

@echo off
cls
echo Yo Yo Yo my G.
:loop
:menu
cls
color 0a
color 1a
cls
echo 1.)Start
echo 2.)Exit
set /p number=
 
if %number% == 1 goto Game
if %number% == 2 Exit
 
 
if not defined number (
cls
goto loop
)
 
:Game
cls
echo Hey dog whats yo name man?
set /p name=
cls
echo Yo %name% you wanna start the game? (y/n)
set /p hey=
 
if %hey% == y goto thegame
if %hey% == n menu
if %hey% == N menu
if %hey% == Y goto thegame
 
:thegame
cls
echo The is level 1 out of 2.
echo.
echo Who's yo' favourite rapper?
echo.
echo 1.)Tupac
echo 2.)Biggie
echo 3.)Tech n9ne
echo 4.)Logic
set /p level=
 
if %hey% == y goto the game
if %hey% == n menu
if %hey% == N menu
if %hey% == Y goto the game

:the game
cls
echo This is level 2 out of 2.
echo.
echo Do you like old or newer rap better?
echo.
echo 1.)Older rap is da best homie.
echo 1.)Newer rap is da crap man.
set /p level=

if %hey% == y goto youwin
if %hey% == n menu
if %hey% == N menu
if %hey% == Y goto youwin

:youwin
cls
echo Wow that was hard how did you win???
echo Bye!
pause>nul
goto menu

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×