Jump to content

Photo

3D effects ...

XB

10 replies to this topic

#1 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 2,751 posts
  • Location:Denmark

Posted Mon Feb 13, 2012 3:11 AM

3D effects #1

surface0001.png
 
100 CALL CLEAR::CALL SCREEN(2)::CALL MAGNIFY(3)
110 FOR C=1 TO 8::C$=C$&RPT$("F",C*2)&RPT$("0",C*2)::NEXT C
120 CALL CHAR(40,SEG$(C$,1,64),44,SEG$(C$,65,64))
130 FOR C=40 TO 47::CALL HCHAR(C-23,1,C,32)::NEXT C
140 CALL CHAR(36,"0E0A6BF99087CF67371310180C060301E0A0AC3E12C2E64C5890103060C08")
150 CALL COLOR(2,7,1)::CALL SOUND(150,110+S*20,0)
160 CALL SPRITE(#S+1,36,5,120,60+S*40,16,0)
170 CALL COLOR(2,1,7)::CALL SOUND(150,110,30)
180 S=(S+1)AND 3::GOTO 150

icon_smile.gif

Edited by sometimes99er, Sun Aug 25, 2013 12:30 AM.


#2 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 2,751 posts
  • Location:Denmark

Posted Tue Feb 14, 2012 6:21 AM

No animation this time, but use joystick to move.

Posted Image

100 CALL CLEAR::CALL SCREEN(2)::CALL COLOR(2,3,1,3,3,1)::CALL MAGNIFY(3)
110 FOR C=1 TO 12::C$=C$&RPT$("F",2)&RPT$("0",C*2)::NEXT C
120 CALL CHAR(40,SEG$(C$,1,64),44,SEG$(C$,65,64),48,SEG$(C$,129,64))
130 CALL CHAR(52,"030F0F3F0F0FFF3FFFFF",54,"00C0C0F0C0C0FCF0FCFC")
140 FOR C=14 TO 24::CALL HCHAR(C,1,C+26,32)::NEXT C
150 CALL SPRITE(#1,52,3,94,56)
160 CALL JOYST(1,H,V)::PH=(PH+H)AND 127
170 CALL LOCATE(#1,94,PH+56)::GOTO 160

Edited by sometimes99er, Thu Jun 6, 2013 1:28 PM.


#3 TEXAS_JOE OFFLINE  

TEXAS_JOE

    Chopper Commander

  • 179 posts
  • Currently working on Final Furlong

Posted Tue Feb 14, 2012 7:20 AM

Very good!

I've seen that sprite before .... did you take inspiration from the Atari 2600 VCS "Space Invaders" game ?

#4 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 2,751 posts
  • Location:Denmark

Posted Tue Feb 14, 2012 7:50 AM

Thanks. Yep, it's a copy of (or something very close to) the "laser cannon" from that game.

Edited by sometimes99er, Tue Feb 14, 2012 8:02 AM.


#5 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 2,751 posts
  • Location:Denmark

Posted Tue Feb 14, 2012 2:21 PM

3D #3. Massive objects moving through space and time.

Posted Image

100 CALL CLEAR::CALL SCREEN(2)::CALL MAGNIFY(3)
110 CALL CHAR(48,"0000000000000001010000000000000000000000000000808")
120 CALL CHAR(52,"0000000000000103030100000000000000000000000080C0C08")
130 CALL CHAR(56,"000000000003070705070300000000000000000000C060E0E0E0C")
140 CALL CHAR(60,"00000000070D1F1E1F1B1F0F0700000000000000C0E0F0F0F0F0F0E0C")
150 CALL CHAR(64,"0000030F1D1F3F373F3F1B1F0F0300000000C0F0F8B8FCFCFCFCF8F8F0C")
160 CALL CHAR(68,"071F3F7F7BDFFFFFFFDFFD7F7F3F1F07E0F87CFEEEFFFFDFFFFFFFFEFEFCF8E")
170 FOR I=1 TO 6::CALL SPRITE(#I,48,15,193,120)::NEXT I
180 FOR I=1 TO 6::A(I)=1::GOSUB 200::NEXT I
190 GOSUB 200::GOTO 190
200 FOR J=1 TO 6::IF A(J)=0 THEN 250
210 IF A(J)=1 THEN Y(J)=RND*3.5-1.75:<img src='http://atariage.com/forums/public/style_emoticons/<#EMO_DIR#>/icon_mad.gif' class='bbc_emoticon' alt=':x' />(J)=RND*3.5-1.75::CALL LOCATE(#J,193,120)
220 CALL PATTERN(#J,44+4*A(J))::CALL MOTION(#J,Y(J)*A(J),X(J)*A(J))
230 IF A(J)=1 THEN CALL LOCATE(#J,88,120)
240 A(J)=A(J)+1::IF A(J)>6 THEN A(J)=1
250 NEXT J
260 RETURN

Edited by sometimes99er, Thu Jun 6, 2013 1:31 PM.


#6 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 2,751 posts
  • Location:Denmark

Posted Sat Feb 18, 2012 3:17 AM

I want to take the #2 3D effect and animate it.

I did a bit of freehand animation over 4 frames. Like if I move this one down, then I move this two etc. Overall it seems like a nice flow. Essentially it boils down to this:

200 data 1,2,4,7,10,16,22,29,37,46,56,67,79,97
210 data 1,3,5,8,13,19,26,34,43,54,66,78,97
220 data 1,2,4,6,10,15,22,30,39,50,62,76,97
230 data 1,3,5,7,12,18,26,35,45,58,71,87,97

Initially the XB takes some time setting up strings with character patterns. The moving lines are represented by the data above.

Posted Image

Each column above represented by a string. Using CALL CHAR one has to chop it up for every 4 characters. Maybe not very effective, but CPU Overdrive might give an idea about what Wilhelm's Compiler can do to it.

Though the lines may move as they should, they could as easily give the illusion of moving up (instead of the intended moving down). Redoing the data above would be tedious. Well, Wilhelm could speed things up - or so I thought. There's a compile error, and maybe it would be good practice to pinpoint and eliminate the problem(s), but then my mind wandered off into other setup and solution strategies. What I want to do is have variable acceleration, frame and distribution options.

100 CALL CLEAR::CALL SCREEN(2)::CALL COLOR(2,3,1,3,3,1,4,3,1)
110 CALL CHAR(52,"0000000000030F0F3F0F0FFF3FFFFF00000000000000C0C0F0C0C0FCF0FCFC")
120 call hchar(12,11,52)::call hchar(13,11,53)
130 call hchar(12,12,54)::call hchar(13,12,55)
140 for a=0 to 3:<img src='http://atariage.com/forums/public/style_emoticons/<#EMO_DIR#>/icon_razz.gif' class='bbc_emoticon' alt=':P' />$=RPT$("0",194)::
150 read n:<img src='http://atariage.com/forums/public/style_emoticons/<#EMO_DIR#>/icon_razz.gif' class='bbc_emoticon' alt=':P' />$=seg$(p$,1,(n-1)*2)&"FF"&seg$(p$,n*2,194-n*2)::if n<81 then 150
160 s$(a)=p$::next a::for a=14 to 24::call hchar(a,1,a+26,32)::next a
170 for a=0 to 3::call sound(100,110,30)
180 call char(40,seg$(s$(a),1,64),44,seg$(s$(a),65,64),48,seg$(s$(a),129,64))
190 next a::goto 170
200 data 1,2,4,7,10,16,22,29,37,46,56,67,79,97
210 data 1,3,5,8,13,19,26,34,43,54,66,78,97
220 data 1,2,4,6,10,15,22,30,39,50,62,76,97
230 data 1,3,5,7,12,18,26,35,45,58,71,87,97

Edited by sometimes99er, Thu Jun 6, 2013 1:38 PM.


#7 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 2,751 posts
  • Location:Denmark

Posted Sat Feb 18, 2012 4:35 AM

(XB animation included above)

Edited by sometimes99er, Thu Jun 6, 2013 1:38 PM.


#8 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 2,751 posts
  • Location:Denmark

Posted Wed Feb 22, 2012 2:19 AM

Okay, so Wilhelm doesn't like RPT$. Made a workaround (made a longer string and concatenated it a few times). Well, the compiled version takes quite some time preparing the graphics using all my string manipulation. I assume Wilhelm uses internal TI string handling, and it therefore suffers in the speed department. Here at my end, XB CPU Overdrive matches XB Wilhelm compiled version (at normal speed).

#9 Willsy OFFLINE  

Willsy

    Stargunner

  • 1,942 posts
  • Location:Uzbekistan (no, really!)

Posted Wed Feb 22, 2012 3:03 AM

How does Buck Rogers do it? Buck Rogers has thicker 'bars' rather than thin lines. I am guessing that Buck Rogers leaves the background static and simply changes the colour attributes (CALL COLOR)?

I seem to remember we may have looked at Buck Rogers before, but my memory isn't what it used to be!

#10 Willsy OFFLINE  

Willsy

    Stargunner

  • 1,942 posts
  • Location:Uzbekistan (no, really!)

Posted Wed Feb 22, 2012 3:14 AM

Crude 3D effects #1.1 (added sprite graphics)

Posted Image

100 CALL CLEAR::CALL SCREEN(2)::CALL MAGNIFY(3)
110 FOR C=1 TO 8::C$=C$&RPT$("F",C*2)&RPT$("0",C*2)::NEXT C
120 CALL CHAR(40,SEG$(C$,1,64),44,SEG$(C$,65,64))
130 FOR C=40 TO 47::CALL HCHAR(C-23,1,C,32)::NEXT C
140 CALL CHAR(36,"0E0A6BF99087CF67371310180C060301E0A0AC3E12C2E64C5890103060C08")
150 CALL COLOR(2,7,1)::CALL SOUND(150,110+S*20,0)
160 CALL SPRITE(#S+1,36,5,120,60+S*40,16,0)
170 CALL COLOR(2,1,7)::CALL SOUND(150,110,30)
180 S=(S+1)AND 3::GOTO 150

Posted Image


This is like the Buck Rogers demo, but I seem to remember that Buck Rogers was smoother. I'll have to see if I can get a version of BR for Classic99 - then I could spy on it in the debugger ;-)

#11 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • Topic Starter
  • 2,751 posts
  • Location:Denmark

Posted Wed Feb 22, 2012 5:33 AM

This is like the Buck Rogers demo, but I seem to remember that Buck Rogers was smoother. I'll have to see if I can get a version of BR for Classic99 - then I could spy on it in the debugger


We talked about Buck in the Devastator thread. Put Buck in Classic99, Scroll Lock and press F9 to have a look behind the scenes. Should look something like this ...

Posted Image

Edited by sometimes99er, Thu Jun 6, 2013 1:44 PM.






Also tagged with one or more of these keywords: XB

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users