How hard is it to learn basic and acembly?

Chat about anything CX16 related that doesn't fit elsewhere
Karrgoot
Posts: 6
Joined: Thu Feb 11, 2021 3:48 am

How hard is it to learn basic and acembly?

Post by Karrgoot »


I have an itch, to program an text based game.

And the game is originaly a pen and papper game, and the rule system it is played in, is called Basic rollplay system. 

I wana maintain the way you play the game in the sens you throw dices but make the program do it for you oviusly. But how hard is it to program.

I need to program rooms, containers, items, npc, stats, skills, initiativ, etc.

I what to have dialog options and a ask funktion where the player can ask the npc about things like you could in fallout 1 and 2. 

No grafics, no sound and no hand holding.

 

Am i barking at the wrong tree och is this be dune?

 

SP: i am dyslektit and english is not my nativ toung. I hope you can read may shity fone typing 

 

 

paulscottrobson
Posts: 300
Joined: Tue Sep 22, 2020 6:43 pm

How hard is it to learn basic and acembly?

Post by paulscottrobson »


It's not difficult, but if you've never programmed before, don't start on something too complicated, build up to it. We all start of with PRINT "HELLO WORLD" or similar ?

There are many BASIC tutorials available for computers like the X16 - Vic20, Spectrum, C64, BBC Micro and so on. Have a look and find one that appeals to you (I've been told the Vic one is good) and try it on an emulator.

What you learn will translate fairly well to the X16.

One issue with dyslexia is that computers are fussy about spelling. For example, many of them are American and use COLOR rather than COLOUR which always drove me mad. So you will have to be careful when using instructions that you spell them correctly. (This may actually help you with your spelling in general, though dyslexia is not my field)

User avatar
kliepatsch
Posts: 247
Joined: Thu Oct 08, 2020 9:54 pm

How hard is it to learn basic and acembly?

Post by kliepatsch »


As Paul said, if you are new to programming, start with simple problems. Even though you intend to not use graphics, your project sounds like ambitious to me. When I started with the Commander X16 emulator, I started with BASIC, even though I intended to transition to machine language pretty quickly. It just gives me a feeling about how the machine works, and gives me some confidence with it. I started by implementing a couple of successively complex toy projects. From "hello world" to more challenging tasks I found interesting. For you, this could be to write a simple question and answer program. Like "How many apples do you want to buy? Enter a number" ... "Ok, you want 10 apples". "You don't have enough money".

You will have a lot of text ("string") processing in your program. This will be challenging to do in machine language. Therefore I would recommend taking your first steps with BASIC, because I think that it provides a bunch of convenient string operations you can use out of the box. If you hit the limits of BASIC programming, you can transition to machine language later.

 

To get started with BASIC, I recommend looking at this page. The Commander X16 can do everything the C64 could do in BASIC and works pretty much the same way. https://www.c64-wiki.com/wiki/BASIC

For more advanced BASIC tutorials, one place to look at would be Dusan Strakls really nice website: https://www.8bitcoding.com/p/commander-x16.html

Karrgoot
Posts: 6
Joined: Thu Feb 11, 2021 3:48 am

How hard is it to learn basic and acembly?

Post by Karrgoot »


Thax paulscottrobson and kliepatsch.

Jay, it is a big plan and I have to bild my confidence and my programig skills b4 i can attempt it. 

There will be Babe steps.

User avatar
desertfish
Posts: 1073
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

How hard is it to learn basic and acembly?

Post by desertfish »


Good luck @Karrgoot it can be very fun and rewarding   Even the first baby steps. They eventually can lead to great things!

Karrgoot
Posts: 6
Joined: Thu Feb 11, 2021 3:48 am

How hard is it to learn basic and acembly?

Post by Karrgoot »


One thing.

 

Can you program a game engine in basic or asembly?

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

How hard is it to learn basic and acembly?

Post by SlithyMatt »



36 minutes ago, Karrgoot said:




Can you program a game engine in basic or asembly?



A game engine would not work very well written in BASIC. It's already an interpreted language, and adding another layer of interpretation would be too much for the X16.

I made an adventure game engine for the X16 in assembly: https://github.com/SlithyMatt/x16-xci

That's another option if you don't want to try learning BASIC or Assembly, and I'm sure other engines will arrive for different types of games that use a similar application-specific language for writing a game

Karrgoot
Posts: 6
Joined: Thu Feb 11, 2021 3:48 am

How hard is it to learn basic and acembly?

Post by Karrgoot »



13 minutes ago, SlithyMatt said:




A game engine would not work very well written in BASIC. It's already an interpreted language, and adding another layer of interpretation would be too much for the X16.



I made an adventure game engine for the X16 in assembly: https://github.com/SlithyMatt/x16-xci



That's another option if you don't want to try learning BASIC or Assembly, and I'm sure other engines will arrive for different types of games that use a similar application-specific language for writing a game



wow so it is possible to do it in assembly, can you have different stats, skills, inventory, equipment and other stuff that are important to have in in a pen and paper roleplaying game!

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

How hard is it to learn basic and acembly?

Post by SlithyMatt »



10 hours ago, Karrgoot said:




wow so it is possible to do it in assembly, can you have different stats, skills, inventory, equipment and other stuff that are important to have in in a pen and paper roleplaying game!



Absolutely. It's not easy, but completely doable. The X16 is significantly more powerful than a C64 or NES, and those types of games were commonplace. I am working on a series of tutorial videos to teach people how to program in assembly language for the X16. It does assume you have some experience with programming in at least a high-level language before.

BruceMcF
Posts: 1336
Joined: Fri Jul 03, 2020 4:27 am

How hard is it to learn basic and acembly?

Post by BruceMcF »



23 hours ago, SlithyMatt said:




A game engine would not work very well written in BASIC. It's already an interpreted language, and adding another layer of interpretation would be too much for the X16.



Note that a Basic compiler would allow for a development approach of working with integrated Basic for "rapid application development" prototyping, even if essentially "in slow motion", while compiling the most effective solutions allows it to respond "at full speed". However, early Basics were not natively equipped with the most effective information management keywords for managing the information needs of a typical adventure game, and implementing those IN Basic would further increase the overheads of working in Basic.

In between Basic and Assembly, both C and Forth offer opportunities for more rapid development than working in straight assembly, with more efficient execution than allowed by a Basic interpreter. However, they are substantially different programming approaches, so there really isn't a "one size fits all" solution in the space in between Basic and Assembly ... its likely different types of people who enjoy C programming and Forth programming.

Post Reply