Omnimaga

Calculator Community => Other Calculators => Topic started by: tifreak on June 25, 2005, 03:27:00 pm

Title: Basic Elite
Post by: tifreak on June 25, 2005, 03:27:00 pm
The BASIC Elite is composed of a group of programmers who are trying to get out all the known tips and tricks and other not-so-well known tricks, as well as interviews with top programmers, and reviews for top programs located in the community.

We are looking for more members to join this news letter (some here already have) to help contribute with giving out info. Anyone who is interested needs to contact either Kerm Martian or Jonathan Pezzino at http://cemetech.net/forum

There are also 2 pages that offer the guides for reading:

http://cemetech.net/projects/basicelite/

and

http://tifreakware.calcgames.org/be.htm
Title: Basic Elite
Post by: mdjenkins86 on June 25, 2005, 05:42:00 pm
Cool
Will do.
Title: Basic Elite
Post by: DJ Omnimaga on June 26, 2005, 07:53:00 am
Actually I didnt joined before because I though I would not be abl;e to contribute enough, but now that I saw there is interviews and stuff like this I think I might join soon :)smile.gif
Title: Basic Elite
Post by: tifreak on June 26, 2005, 10:39:00 am
Thanks, we can use all the elite we can get! :)smile.gif

I also just finished my article on the 3 forms of hit detection, I just need to get it uploaded...
Title: Basic Elite
Post by: DJ Omnimaga on June 26, 2005, 02:34:00 pm
cool, lot of ppl always ask for collision detection detection in BASIC. Are you going to explain collision detection for Matrix , strings and pictures and how to make maps?

The BASIC elite look really nice and I come here everyday (I cannot post though :(sad.gif ), could I post a news article linking to hyriu and fryedsoft interview once they are finished?
Title: Basic Elite
Post by: tifreak on June 26, 2005, 03:27:00 pm
I explained how to use strings, matrices, and lists. http://tifreakware.calcgames.org/downloads/aticlefiles.zip

And I don't see a problem with linking... :)smile.gif
Title: Basic Elite
Post by: DJ Omnimaga on June 27, 2005, 01:47:00 am
You alerady made it  O_Oshocked2.gif ? cool, I read through it and it looked very well written. Of course I dont need it much since I know how to do most of that stuff  :laugh:evillaugh.gif but good job. :)smile.gif
Title: Basic Elite
Post by: tifreak on June 27, 2005, 07:08:00 am
lol, Well, I am not that great at writing things. Thanks. :)smile.gif

I was trying to make it easily understanable, without making it like I am trying to teach newbies... Did I succeed?

Also:

QUOTE
Of course I dont need it much since I know how to do most of that stuff


Was there something that you learned from it?
Title: Basic Elite
Post by: DJ Omnimaga on June 27, 2005, 07:13:00 am
well its hard to tell because I know almost all that stuff O_Oshocked2.gif
Title: Basic Elite
Post by: tifreak on June 27, 2005, 07:18:00 am
lol. I know you know most of it. I am glad that you like the article. :)smile.gif
Title: Basic Elite
Post by: dysfunction on June 27, 2005, 02:55:00 pm
The article was very useful, but I already knew almost every technique in there, and the rest (one or two) I won't use. About the run indicator thing, what is the point of that? It doesn't turn off the run indicator, just erase it, which seems pointless because the run indicator ges away after finishing operations anyways.
Title: Basic Elite
Post by: DJ Omnimaga on June 27, 2005, 03:06:00 pm
well its pointful if you dont want to use any ASM libs in your prgms, but CODEX turns it off completly
Title: Basic Elite
Post by: tifreak on June 28, 2005, 02:18:00 am
Some people don't like the run indicator, and really don't like asm, since some people think it is always unstable, so something like that they eat up... :)smile.gif
Title: Basic Elite
Post by: DJ Omnimaga on June 28, 2005, 02:31:00 am
QUOTE
the run indicator ges away after finishing operations anyways.
no it keeps running as long as the BASIC program runs, so basically Text(-54125+1,0,90," " will make it not dissapear but stay almost invisible. I do that In Illusiat 2004 sometimes
Title: Basic Elite
Post by: mdjenkins86 on June 28, 2005, 01:37:00 pm
Very interesting, can you explain to me exactly how you implemented the hit detection.  Tell me in psudo code.  i see you had live lists, so does this mean that you are writing over the L1, L2...  is there a way for you to preserve that list if someone had some data in it. I understand your code, but I need pseudo code so I can write a tutorial in 89 Basic that 83 programmers can relate to.
This way I can explain I can do what you did with the matrices, and then translate a similar function into 89 Basic.  If you want, I can write a discription of how I did collision in 89.
Title: Basic Elite
Post by: tifreak on June 28, 2005, 03:07:00 pm
Do you want me to explain the string, matrix, or list detection? :)smile.gif
Title: Basic Elite
Post by: mdjenkins86 on June 28, 2005, 03:48:00 pm
matrix please :)smile.gif
Title: Basic Elite
Post by: mdjenkins86 on June 28, 2005, 03:57:00 pm
I do collision detection using a binary test.  A matrix is scanned in and the plotter test conditions for movement.  You can walk onto places with a one on them.  If the tile has a zero then its a collision. In other words...The screen is split into 40 sections.  It is 8 by 5.  If you are on tile on and dress down, tile 9 (or map[1,9]) will be tested to see if it has a zero in that corresponding cell.  If it does, you cant move to that section.

Each map is made of 3 maps
Map1Tiles
Map1Collision
Map1Event

The first on draws the map made of 40 cells
The second on has a 0 or 1 for each of the 40 tiles
The third allows events to be written under each cell.

The movement program runs until the event stacker is populate with an event from one of the cells.
Title: Basic Elite
Post by: tifreak on June 28, 2005, 04:15:00 pm
Ok, matrix detection is extremely simple on the 8x series. Since the matrix only handles numbers, you have to use a converter to change the numbers into what it is you want displayed. You can also use the numbers to determine hit detection, since in the case of the 8x, you have an 8x16 screen, you have an 8x16 matrix, so you can use the variables that control the character to also navigate the matrix at the same time. You would just need conditions that would search [A](var+/-1,var+/-1), the conditions depending on which key is pressed.

The map data itself is figured by a coordinate system, kinda like a grid on a map. I use 0,0 as the top left corner, and work my way down. This map data is then stored into any matrix that you wish to use.

You also have to comprise the hit detection in to two parts for this to work, without getting dimension errors. This would be edge-of-screen detection, and not-at-the-edge-of-screen detection, basically a bunch of < and > symbols.

The events are easily handled, as there is a line of code that searches to see if the character is standing on a spot that isn't empty. You do not have to make sure about walls and stuff, since the hit detection does that when you move the character. :)smile.gif

I think that is everything...
Title: Basic Elite
Post by: mdjenkins86 on June 28, 2005, 04:32:00 pm
QuoteBegin-tifreak8x+June 28, 2005, 22:15-->
QUOTE (tifreak8x @ June 28, 2005, 22:15)
Ok, matrix detection is extremely simple on the 8x series. Since the matrix only handles numbers, you have to use a converter to change the numbers into what it is you want displayed. You can also use the numbers to determine hit detection, since in the case of the 8x, you have an 8x16 screen, you have an 8x16 matrix, so you can use the variables that control the character to also navigate the matrix at the same time. You would just need conditions that would search [A](var+/-1,var+/-1), the conditions depending on which key is pressed.

The map data itself is figured by a coordinate system, kinda like a grid on a map. I use 0,0 as the top left corner, and work my way down. This map data is then stored into any matrix that you wish to use.

You also have to comprise the hit detection in to two parts for this to work, without getting dimension errors. This would be edge-of-screen detection, and not-at-the-edge-of-screen detection, basically a bunch of < and > symbols.

The events are easily handled, as there is a line of code that searches to see if the character is standing on a spot that isn't empty. You do not have to make sure about walls and stuff, since the hit detection does that when you move the character. :)smile.gif

I think that is everything...  

 Oh my god, That is almost exactly how I do it.
Great minds I tell you. :)smile.gif
Title: Basic Elite
Post by: tifreak on June 28, 2005, 04:43:00 pm
lol, but I prefer the string detection, since it is much faster, and consumes a third less of space...
Title: Basic Elite
Post by: mdjenkins86 on June 28, 2005, 04:52:00 pm
Go on...tell me more do you string matrices, because that just gave me a huge idea, I wonder how much space I could save....
Title: Basic Elite
Post by: tifreak on June 28, 2005, 05:04:00 pm
Well, I am not totally sure how strings work on the 89...

You store your map data to a string, which is simple enough. I have used it for graphics on the homescreen, and for the graphscreen with 8x8 tiles. What you have to do is take how many per row, and then how many per column, multiply, and that has to be the length of the string. Using a converter for tiles (the homescreen just requires the output command) you have the screen place the tiles and what not. Then you need to determine where the character starts at.

Say, for intents and purposes, the tile map is 8x16, and the character starts on the 5 row, 3rd from the left. 4*16 is 64, +3 is 67. so you need to set a variable to 67. Please note that there is a command on the 83/83+ that allows us to go through a string, starting at a defined point, ending at a defined point that will show what is there.

any who, when moving left or right 1 space, you ass/subtract 1. when moving up or down, you add/subtract 16. if moving from screen to screen, up/down requires add/subtract 112, while moving left/right from screen to screen requires add/subtract 15.

This of course varies with screen and map sizes...

If I knew more about strings and stuff on the 89, I would be able to provide more detailed info on it... :)smile.gif
Title: Basic Elite
Post by: mdjenkins86 on June 28, 2005, 05:19:00 pm
I see what you did and no I don't know how to do this in 89 basic.   :(sad.gif I could do this in C with no problem.
Title: Basic Elite
Post by: tifreak on June 29, 2005, 02:16:00 am
Well, I shall look into this, maybe I can come up with something that is relatively close...
Title: Basic Elite
Post by: DJ Omnimaga on June 29, 2005, 02:33:00 am
O_Oshocked2.gif

wow I got lot of reading this morning (compared to maxcoderz forum)

I like strings a lot for ASCII games because you can have the scrolling using wordwrap I mentionned a month ago if I remember but I prefer matrices for tilemaps (graphical) because it allow us for instant map loading using ASM libs and they are easier to modify. With strings you have to take the first part of the string, combine it with the new character and combine it with the rest of the string to change a character. Using ASM libs isnt really a good idea for people who just want to show how powerful BASIC can be tho because its not pure BASIC.
Title: Basic Elite
Post by: tifreak on June 29, 2005, 02:58:00 am
Well, we try to keep you busy. :)smile.gif
Title: Basic Elite
Post by: mdjenkins86 on June 29, 2005, 03:51:00 am
Kevin- I remember you talking about that before.  On the 89, only text can be outputed so scrolling would have to use another method.  There is the recycling method.  Which alows you to scroll up and left...but not down or right....but in c maybe...
Title: Basic Elite
Post by: DJ Omnimaga on June 29, 2005, 04:28:00 am
I should try to make a racing tunnel in ASCII in ETP studio :)smile.gif
Title: Basic Elite
Post by: DJ Omnimaga on July 05, 2005, 02:42:00 pm
btw are the recent interviews with Hiryu and Fryedsoft finished yet? If so will they're be included in the next newsletter?
Title: Basic Elite
Post by: tifreak on July 08, 2005, 12:53:00 pm
oops, forgot about this topic... :oops:embarassed.gif

As far as I know, we will just have to see. I don't have anything to do with the actual publication.