Page 3 of 11

RETROTrek - Early Development Thread

Posted: Tue Sep 08, 2020 3:23 am
by rje


Just now, Starsickle said:




That's encouraging to hear! Perhaps put this in Issues or feature requests? The good news is not everything in software is monolithic and set in stone.



Yes, add in a request in the ROM project on Github.  


RETROTrek - Early Development Thread

Posted: Tue Sep 08, 2020 5:38 am
by Ender


2 hours ago, Starsickle said:




Otherwise - with the Mission start and game over screens complete, I though I'd implement the "PRESS ANY KEY" as advised, but I've found that...it doesn't work. It just goes right through.



I've tinkered with pic below and a few guides on GET just to see if I'm not using it correctly, but code below seems to be on mark with what I was told would work.




10 PRINT "TESTING ANY KEY TO CONTINUE!"
11 A$ = "A"
20 GET A$: PRINT "YOU TYPED: "A$
21 IF A$="" THEN 40
30 PRINT "NO NO NO STOP" : STOP
40 PRINT "CONTINUING" : END



As a note: I've tried this by initializing A$ to "", "1", ""0", and "A". I've looked around the site for comparable code to see what I might be doing wrong, but have not yet found a piece to draw from. I don't want to post problems like this in programming help, as it's not clear if it's something with the emulator, something with the way I'm using it, or something else. I just wanna let everyone know I am looking things up and tinkering before posting here with a programming-related issue. I figure I'll find an answer by asking faster than staring at things that are 40 years old.



 



I think what you're looking for is something like this. You want it to keep waiting until A$ isn't "".


Quote




10 PRINT "TESTING ANY KEY TO CONTINUE!"



20 GET A$: IF A$ = "" THEN 20



30 PRINT "YOU TYPED: "A$



40 PRINT "CONTINUING": END



 


RETROTrek - Early Development Thread

Posted: Wed Sep 09, 2020 2:02 am
by TomXP411


23 hours ago, rje said:




when I start to lose track of my variables, because I don't have a separate document with a dictionary of variables I'm using and where they're used, etc.



There's an obvious solution to that.  ?



That is exactly what I've started doing. I keep a companion document with variable names and the line numbers of subroutines, so I can refer back to them as needed. While 2-character names still bite, I find that they're a lot easier to deal with when I have a data dictionary right there on the screen.

When the eventual BASIC editor for CX16 comes to fruition, I hope it comes with a tool to keep notes in a separate file that we can switch back and forth to at any time...


RETROTrek - Early Development Thread

Posted: Wed Sep 09, 2020 4:57 pm
by Starsickle


14 hours ago, TomXP411 said:




There's an obvious solution to that.  ?



That is exactly what I've started doing. I keep a companion document with variable names and the line numbers of subroutines, so I can refer back to them as needed. While 2-character names still bite, I find that they're a lot easier to deal with when I have a data dictionary right there on the screen.



When the eventual BASIC editor for CX16 comes to fruition, I hope it comes with a tool to keep notes in a separate file that we can switch back and forth to at any time...



Or we can go full IDE and it just knows all the variables, subroutines, tasks, TODOs, FIXMEs, and parameters in the project. A lot of work, but worth it if you're serious about a platform.

If we have a mouse, CTRL-C, CTRL-F, and CTRL-V, we can program in THIS century. XD



Update for today: I've dusted off the old Github (https://github.com/Starsickle) and I'm back up and running. No projects yet, as I'm basically in the "notepad and copypaste it into EMU" phase of things. I would love an IDE, so if ATOM or IDEA or ECLIPSE have something for C64 basic or X16 Platform BASICv2, please let me know.  I have, however, submitted two issues to the rom project and looking for things I may be able to contribute to, including documentation and tutorials.



On the RETROTrek side of things, I'm currently working on understanding how to read and write complex data into and out of arrays, but I may have bitten off more than I can chew - this is the subject that's halted my SMILEBasic project, as I am used to high level data structures and OOP doing all the heavy lifting instead of the highly segmented memory management and sequential R/W situation in BASIC.

Otherwise, I am also currently doing some code cleanup. It's been rough recently, so I'm going to slow down a bit and focus on filling out the things I can find that are easy to calculate and build and test.


RETROTrek - Early Development Thread

Posted: Wed Sep 09, 2020 5:50 pm
by SlithyMatt

Atom does have BASIC support, but it also has a really nice package for 6502 assembly, supporting all the major assemblers including ca65.


RETROTrek - Early Development Thread

Posted: Wed Sep 09, 2020 5:52 pm
by rje

Because it's easy, I implemented long variables in my pre-processor.  So I pre-declare with

 

longvar /my_long_var_name$  ml$

 

And the pre-processor keeps two maps (in both directions) and complains if something gets stomped on.

 

Of course, if I don't pre-declare a short variable, I can still stomp on it all day long.

 


RETROTrek - Early Development Thread

Posted: Wed Sep 09, 2020 6:24 pm
by Starsickle


34 minutes ago, SlithyMatt said:




Atom does have BASIC support, but it also has a really nice package for 6502 assembly, supporting all the major assemblers including ca65.



Nice. I'll have to check that out. I've been toying with Atom for Python earlier this year; I'll give it a spin on BASIC, now. Any helpful links/extensions appreciated.

As for the game, I've gotten some basic data stuff working. Apparently I have to separate String arrays from numerical arrays, so the ship data will be split up between two arrays that contain string information and numeric information. This creates a big problem for dynamically managing these memory spaces, but I've decided early versions of the game will not have randomly generated content and instead have static content first. There will be ten ships in these early versions.

With that solved, at least for now, I'll move onto implementing those ships and various rules into the game. For now, I'll be working towards the Phase I implementation of the game's structure - 10 Sectors.

 

In general - Ships will have a Scale, which determines various other stats like its systems, crew, and torpedos. You damage systems until the engines or structure are at 0 - after which the ship is destroyed. Tracking this will be messy at first, but a simple isDead flag will have to do. As well, Scale will determine how many crew and away team may be deployed to board a vessel. These are mechanics I'd like to finish later, but would be interested in since they appeared in DOS/Tandy1000 games.



The available weapons to start will be Phase Cannons, Torpedos, and the risky but powerful Particle Beam.


RETROTrek - Early Development Thread

Posted: Wed Sep 09, 2020 6:29 pm
by SlithyMatt


4 minutes ago, Starsickle said:




Any helpful links/extensions appreciated.



https://atom.io/packages/language-cbmbasic

X16 BASIC is close enough, and gets you this:

image.thumb.png.65b37f35d0432e9472b0ce82295acfeb.png


RETROTrek - Early Development Thread

Posted: Wed Sep 09, 2020 7:08 pm
by Starsickle

Oh yes....that's much better. MUCH better. Thanks much. That will preserve a lot of Sanity.


RETROTrek - Early Development Thread

Posted: Wed Sep 09, 2020 8:58 pm
by rje

Back to RETROTrek.

These retro space games need a purpose.  As I recall, the Trek games I played way back when involved hunting down and (ahem) neutralizing enemy ships -- cleaning out a region of space.  Starbases would be available for repairs, reloading, perhaps for refitting, or whatnot.

Is that RETROTrek's mission?