Page 1 of 2

Parsec - I'm making a game

Posted: 26 Jun 2020, 04:40
by blaknite
Hey Everyone!

I ordered a Gigatron kit a couple of weeks back and have been waiting impatiently for it to make its way here to me in Australia. Walter let me know it could take up to 8 weeks! No worry though, I figured I could get a head start on learning how to program it and set up a bit of a development environment.

Given I'm a Ruby developer, I've taken a bunch of inspiration from the existing vASM assembler written in Python and gone about learning the architecture and instruction set. It's been super fun!

All this fiddling about has started to evolve into a game which I've called "Parsec". I plan for it to be a side-scroll space shoot-em-up. Attached is my progress so far. It's currently just a tech demo of the ship moving and firing, but I'm pretty happy with how it's coming together.

I can't wait to see this run on my real-life Gigatron when its built :D

parsec.gt1
Give it a go!
(3.17 KiB) Downloaded 229 times
Sneaky loading of bytes directly into screen memory
Sneaky loading of bytes directly into screen memory
loading_screen.png (34.65 KiB) Viewed 4874 times
Ship firing its lasers
Ship firing its lasers
lasers.png (27.65 KiB) Viewed 4874 times

Re: Parsec - I'm making a game

Posted: 26 Jun 2020, 06:49
by at67
Looks great and works great on real hardware, good stuff!

Re: Parsec - I'm making a game

Posted: 26 Jun 2020, 06:54
by walter
New games! Cool!! You might want to get your code in github in the contrib section.

Re: Parsec - I'm making a game

Posted: 26 Jun 2020, 07:29
by blaknite
at67 wrote: 26 Jun 2020, 06:49 Looks great and works great on real hardware, good stuff!
That's a massive win! Thanks for giving it a go :)
walter wrote: 26 Jun 2020, 06:54 New games! Cool!! You might want to get your code in github in the contrib section.
Thanks, I'll definitely do that soon. I've been finding that section a fantastic resource while I've been learning. How do I go about doing getting it in there?

Re: Parsec - I'm making a game

Posted: 26 Jun 2020, 08:27
by walter
I think at67 will send you a message.

Re: Parsec - I'm making a game

Posted: 26 Jun 2020, 08:34
by at67
blaknite wrote: 26 Jun 2020, 07:29 Thanks, I'll definitely do that soon. I've been finding that section a fantastic resource while I've been learning. How do I go about doing getting it in there?
You'll need to have git installed and a github account, (you can manage everything from the git command line and through github's browser interface).

Clone the entire repo at https://github.com/kervinck/gigatron-rom into a suitable directory.

Code: Select all

git clone https://github.com/kervinck/gigatron-rom
Make a directory under gigatron-rom\Contrib, e.g.

Code: Select all

md/mkdir gigatron-rom\Contrib\blaknite
Copy all your code and resources into this new directory, (use whatever directory structure that makes sense for you and your projects that you like). Don't meddle with anyone else's Contrib areas or the main repo itself, but if you want to experiment with other people's stuff, go ahead and do it on a different local copy of the main repo, (you can make as many clones of the main repo as you like), don't experiment on the repo that you will be making pull requests from.

Check your local repo is not modifying any files outside of your Contrib area:

Code: Select all

git status
Update your local repo with your changes:

Code: Select all

git add .
git commit -a
Do a push of your local repo, (the gigatron-rom you just cloned and your new Contrib\blaknite changes), to your remote repo in github.

Code: Select all

git push
Once you are ready to make the pull request, do the following:

Code: Select all

- login to github in your favourite browser.

- go to your gigatron-rom repo and click on the Pull Requests tab across the top.

- click on the green New Pull Request button, (this should give you a list of changes that you have made to the repo).

- make sure you have only made changes to the Contrib\blaknite area.

- add a title/version/description and click Create Pull Request
Your code will be checked for merge conflicts, (which shouldn't exist as you're only making changes to your own area under Contrib), it will then be merged into the main repo, (Pull Requests are checked daily).

In the context of this message:
- main repo means https://github.com/kervinck/gigatron-rom
- remote repo means your github repo
- local repo means your local physical copy of the repo

More information can be found here.
https://www.atlassian.com/git/tutorials ... ll-request

Re: Parsec - I'm making a game

Posted: 26 Jun 2020, 11:41
by blaknite
Easy. Thank you!

I've got an existing git repo for what I've been working on. I'll also fork kervink/gigatron-rom and commit some of my stuff to it periodically and submit some PRs. As I get more familiar with the platform I'd love to contribute to the rom. In particular, I've found the sys functions super handy.

Until then, feel free to have a look at what I've got so far at https://github.com/blaknite/gigatron. If you spy any patterns I've been using that have more optimal approaches, I'd love the feedback :)

Re: Parsec - I'm making a game

Posted: 26 Jun 2020, 12:09
by qwertyface
blaknite wrote: 26 Jun 2020, 04:40 Given I'm a Ruby developer, I've taken a bunch of inspiration from the existing vASM assembler written in Python and gone about learning the architecture and instruction set. It's been super fun!
I'm a Python guy, but I must say that I think your vASM as a Ruby embedded DSL looks really nice - very little visual noise. I like the way you have a macro function which consumes a block - it signals the intent much more clearly than having a function for each macro.

Re: Parsec - I'm making a game

Posted: 26 Jun 2020, 12:45
by blaknite
qwertyface wrote: 26 Jun 2020, 12:09 I'm a Python guy, but I must say that I think your vASM as a Ruby embedded DSL looks really nice - very little visual noise. I like the way you have a macro function which consumes a block - it signals the intent much more clearly than having a function for each macro.
Thanks! It's one of the things I like most about Ruby. It lends itself really well to DSLs. In this case it almost looks just like a *.asm file :D

Re: Parsec - I'm making a game

Posted: 26 Jun 2020, 16:57
by delpozzo
Great work blaknite! It worked perfectly on my Gigatron (currently running ROMv4), very smooth!