Author Topic: GAME: FLAPPY YAB-REX  (Read 9325 times)

0 Members and 1 Guest are viewing this topic.

Offline SERGIO_ManOwaR_

  • C= 64
  • **
  • Posts: 48
  • Karma: 9
    • View Profile
GAME: FLAPPY YAB-REX
« on: November 23, 2015 »
Hi everybody, YABASIC lovers!
I've been missing out of forum so long, but just read something about a ps2 yabasic implementation for javascript... that sounds like great news and i'll keep an eye on it.
Meanwhile, i would like to share a game wich supposed to be a clone of google chrome's easter egg dino game. (https://www.youtube.com/watch?v=gymfJGSBErE)
It's a very simple game and i thought can be a good game to practice some coding...
After some days.. started to add some more stuff... new obstacles... new movements... and last added a nice zooming graphic engine... so, the result is a very nice game easy to play.
Gameplay is quite boring after a while, since there is no levels;just coin-op arcade style, more and more random obstacles until you crash...
STILL CODING FOR YABASIC IN 2015! Is there anybody more?

Note:Game is designed to run at 60FPS. Since emulator's default config is 50FPS you must
configure emu for smooth  graphics. (Details in source code)

HOPE ENJOY!

Offline SERGIO_ManOwaR_

  • C= 64
  • **
  • Posts: 48
  • Karma: 9
    • View Profile
Re: GAME: FLAPPY YAB-REX
« Reply #1 on: November 24, 2015 »
« Last Edit: September 08, 2017 by SERGIO_ManOwaR_ »

Offline Galileo

  • ZX 81
  • *
  • Posts: 22
  • Karma: 0
    • View Profile
Re: GAME: FLAPPY YAB-REX
« Reply #2 on: January 03, 2016 »

Offline SERGIO_ManOwaR_

  • C= 64
  • **
  • Posts: 48
  • Karma: 9
    • View Profile
Re: GAME: FLAPPY YAB-REX
« Reply #3 on: January 04, 2016 »
Thanks galileo! Yabasic can do this and much more. Emulator is powerful :D Gracias amigo.

Offline MrD

  • C= 64
  • **
  • Posts: 31
  • Karma: 8
    • View Profile
Re: GAME: FLAPPY YAB-REX
« Reply #4 on: January 20, 2016 »


If I change the DIM fdata(9000) to something bigger, the running demos work in javascript yabasic! This game looks awesome!

It says you're using too big an index into fdata. (I should make the error message more informative sorry!)

I'll have to make sure that my code isn't coming up with the wrong values for dBit... can you check what the maximum index into fdata is supposed to be?

Offline SERGIO_ManOwaR_

  • C= 64
  • **
  • Posts: 48
  • Karma: 9
    • View Profile
Re: GAME: FLAPPY YAB-REX
« Reply #5 on: January 27, 2016 »
Mrd glad you liked the game!
The array fdata is part of my latest library for personaliced fonts.
Font data is really long, so it was encoded and compressed into a single DATA line
DIM fdata() MUST cover safely that line LENGHT.
Currently a compressed font in a line has a lenght less than 2000 characters
You can REDIM over 9000 of couse.

I've tried to run this game in the MJS and there are several errors. Most of them related to the
bugged ascii characters table.
I've just posted a replay in your MJS topic about it, then see this.
Im using characters from the yabasic ascii tileset to encode bitmaps and fonts, but, when decoding, extracting the values of the character gives wrong ASC() values. Some of thouse values are over 8000... that's why redim to 9000 may skip wrong DIMmed error, but error is not fixed, and bitmaps/fonts are corrupted and some pixels/letters are drawed with wrong colors or values.

You know, it's really sad this game don't work in MJS
Hope you can do it

The original yabasic ascii table is needed for any of my games that includes bitmaps or fonts.
Any other errors may be debugged with patience.
See ya!

Offline MrD

  • C= 64
  • **
  • Posts: 31
  • Karma: 8
    • View Profile
Re: GAME: FLAPPY YAB-REX
« Reply #6 on: February 05, 2016 »
I've made it so ASC outputs the right values for your characters and yab rex runs in MJS Yabasic with no changes now! It plays the intro with all the graphics, but crashes when the game starts because I haven't put in the 'printf' style formatters with % signs yet. (I haven't uploaded the update yet.)

Offline MrD

  • C= 64
  • **
  • Posts: 31
  • Karma: 8
    • View Profile
Re: GAME: FLAPPY YAB-REX
« Reply #7 on: February 05, 2016 »
I have fixed STR$ with C-style %f print, and I've fixed ASC with non a-z chars so they have the correct 128-255 values.

Which means that YAB-REX works in MJSYABASIC!

http://www.mrdictionary.net/yabasic/

It's on the left, /games/sergio_manowar/yabrex.txt ... the controls are a little awkward, but that's my fault :)

I got exploted by a cactus, and then I watched the replay! This game is awesome!

Offline SERGIO_ManOwaR_

  • C= 64
  • **
  • Posts: 48
  • Karma: 9
    • View Profile
Re: GAME: FLAPPY YAB-REX
« Reply #8 on: February 25, 2016 »