create account

C64 Game Update 3: I'm actually enjoying programming in BASIC and I don't care what anyone thinks about that by makerhacks

View this thread on: hive.blogpeakd.comecency.com
· @makerhacks ·
$4.91
C64 Game Update 3: I'm actually enjoying programming in BASIC and I don't care what anyone thinks about that
![VRPC__VRPC___VNC_Viewer.png](https://files.peakd.com/file/peakd-hive/makerhacks/LrEQ70mY-VRPC__VRPC__-_VNC_Viewer.png)

As you can see, my game has a name now :) There are also more monster/object types. I'm still enjoying the programming process.

There's a stigma about programming in basic, though - even compiled basic - and I am not entirely sure why.

Yeah, "GOTO considered harmful" and all that, but you don't have to use GOTO if you don't want to.

Heck, in a modern basic you don't even need to use GOSUB.

One thing I found confusing in this XC Basic (a compiled basic for C64), was it has parameterized Procedures (subroutines) with private variable scope, but didn't seem to have access to Global variables (I know, I know). 

Turns out to access a Global you simply add a \ to the variable name:

```
dim this_is_global$
let this_is_global$ = "second line"

proc testing(x$)

        print x$
        print \this_is_global$

endproc

call testing("first line")   
```

You can also even pass a pointer as a parameter, and therefore use that to return a value.

```
proc somesub(result_addr)
  somevalue = 1
  doke result_addr, somevalue
endproc

result = 0
call somesub(@result)
print result
```
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 50 others
properties (23)
authormakerhacks
permlinkc64-game-update-3-i-m-actually-enjoying-programming-in-basic-and-i-don-t-care-what-anyone-thinks-about-that
categorytechnology
json_metadata"{"app":"peakd/2020.07.1","format":"markdown","description":" I'm actually enjoying programming in BASIC and I don't care what anyone thinks about that","tags":["technology","programming","retrogames","stemgeeks"],"users":["result"],"image":["https://files.peakd.com/file/peakd-hive/makerhacks/LrEQ70mY-VRPC__VRPC__-_VNC_Viewer.png"]}"
created2020-07-24 18:58:45
last_update2020-07-24 18:58:45
depth0
children0
last_payout2020-07-31 18:58:45
cashout_time1969-12-31 23:59:59
total_payout_value2.589 HBD
curator_payout_value2.325 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,211
author_reputation156,977,359,570,955
root_title"C64 Game Update 3: I'm actually enjoying programming in BASIC and I don't care what anyone thinks about that"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,698,753
net_rshares14,085,633,662,825
author_curate_reward""
vote details (114)