Jump to content
IGNORED

New C64 game:Beer drinking sim


Recommended Posts

This for those of us that cannot drink or are under the legal limit. basically, you play a random viking who walks into a bar. from their, crap gets weird.

 

Made is 20 minutes using a bare minimum of input statements

 

there are some errors but those can be fixed in due time. this was just made for fun, no harm meant. i am not responsible for anyone drinking themselves to death because of this game. direct your angry barbs at Miller Light and Bacardi dark (come to the dark side of the bar luke, you'll get drunk faster")

post-65222-0-59686700-1534470275.png

Edited by Ranger03
  • Like 1
Link to comment
Share on other sites

Since I assume you are doing this in emulation, why not use the Plus/4 (BASIC 3.5) or 128 (BASIC 7.0) if the 64’s BASIC 2.0 isn’t cutting it for you? Both of these have graphics commands and sound commands that the 64’s BASIC does not.

The screen spazzes out when told to run a graphics program in the plus 4. all i get is black bars and some green lines

Link to comment
Share on other sites

The GRAPHIC command just switches you to graphics mode - it's up to you to tell the computer what to put on the screen.

 

If you just type GRAPHIC 1 to select high resolution graphics mode, you get the green/black bars you described. GRAPHIC 2 gives you a 4 line character window at the bottom of the screen, much like on an Apple II.

 

But it is your responsibility to clean up the screen and draw on it. As an example using GRAPHIC 2 - here's a sample program that draws an ellipse on the high resolution portion of the screen, prints some text in the text window at the bottom, and prints some text in the high resolution portion of the screen.

10 GRAPHIC 2:SCNCLR:PRINT:REM SELECT HI-RES GRAPHICS, CLEAR IT
AND POSITION THE CURSOR IN THE TEXT WINDOW.
20 COLOR 1,12,3:REM SET FOREGROUND COLOR TO DARK RED
30 CIRCLE 1,160,100,65,10:REM DRAW A CIRCLE IN RED (USING THE COLOR SET IN LINE 20)
40 PRINT "THIS IS A CIRCLE":REM THIS TEXT SHOWS UP IN THE TEXT WINDOW AT THE BOTTOM
50 CHAR 1,1,1,"TEXT":REM THIS TEXT APPEARS IN THE GRAPHIC AREA AT THE TOP OF THE SCREEN
60 FOR D=1 TO 500:NEXT D:REM DELAY
70 GRAPHIC CLR:END:REM CLEAN UP THE SCREEN DISPLAY AND END

BASIC 3.5 has many graphical commands available. BOX, CIRCLE, DRAW, etc. CHAR allows you to print text up in the graphical portion of the screen, while PRINT and INPUT will work in the text window at the bottom of the screen. With careful planning, you can draw things on the screen as your game progresses, and have the interaction occur in the lower 4 lines of the text screen. Line 70 shows you how to tidy up everything when the game is over and switch back to the text only screen.

 

As an aside, if you download the Super Expander 64 cartridge image for the C-64 and load it into your emulator, all of these same commands work exactly the same way on the 64's BASIC 2.0. The Super Expander cartridge adds these exact same graphic commands.

 

A good reference location for BASIC 3.5's commands can be found here: http://www.commodore16.com/images/basic35.pdf

Edited by Casey
Link to comment
Share on other sites

Well if commodore has supplied a better version of BASIC, i wouldn't be having so much trouble

You haven't provided a download so we'll have to assume from the screenshot, but this is apparently doing a text-based game and that's something Commodore BASIC does either as well as other dialects or in a few cases better. The "trouble" you've been having is down to putting less than half an hour into the program and then stopping before it was debugged.

Link to comment
Share on other sites

You haven't provided a download so we'll have to assume from the screenshot, but this is apparently doing a text-based game and that's something Commodore BASIC does either as well as other dialects or in a few cases better. The "trouble" you've been having is down to putting less than half an hour into the program and then stopping before it was debugged.

 

I have to agree. If this indeed is a BASIC text only program done in less than 30 minutes then it's not going to be amazing on any 8-bit machine. You can't throw barbs at CBM Basic for that! You may want to at least spend some time getting the text to center on the screen.

Link to comment
Share on other sites

Yeah....you're basically (no pun intended) putting together some code that isn't really finished in anyone's view. When you want to share your work, you want it to be the best you can make it and that means going over it a few times before presenting it.

 

For one thing, I wouldn't want to see commands on the same screen as my game. When you type "run", that screen should be cleared. Then formatting: since you are using text, is it easy to read by others?

 

I think you are trying to learn BASIC and that's a-ok. However I suggest polishing your skills before you present something playable. If anything, blog about your BASIC journey. Maybe that will inspire others to do the same.

  • Like 1
Link to comment
Share on other sites

sorry,it's just that i've had a slew of doctors visits over the week, so i have barely had time.

So don't release until it's done; there's no point in pushing out half finished programs or ideas, it just makes people less likely to be interested if you get something more solid done at a later date. And anybody writing 8- or 16-bit code is in a very similar boat, all of us have families, jobs and indeed medical ailments which can get in the way of coding.

 

you mentioned a download? what format would i use, tape, sna?

It doesn't take much looking around the internet to realise that the most common formats for C64 code online are PRG, T64 and D64 - the latter is the easiest, simply create and mount a disk image in the "Attach disk image" menu on VICE, save the program to it and then detach the image. PRG or T64 can be created from D64 with something like DirMaster.

 

Alternatively, cross develop using a tool like C64 PRG Studio and it'll output something that's basically ready for upload. There's an assembler and other integrated tools for graphics and sound in there as well.

Link to comment
Share on other sites

I wonder how hard it would be to implement a Tapper like game in BASIC, ideally using as few POKEs as possible. I imagine one would define strings full of cursor movement and use functions like LEFT$ or MID$ to extract the desired amount to position text based graphics.

 

Detecting what is where on the screen is the biggest challenge, unless one allows to at least PEEK certain screen locations or setting up shadow arrays where one duplicates what happens on the screen.

Edited by carlsson
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...