• Welcome to Dark Bit Factory & Gravity.
 

GAME: FLAPPY YAB-REX

Started by SERGIO_ManOwaR_, November 23, 2015

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

SERGIO_ManOwaR_

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!

SERGIO_ManOwaR_

#1

Galileo

Very, very good job! Great!  :goodpost:  :clap:  :clap:  :clap:

¡Muy, muy bueno! De lo mejorcito que he visto para Yabasic. ¡Magnífico trabajo!

SERGIO_ManOwaR_

Thanks galileo! Yabasic can do this and much more. Emulator is powerful :D Gracias amigo.

MrD



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?

SERGIO_ManOwaR_

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!

MrD

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.)

MrD

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!

SERGIO_ManOwaR_

MrD great work fixing those bugs!
Does really this game works for you?
For me it runs but soon or later got the error msg:
undefined:error:EQUALS with bad arguments...
That error also appears in some of my other codes and also error: GREATER OR LESS THAN with bad arguments...
I've downloaded your html source, then disabled those subs just for try and it works  :P but i guess that is not the way...
I really want to catch the error and will try.
Another thing is... back to unicodes and stuff... when opening a file, seems to load wrong. Some characters e.g. spanish characters like "ñ" are missing, this causes again routines based on characters fail. But files loaded in database are OK.
At the moment seems that MJS is very improved since last time, and probably most of the yabasic sources will run now. GREAT WORK!