Author Topic: Sample Background animation in battle screen for up coming game.  (Read 186 times)

Offline Cobalt

  • Forum Resident
  • Posts: 600
  • At 60 I become highly radioactive!
Looking for input on what any of you guys think about the Look and Sound of the battle screen for the project I have started on,

 Phantasy Star 64

With thee obligatory '64' tacked on the end cause that is how I roll!

Still a long way to go but what do you guy think of the look and sound? not a  true clone of the original look but just trying to spice my version up, a wee lil' bit, lassy.

think I still need to find a mild flapping  sound effect for these creatures, what do you think?

Code: QB64: [Select]
  1. 'Battle Mechanics Animation Department Ver .001
  2. 'DATE 7/7/20
  3. 'Beta Screening at QB64-Con 2020 XD
  4.  
  5. SCREEN _NEWIMAGE(640, 480, 32)
  6. DIM SHARED Mix&, BeachBattleLayer&, SeaBattleLayer&, WingedEye&, BatFrame%%
  7. DIM SHARED Battle&, Ambi&
  8. CONST TRUE = -1, FALSE = NOT TRUE
  9. Mix& = _NEWIMAGE(640, 480, 32)
  10.  
  11. MFI_Loader "BattleSample.MFI"
  12. _CLEARCOLOR _RGB32(128), WingedEye&
  13. BatTime& = _FREETIMER
  14. ON TIMER(BatTime&, .125) ChangeFrame
  15.  
  16. _SNDVOL Ambi&, .2 'back ground ambience volume
  17. _SNDVOL Battle&, .75 'battle music volume
  18. _SNDSETPOS Battle&, 15 'jump here at start of battle
  19. _SNDLOOP Ambi&
  20. _SNDLOOP Battle&
  21. _DELAY .75 'lets make sure everything is loaded and going first
  22. TIMER(BatTime&) ON 'LOOK MOM IT MOVES BY ITSELF!
  23.  
  24. 'change the REMed out line to see each type of water battle background screen animation
  25. ' SeaBattleBackground
  26. BeachBattleBackground
  27.  
  28. _SNDSTOP Ambi&
  29. _SNDSTOP Battle&
  30. TIMER(BatTime&) OFF
  31.  
  32. SUB BeachBattleBackground
  33.  Frame%% = 0
  34.  Wavein%% = -1
  35.  Waveout%% = 0
  36.  DO
  37.   _PUTIMAGE (64, 48)-STEP(511, 279), BeachBattleLayer&, Mix&, (0, 0)-STEP(255, 139)
  38.   _PUTIMAGE (64, 328)-STEP(511, 95), BeachBattleLayer&, Mix&, (0, 144 + (48 * Frame%%))-STEP(255, 47)
  39.   Display_Bat
  40.  
  41.   IF Count%% < 15 THEN 'each frame of animation stays for 16 frames of time
  42.    Count%% = Count%% + 1
  43.   ELSE
  44.    Count%% = 0
  45.    IF Wavein%% THEN
  46.     IF Frame%% < 6 THEN Frame%% = Frame%% + 1 ELSE Wavein%% = 0: Waveout%% = -1
  47.    END IF
  48.    IF Waveout%% THEN
  49.     IF Frame%% > 0 THEN Frame%% = Frame%% - 1 ELSE Wavein%% = -1: Waveout%% = 0
  50.    END IF
  51.   END IF
  52.  
  53.   _PUTIMAGE , Mix&, _DISPLAY
  54.   LOCATE 1, 1: PRINT "ESC to end"
  55.   _LIMIT 60
  56.   IF INKEY$ = CHR$(27) THEN ExitFlag%% = -1
  57.  LOOP UNTIL ExitFlag%%
  58.  
  59.  
  60. SUB SeaBattleBackground
  61.  '-----------------------------Sea Battle Background Animation-----------------------------
  62.  Frame%% = 0
  63.  DO
  64.   _PUTIMAGE (64, 48)-STEP(511, 207), SeaBattleLayer&, Mix&, (0, 0)-STEP(255, 103)
  65.   _PUTIMAGE (64, 256)-STEP(511, 175), SeaBattleLayer&, Mix&, (0, 104 + (88 * Frame%%))-STEP(255, 87)
  66.   Display_Bat
  67.   IF Count%% < 11 THEN 'each frame of animation stays for 12 frames of time
  68.    Count%% = Count%% + 1
  69.   ELSE
  70.    Count%% = 0
  71.    IF Frame%% < 8 THEN Frame%% = Frame%% + 1 ELSE Frame%% = 0
  72.   END IF
  73.  
  74.   _PUTIMAGE , Mix&, _DISPLAY
  75.   LOCATE 1, 1: PRINT "ESC to end"
  76.   _LIMIT 60
  77.   IF INKEY$ = CHR$(27) THEN ExitFlag%% = -1
  78.  LOOP UNTIL ExitFlag%%
  79.  
  80. SUB Display_Bat
  81.  _PUTIMAGE (272 + INT(RND * 1) - 0, 170 + INT(RND * 1) - 0)-STEP(115, 117), WingedEye&, Mix&, (0 + 59 * BatFrame%%, 0)-STEP(57, 64)
  82.  _PUTIMAGE (202 + INT(RND * 1) - 0, 200 + INT(RND * 1) - 0)-STEP(115, 117), WingedEye&, Mix&, (0 + 59 * BatFrame%%, 0)-STEP(57, 64)
  83.  _PUTIMAGE (322 + INT(RND * 1) - 0, 190 + INT(RND * 1) - 0)-STEP(115, 117), WingedEye&, Mix&, (0 + 59 * BatFrame%%, 0)-STEP(57, 64)
  84.  
  85. SUB ChangeFrame
  86.  STATIC Flap%%
  87.  IF Flap%% THEN
  88.   BatFrame%% = BatFrame%% - 1
  89.   BatFrame%% = BatFrame%% + 1
  90.  IF BatFrame%% = 3 THEN Flap%% = TRUE
  91.  IF BatFrame%% = 0 THEN Flap%% = FALSE
  92.  
  93. SUB MFI_Loader (FN$)
  94.  DIM Size(128) AS LONG, FOffset(128) AS LONG
  95.  GET #1, , c~%% 'retrieve number of files
  96.  FOR I~%% = 1 TO c~%%
  97.   GET #1, , FOffset(I~%%)
  98.   GET #1, , Size(I~%%)
  99.   FOffset&(I~%%) = FOffset&(I~%%) + 1
  100.  NEXT I~%%
  101.  WingedEye& = LoadGFX(FOffset(1), Size(1)) 'winged eye monster sprite sheet sample
  102.  BeachBattleLayer& = LoadGFX(FOffset(2), Size(2)) 'beach battle background animation sheet
  103.  SeaBattleLayer& = LoadGFX(FOffset(3), Size(3)) 'Sea battle background animation sheet
  104.  
  105.  Battle& = LoadSFX(FOffset(4), Size(4)) 'Battle Theme
  106.  Ambi& = LoadSFX(FOffset(5), Size(5)) 'Ocean wave ambience
  107.  CLOSE #1
  108.  IF _FILEEXISTS("temp.dat") THEN KILL "temp.dat"
  109.  
  110. FUNCTION LoadGFX& (Foff&, Size&)
  111.  IF _FILEEXISTS("temp.dat") THEN KILL "temp.dat"
  112.  OPEN "temp.dat" FOR BINARY AS #3
  113.  dat$ = SPACE$(Size&)
  114.  GET #1, Foff&, dat$
  115.  PUT #3, , dat$
  116.  CLOSE #3
  117.  LoadGFX& = _LOADIMAGE("temp.dat", 32)
  118.  
  119. FUNCTION LoadFFX& (Foff&, Size&, Fize%%)
  120.  IF _FILEEXISTS("temp.dat") THEN KILL "temp.dat"
  121.  OPEN "temp.dat" FOR BINARY AS #3
  122.  dat$ = SPACE$(Size&)
  123.  GET #1, Foff&, dat$
  124.  PUT #3, , dat$
  125.  CLOSE #3
  126.  LoadFFX& = _LOADFONT("temp.dat", Fize%%, "monospace")
  127.  
  128. FUNCTION LoadSFX& (Foff&, Size&)
  129.  IF _FILEEXISTS("temp.dat") THEN KILL "temp.dat"
  130.  OPEN "temp.dat" FOR BINARY AS #3
  131.  dat$ = SPACE$(Size&)
  132.  GET #1, Foff&, dat$
  133.  PUT #3, , dat$
  134.  CLOSE #3
  135.  LoadSFX& = _SNDOPEN("temp.dat")
  136.  

when I attach the code as a file it always adds a TXT to the end, so moved it to a code box for now.
« Last Edit: July 07, 2020, 12:56:44 PM by Cobalt »
Granted after becoming radioactive I only have a half-life!

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 2594
    • Steve’s QB64 Archive Forum
Re: Sample Background animation in battle screen for up coming game.
« Reply #1 on: July 07, 2020, 01:50:34 PM »
Can you use the same flapping sound from Terry's flappy bird clone?
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Cobalt

  • Forum Resident
  • Posts: 600
  • At 60 I become highly radioactive!
Re: Sample Background animation in battle screen for up coming game.
« Reply #2 on: July 07, 2020, 02:23:38 PM »
I don't know.  Its a bit fast like a smaller bird, and whether or not I could tweak it to be slower and sound 'bigger' on todays computers I'm not sure. I had some great software on Win98 that I would say "Absolutely I can" but with Audacity I'm not sure If I can pull it off as well or as easily.
« Last Edit: July 07, 2020, 02:42:04 PM by Cobalt »
Granted after becoming radioactive I only have a half-life!

Offline SierraKen

  • Forum Resident
  • Posts: 950
Re: Sample Background animation in battle screen for up coming game.
« Reply #3 on: July 07, 2020, 02:29:25 PM »
Great animation! Very "80's computer game" feel to it. Except the music of course, which makes it even better. Both you and Dav are pretty good artists!

Offline Cobalt

  • Forum Resident
  • Posts: 600
  • At 60 I become highly radioactive!
Re: Sample Background animation in battle screen for up coming game.
« Reply #4 on: July 07, 2020, 02:35:17 PM »
Great animation! Very "80's computer game" feel to it. Except the music of course, which makes it even better. Both you and Dav are pretty good artists!

Thank you, BUT
Let me set the record straight as I do not deserve that credit, those are the graphics from the original game for the SEGA Master System.  I don't want any confusion to that.

I don't want people to think I am someone who would steal others work and claim it as my own.  The code is mine, but the graphics are not, the music I actually paid for to use in my projects, and the ambient stuff I found somewhere with that  creative commons use thingy.
« Last Edit: July 07, 2020, 02:40:20 PM by Cobalt »
Granted after becoming radioactive I only have a half-life!

Offline SierraKen

  • Forum Resident
  • Posts: 950
Re: Sample Background animation in battle screen for up coming game.
« Reply #5 on: July 07, 2020, 03:11:26 PM »
Ahhh OK thanks, I thought those flying things looked familiar. I had the Sega Master System back in my teenage years. lol Still a good job putting it all together though.

Offline Ashish

  • Forum Resident
  • Posts: 623
  • The joy of coding is endless.
Re: Sample Background animation in battle screen for up coming game.
« Reply #6 on: July 08, 2020, 12:31:26 AM »
Amazing, Cool Animation and nice background music.
Looking forward to your game! :)
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 Pete

  • Forum Resident
  • Posts: 1982
  • Cuz I sez so, varmint!
Re: Sample Background animation in battle screen for up coming game.
« Reply #7 on: July 08, 2020, 02:50:52 AM »
I could record you the sound my comb-over makes, on a windy day, if that would help. It's a flapping sound similar to Trump's, but lower pitched, because he's three inches taller.

Pete

Offline johnno56

  • Forum Resident
  • Posts: 789
  • Live long and prosper.
Re: Sample Background animation in battle screen for up coming game.
« Reply #8 on: July 08, 2020, 03:08:52 AM »
Just tried it out on my Linux machine. Ran 'out of the box'. No errors. No filename renames. It worked!

My opinion: Reminiscent of mid-late 80's. Cool... A little creepy but cool... What? Flying eyeballs 'not' creepy? lol Very nicely done!!
Logic is the beginning of wisdom.