Page 3 of 6

Posted: Thu Feb 03, 2005 3:42 pm
by Rattrapmax6
Okay, animation? w/GET PUT? :D Thats easy, here you go...

I learnd this on my own so I can break this down 100%, any Qs on any thing I put I can answer... :wink:

Now first off you need to have two ships, both the same except for the flames coming out the rockets.. DIM 'em ship1 and ship2 and GET them... Now you make a master LOOP..

Code: Select all

DO

LOOP UNTIL INKEY$ = CHR$(27)
this keeps the animation going.. now we make a frame control inside the master LOOP..

Code: Select all

DO
FOR i = 1 TO 6
WAIT &H3DA, 8   

FOR a = 1 TO 1000: NEXT 
NEXT  
LOOP UNTIL INKEY$ = CHR$(27)
Now this will alow you to switch the ships every 3 frames.. Now we add the frames using the control "i"

Code: Select all

DO
FOR i = 1 TO 6
WAIT &H3DA, 8
IF i <= 3 THEN PUT (sx, sy), ship1, PSET
IF i > 3 THEN PUT (sx, sy), ship2, PSET
FOR i = 1 TO 1000:NEXT
NEXT
LOOP UNTIL INKEY$ = CHR$(27)
And there you have it, if you want a 100% working example, I'll be more than glad to write that for you,. but this should give you the basics. :wink:

Have fun animating! :D

Posted: Thu Feb 03, 2005 4:49 pm
by Mitth'raw'nuruodo
Helloooo....Ummm I think I see an error in your program.

I don't think that this can happen in QB without undesired results:

Code: Select all

FOR i = 1 to 6

 FOR [b]i[/b] = 1 to 300000: NEXT i
NEXT 
Do you see it?
It's nothing and I get your point, but I already knew that.

I accually wanted to know how do you have more than 1 image per var (ie. ship1), using arrays?

Posted: Thu Feb 03, 2005 7:06 pm
by Rattrapmax6
Sorry I ment to put a "a",.. you see I have loads of debuging runs when I write code,.. I'm a real good debuger from it tho,.. oh well..

Well, I did it like this...

Code: Select all

'I drew my first ship
DIM ship1(20 * 20):GET (1, 1)-(20, 20), ship1

'I drew my second ship
DIM ship2(20 * 20):GET (1, 1)-(20, 20), ship2
Then the rest of the code is there... two diff pics that I alternate back and forth... I'll give you a complete source for animation if you want it? and didn't get it still... :wink:

Posted: Thu Feb 03, 2005 9:46 pm
by Mitth'raw'nuruodo
ummm...How do you figure out the size of the array?

How do you put more than 1 image in an array, for example combined ship1 + ship2 into the same array?

Posted: Thu Feb 03, 2005 9:57 pm
by Rattrapmax6
Well, if you got a 20 * 20 ship, then like

DIM ship1(20 * 20)

.. ect,.. Umm, y do you want to put 'em in the same array? they need to be apart for my animation style.. or I think.. :)

Posted: Thu Feb 03, 2005 10:34 pm
by Mitth'raw'nuruodo
hmmm...Interesting....

I was asking because not just making a game but a simple engine as well that I can modify later. :D

I was also not to long ago thinking of making an AI.

In order to make an AI it has to learn and Adapt (problem solve).

In order to learn it has to understand input, and inorder to understand input it has to learn, inorder to learn it has to underderstand input, You see why this is kinda impratical! EXPECIALLY IN QB!!!!!

Well, whatever you can do in this world you can do in a program...Even AI, everything has steps, whe take in input, store it as data, analize that data and form new data in the form of output (or responses), which that will trigger an reaction from someone else!

Even us posting is a response from stimuli that we see and interpert, and came to this topic.

Now what do you do once you made AI? Do you give it rights? There are some ethnical questions here.

Now our brains are like Thz fast running on pentiums MLCCXIII. They have like Terrabytes of storage, and many Gigs of Ram.
You probally think...wait a minute then why can a computer do more stuff faster?

Well, it can do stuff faster, but its not doing the same amount of work that slows it down.

We are constantly taking in input, REMEMBERING it , forming conclusions, and reacting, all of which we are learning from ALL our past memories, and which we are making new ones.

I don't know about you but in order for a computer to do what we do it has to have like a Gig per milisecond of txt files alone! Now try adding 2+2 on the computer with it analizing, and learning, and adapting, your copmputer would CRASH! Not to mention that THIS IS QB!


I'm sorry I was on a rant, forgive me!

Posted: Fri Feb 04, 2005 11:23 am
by Rattrapmax6
Umm, Mitth, what does this have to do with DIMing arrays? sound to me your on Nathan's Pasrar(forgot how to spell it) system.. :wink:

Posted: Fri Feb 04, 2005 12:55 pm
by Mitth'raw'nuruodo
Ya I was, on both....I go on random topics sometimes....

Ok, I looked at the formula for calcutating the size of the arrays w/get/put and guess what? IT FREAKIN BOILS DOWN TO THE DISTANCE OF THE X AND Y MULTIPLIED!!!!! It was something like this:

array size = INT ( (DX * 8 + 7 ) / 8 ) * ( DY / 8 )
Vs.
array size = DX * DY

:P , I hate making things complicated!

Oh, yeah I still couldn't make my thing in the same array so I did it your way, to my disliking.....But oh well... :wink:

Posted: Fri Feb 04, 2005 2:25 pm
by Rattrapmax6
Oh well, If heard of multi-arrays, but I never tried any, oh well... :wink:

Posted: Fri Feb 04, 2005 6:00 pm
by Mitth'raw'nuruodo
Ya, Oh well :roll:

Posted: Sat Feb 05, 2005 1:44 pm
by Rattrapmax6
:D , I conveted my web gfx to GIF, and now my site looks as I planned,. the Header is now crisp and clear!! Hurray!!

Just click the WWW with the house next to it on the ber under my message to link up. :wink:

I'm redoing the gfx again thu, hopefuly to something I wont get tired of soon.. Tons better than any I have yet done!

Posted: Sat Feb 05, 2005 3:23 pm
by Mitth'raw'nuruodo
kool.

Posted: Sat Feb 05, 2005 3:39 pm
by Rattrapmax6
:D My New PNG Graphics are UP!! :D

Take a look and tell me what you think of my improvment!!
:D http://members.aol.com/rattrapmax6/qbfiles/qbsite.html :D

:shock: Just don't do that, bad 4 your eyes, :wink:

PS: The PNG are on the main page only, I havn't converted the sub pages yet, but they only have 1 BMP on each that are small.. But I'm going to change them to, have no fear..

HeHe, Mitth, I see you've already seen 'em, :wink: 8)

Posted: Sat Feb 05, 2005 6:57 pm
by Mitth'raw'nuruodo
Rattrapmax6 wrote:But I'm going to change them to, have no fear..
See? I AM very observant, and when I see something like spelling, It naggs at me so: too not to. There you go.

BTW, whats a PNG?

Posted: Sat Feb 05, 2005 7:04 pm
by Rattrapmax6
Portable Network Graphics,. like GIFs but smaller, website freindly.. :wink: ,..

I could have just put 2, but as for the too,. my keyboard sticks, I miss alot of words,.. I have to go back and edit my post half the time.. :wink:

Posted: Sat Feb 05, 2005 7:06 pm
by Mitth'raw'nuruodo
oh, hehe! :wink:

Posted: Sat Feb 05, 2005 7:10 pm
by Rattrapmax6
Yeah, my new avatar over there is PNG, hehe!! 8) :wink:

Posted: Sat Feb 05, 2005 7:17 pm
by Mitth'raw'nuruodo
Ok thats cool.

Ummm....I wonder if you wouldn't mind making my program into a internet co-project. More specifically, when I'm done making it, would you mind writing in some music/sound effects?

Posted: Sat Feb 05, 2005 7:23 pm
by Rattrapmax6
Yeah, I need to figure how to get it in the backround betta,. seems in real time it locks alittle, I'm working on it.. :wink: Have no fear, I can make the sounds,. :D ,. just got some bugs to look over..

I like the Idea! :wink:

Posted: Sat Feb 05, 2005 7:46 pm
by Mitth'raw'nuruodo
Ya, ok You do that.