Author Topic: Re: ASCII Animation  (Read 1808 times)

0 Members and 1 Guest are viewing this topic.

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: ASCII Animation
« on: March 18, 2018, 04:45:43 pm »
I ran it, but got this image: https://www.qb64.org/forum/index.php?topic=99.msg548#msg548''

I can't remember what episode of Star Trek that came from?

Kidding aside, nice! Very well done. ASCII art is tougher than it looks.

This si a type of application where ONKEY is arguably a better choice for responsiveness. With INKEY$, the loop has to complete before the program ends. With ONKEY, it would be spontaneous.

Code: QB64: [Select]
  1. KEY(15) ON
  2. KEY 15, CHR$(1)
  3. ON KEY(15) GOSUB quit
  4. PRINT "Press Enter to quit when cycle completes or Esc to quit instantly!"
  5.     IF INKEY$ = CHR$(13) THEN END '
  6.     FOR i = 1 TO 20
  7.         PRINT i;
  8.         _DELAY .25
  9.     NEXT
  10.  
  11. quit:
  12.  

Note if you press Enter, it has to complete the FOR/NEXT loop before it quits. If you press Esc, it ends instantly.

Pete :)
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Ashish

  • Forum Resident
  • Posts: 630
  • Never Give Up!
    • View Profile
Re: ASCII Animation
« Reply #1 on: March 19, 2018, 03:08:13 am »
Good work!
if (Me.success) {Me.improve()} else {Me.tryAgain()}


My Projects - https://github.com/AshishKingdom?tab=repositories
OpenGL tutorials - https://ashishkingdom.github.io/OpenGL-Tutorials

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: ASCII Animation
« Reply #2 on: March 23, 2018, 08:21:12 am »
Nice!

How were images created? from hand drawn (typed) page? or through conversion program of photo image creating all the data statements?

Ha! I think I asked this before when we were doing Christmas scenes.

FellippeHeitor

  • Guest
Re: ASCII Animation
« Reply #3 on: March 23, 2018, 08:53:52 am »
Cool animation, [banned user]!

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: ASCII Animation
« Reply #4 on: March 23, 2018, 09:01:27 am »
This si a type of application where ONKEY is arguably a better choice for responsiveness. With INKEY$, the loop has to complete before the program ends. With ONKEY, it would be spontaneous.

GOSUB is never better..
Code: QB64: [Select]
  1. TRUE = -1
  2.   IF INKEY$ = CHR$(27) THEN exitflag%% = TRUE
  3.   IF NOT exitflag%% THEN
  4.    FOR i = 1 TO 20
  5.      PRINT i;
  6.      _DELAY .25
  7.      IF INKEY$ = CHR$(27) THEN exitflag%% = TRUE: i = 21 'and if your already in the FOR\NEXT
  8.    NEXT
  9.   END IF
  10. LOOP UNTIL exitflag%%
  11.  
  12.  

while I like pasta myself, I really don't like it in my code. :)
Granted after becoming radioactive I only have a half-life!

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: ASCII Animation
« Reply #5 on: March 23, 2018, 11:04:23 am »
Now I've looked at it and I'm react late - it's nice. The effect of the flight before and after the inscription is very nice

Marked as best answer by on August 07, 2021, 11:57:48 am

Offline codeguy

  • Forum Regular
  • Posts: 174
    • View Profile
Re: ASCII Animation
« Reply #6 on: March 26, 2018, 12:11:13 am »
Very nice transparency effect when the ships are traveling behind.