Jump to content
IGNORED

Asteroids Simulator Source Code


Recommended Posts

Hiya Folks,

 

Here's the source to my Asteroids Simulator program. Hopefully it could be of some use to some other beginner a8 programmer such as myself. I use atasm on linux. For atasm the command I use to compile is:

atasm -v -s -xasim.atr -oasim > asim.lst asim.m65

And that produces the executable asim, and asim.atr

It will only let me attach zip files so,

unzip asim.zip

will give you asim.m65

then do the atasm command above which should give you an .atr and an atari object file. I am on to my next a8 project which will be an rpg. Original thread is here

asim.zip

  • Like 5
Link to comment
Share on other sites

This is GREAT!

I'm trying to get back into 6502 assembler and your code will really help that. In fact, I'd love to see other contribute to code examples. I know there is a lot of knowledge out there as far as code tips and tricks. I think it would be great if others could submit code examples on how to do certain routines either by text or even screen-to-videos lessons.

BTW: I don't have the luxury of a real Atari 8-bit anymore (My 800 and 130xe have long since been sold :-( ) so I'm using Atari800Win Plus 4.0 and when I compile and run this, it looks like the two attachments. I'm assuming this isn't what you had intended it to look like.

post-27496-0-48852100-1310227521_thumb.png

post-27496-0-10307100-1310227527_thumb.png

Link to comment
Share on other sites

This is GREAT!

I'm trying to get back into 6502 assembler and your code will really help that. In fact, I'd love to see other contribute to code examples. I know there is a lot of knowledge out there as far as code tips and tricks. I think it would be great if others could submit code examples on how to do certain routines either by text or even screen-to-videos lessons.

BTW: I don't have the luxury of a real Atari 8-bit anymore (My 800 and 130xe have long since been sold :-( ) so I'm using Atari800Win Plus 4.0 and when I compile and run this, it looks like the two attachments. I'm assuming this isn't what you had intended it to look like.

 

Thanks for checking it out. Yes unfortunately that is exactly how it is supposed to look, lol. The title screen was just thrown together as an afterthought and the important thing was to get the copyright notice so I didn't bother fixing the garbage on the screen. And the reason it looks so horrible was because it is expensive cpu-wise to move stuff around in full screen in that mode. When I started the project I kinda new that would be the case, so I went for using the easiest shapes to work with, even though it would look horrible. My main goal was to get the basics down to be able to create all the elements of a full game and I think I was successful in that. In the original threads version(linked in OP) the 'asteroids' were solid squares, but in this version I only drew the corners to see if I could get the number of asteroids I wanted without it slowing down, which I couldn't. Also that short line in the upper left indicates the frame rate. If it is at position 0 you are getting 60 fps, position 1 - 30 fps, pos 2 - 20 fps, etc. you can turn off the debugging stuff by setting the debug variables to 0.

Edited by invisible kid
Link to comment
Share on other sites

In fact, I'd love to see other contribute to code examples. I know there is a lot of knowledge out there as far as code tips and tricks. I think it would be great if others could submit code examples on how to do certain routines either by text or even screen-to-videos lessons.

 

I have to agree with this. The more shared code that we have, the better. It would be great if we could share our routines and others can comment on the code to improve it to make it as efficient as possible. http://wiki.strotmann.de/wiki/ appears to be a good location for doing something like this. The great thing about this site is that there are different sections for different programming languages. People can also put videos onto Youtube and then link into those.

Link to comment
Share on other sites

Thanks for checking it out. Yes unfortunately that is exactly how it is supposed to look, lol. The title screen was just thrown together as an afterthought and the important thing was to get the copyright notice so I didn't bother fixing the garbage on the screen. And the reason it looks so horrible was because it is expensive cpu-wise to move stuff around in full screen in that mode. When I started the project I kinda new that would be the case, so I went for using the easiest shapes to work with, even though it would look horrible. My main goal was to get the basics down to be able to create all the elements of a full game and I think I was successful in that. In the original threads version(linked in OP) the 'asteroids' were solid squares, but in this version I only drew the corners to see if I could get the number of asteroids I wanted without it slowing down, which I couldn't. Also that short line in the upper left indicates the frame rate. If it is at position 0 you are getting 60 fps, position 1 - 30 fps, pos 2 - 20 fps, etc. you can turn off the debugging stuff by setting the debug variables to 0.

Well that sucks. I was going to try to make them look like the asteroids from the arcade game but due to what you said, that's a big weakness for something that would look pretty cool. I guess that's why the official Asteroids on the 8-bit looked the way it did. What sucks is that the original arcade game also used a 6502 but I'm guessing vector graphics are less cpu intensive.

Edited by Justin Payne
Link to comment
Share on other sites

I have to agree with this. The more shared code that we have, the better. It would be great if we could share our routines and others can comment on the code to improve it to make it as efficient as possible. http://wiki.strotmann.de/wiki/ appears to be a good location for doing something like this. The great thing about this site is that there are different sections for different programming languages. People can also put videos onto Youtube and then link into those.

 

Nice! I'm going to have to check this out. Thanks.

Link to comment
Share on other sites

Well that sucks. I was going to try to make them look like the asteroids from the arcade game but due to what you said, that's a big weakness for something that would look pretty cool. I guess that's why the official Asteroids on the 8-bit looked the way it did. What sucks is that the original arcade game also used a 6502 but I'm guessing vector graphics are less cpu intensive.

 

Yeah, I think you are right, the original arcade game used a 6502 like the one in the 8 bits, but some of the load was taken by the vector display system. But check out this thread, there's still hope.

Edited by invisible kid
Link to comment
Share on other sites

Yeah, I think you are right, the original arcade game used a 6502 like the one in the 8 bits, but some of the load was taken by the vector display system. But check out this thread, there's still hope.

 

Well, it like others are already on it. Well, that's OK. Your Asteroids game gave me an idea for another game concept but with less shooting and more mining.

Link to comment
Share on other sites

  • 1 month later...

I just came across this thread and the original one where you originally posted the binary. First off, I just wanted to say that it's a very nice piece of work. The sound effects and game physics are spot on and give it a feel that is very authentic to the original. I realize you have accomplished what you set out to and that you can't have more Asteroid objects on screen without slowing things down (given the techniques the program is using). Have you considered taking what you have and maybe turning it into a two player space war type of game? I think it would have great physics and be smooth as glass. Just a thought.

 

BTW, you have inspired me to blow the dust off my own Rasteroids project and finish it. Your sound effects and physics are far superior to my own and I'm going to study your code and try and learn from it so that I might improve my own.

 

Thanks for sharing your work with the community. It is much appreciated.

 

tjb

Link to comment
Share on other sites

I just came across this thread and the original one where you originally posted the binary. First off, I just wanted to say that it's a very nice piece of work. The sound effects and game physics are spot on and give it a feel that is very authentic to the original. I realize you have accomplished what you set out to and that you can't have more Asteroid objects on screen without slowing things down (given the techniques the program is using). Have you considered taking what you have and maybe turning it into a two player space war type of game? I think it would have great physics and be smooth as glass. Just a thought.

Thanks for taking a look, I've been watching your project evolve with great interest. I have thought about the space war angle, but got a little burnt out working on it and wanted to start other projects and go in a direction of simpler graphics modes and using player missiles etc.

 

BTW, you have inspired me to blow the dust off my own Rasteroids project and finish it. Your sound effects and physics are far superior to my own and I'm going to study your code and try and learn from it so that I might improve my own.

Awesome! The physics were made a bunch easier by cheating on the ship design, making it into a ufo shape. I dreaded doing a proper ship shape like yours has. For the sound effects I just used trial and error set up as a data table. Some of my tries are still in the code and commented out. All of us assembler programmers know that even our own assembly code will look like a spaghetti ball, so if you or anyone reading the thread would like an explanation on a certain area, just mention it, and I will try to re-learn it. :)

 

Thanks for sharing your work with the community. It is much appreciated.

 

tjb

My pleasure.

Link to comment
Share on other sites

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...