Dark Bit Factory & Gravity

PROGRAMMING => Other languages => Yabasic => Topic started by: SERGIO_ManOwaR_ on November 23, 2015

Title: GAME: FLAPPY YAB-REX
Post by: SERGIO_ManOwaR_ 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!
Title: Re: GAME: FLAPPY YAB-REX
Post by: SERGIO_ManOwaR_ on November 24, 2015
UPDATED TO VERSION 0.9 To correct bug.
https://mega.nz/#!pKZ31TJY!TCV-nl3r3tQNkwR7h0CdTbegdlsP90reBhrCCRt6Kuc
Title: Re: GAME: FLAPPY YAB-REX
Post by: Galileo on January 03, 2016
Title: Re: GAME: FLAPPY YAB-REX
Post by: SERGIO_ManOwaR_ on January 04, 2016
Thanks galileo! Yabasic can do this and much more. Emulator is powerful :D Gracias amigo.
Title: Re: GAME: FLAPPY YAB-REX
Post by: MrD on January 20, 2016
(http://s24.postimg.org/lxsjr9znp/yabrex.png)

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?
Title: Re: GAME: FLAPPY YAB-REX
Post by: SERGIO_ManOwaR_ 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!
Title: Re: GAME: FLAPPY YAB-REX
Post by: MrD 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.)
Title: Re: GAME: FLAPPY YAB-REX
Post by: MrD 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!
Title: Re: GAME: FLAPPY YAB-REX
Post by: SERGIO_ManOwaR_ on February 25, 2016