• Welcome to Dark Bit Factory & Gravity.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - relsoft

#3
Yo Michael!  Nice to see you're back.

:)

Some of us are on facebook.  :)



Just added associative arrays, functions as arguments, type returns, etc. 

Will port to android...
#4
Btw, sources are included. 
#6
Not yet, but I'm planning to make a simple one.  :)
#7




Download source, binaries samples and docs:  http://rel.phatcode.net/junk.php?id=157

Hello peeps, 
Made this little toy language/interpreter in Java.

AnyaBASIC is a portable Interpreted Programming Language made in Java and out of
boredom after seeing a post about an esolang made of emoticons on the
Programmers,Developers Facebook Group.
It has a syntax similar to BASIC with a bit of C and PASCAL thrown in.

While I consider this language a "Toy Language", it evolved into something that's
capable of doing something more(games, graphics, etc).
It's also a language whose keywords are in English so it should be a good language
to use for teaching kids how to program.



Features



- Very easy to use

- Case insensitive

- As loosely-typed as any language can get

- Easy to figure out with clean syntax

- Only uses about 30 global keywords

- Fast(for an interpreter made in an interpreted language)

- Portable

- Graphics capable

- Full hardware acceleration

Don't expect much though.  Made this in a little less than 3 weeks.  😂
#8
I just set all game related calculations on a virtual screensize like 800x480 and let my viewport scaler do its job of scaling and correcting aspect ratios.
#9
I haven't been doing any JS since those 2 demos. :(

Thanks for the book. I'm sure it would get handy later.
#10
Yo shock! Nice the site is back.  But if ever it goes down again after I visited, my connection is probably the one being compromised.

I'm using Psiphon 3 for SSH and VPN connections.
#11
Wooohooo!
:bfuck2: :clap: :clap: :cheers:
#12
Thanks guys!
#13
Still don't get it guys. LOL

Where is the error? How would I make xr and yr integers?  I thought JS does that automatically (var to int).


Thanks!

NVM.  Got it to work!  Thanks kirl and Jim!

Still wanna know if I could force declare a variable an integer, float or double though.


#14
Hello guys,

Someone asked me to do some webeffects and I didn't know JS but I remembered TinyC5.  After about 3 hours of tests while readingf Benny's cool tutorial, I was able to make this little plasma:

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="styles.css" />
        <script type="text/javascript" src="TinyC5-0.7.min.js"></script>

        <script type="text/javascript">
        /*
Yar!  got bored the ginebra game and decided to read a little
javascript and made this! 
I'm a JS noob so code is not quite up to par.  I'm just 3 hours \
in to JS coding. :)

Thanks to Benny for this TPTC-like web gfx layer framework.

*/
            function main()
            {
            var tinyC5, args;
tinyC5 = new TinyC5();
args =
{
    width: 320,
    height: 240,
    scale: 2,
    title: 'Plasma by Anya',
    bgColor: tinyC5.color( 155, 255, 100, 255 ),
    container: document.getElementById( 'tinyC5_container' )
};
tinyC5.init( args );
                tinyC5.update = function()
                {
    var p, dx, dy, index = 0;
    var col;
    var fc = tinyC5.getTime()/10;
    index = 0;
    p = tinyC5.pixels;

    for( var y = 0; y < tinyC5.HEIGHT; y++ )
    {
        for( var x = 0; x < tinyC5.WIDTH; x++ )
        {
        dx = 160 - x;
dy = 120 - y;
col =  Math.cos(Math.sin(Math.atan2(dx,dy)*10)) * 32 +
   Math.sin((x-fc)/25.0)*63+Math.sin((y-fc)/25.0) * 45 -
   Math.sin((y+x)/25.0) * 63;

p[index++] = Math.sin((col + fc)/10.0) * 255;
                            p[index++] = Math.sin((col + fc*2)/20.0) * 255;
                            p[index++] = Math.sin((col + fc*3)/30.0) * 255;
                            p[index++] = 255;
        }
    }
    };

    tinyC5.start();
            }
        </script>
    </head>
    <body onload="main()">

    <div id="container">
    <div id="tinyC5_container">
    </div>
</div>
<div id="footer">
    Anya's Plasma. Rel's 1st JS code <a href="http://rel.phatcode.net/">Genso's Junkyard</a>
</div>   
    </body>
</html>




Now I wanted to make a 3D pixel effect. But somehow it does not work.  I also tried doing a simple Circle using cos/sin and it only plots 4 pixels.  What am I doing wrong?


<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="styles.css" />
        <script type="text/javascript" src="TinyC5-0.7.min.js"></script>

        <script type="text/javascript">
        /*

*/
            function main()
            {
            var MIDX = 160;
            var MIDY = 120;
            var LENS = 256;
            var RINGS = 360;
            var MAX_RADIUS = 2.0;
var SCALER = 40.0;
var TO_RAD = 0.01745329251994329576923690768489;
var op = -11.0;
var oq = 12.0;

            var tinyC5, args;

tinyC5 = new TinyC5();

args =
{
    width: 320,
    height: 240,
    scale: 2,
    title: 'PQ Torus Knot by Anya',
    bgColor: tinyC5.color( 0, 0, 0, 255 ),
    container: document.getElementById( 'tinyC5_container' )
};

tinyC5.init( args );

                tinyC5.update = function()
                {
                var pix;
    var index = 0;
    var color;
    var x, y, z;
    var p;
    var q;
    var r;
    var a;
    var xr;
    var yr;
    var i;
var distance;

    var fc = tinyC5.getTime()/10;
   
    pix = tinyC5.pixels;
    tinyC5.clearPixels();
   
    op += 0.01;
oq -= 0.01;

color = 255;
                   
    for( i = 0; i < 360; i++ )
    {
    a = i * TO_RAD;
       
        p = op;   //p and q
        q = oq;   //interpolate
        r = (0.5 * (2 + Math.sin(q * a))) * MAX_RADIUS;   //radius of each ring
        x = r * Math.cos(p * a);   //rotate point
        y = r * Math.cos(q * a);
        z = r * Math.sin(p * a);
   
            //project
            distance = (LENS - z * SCALER);
            if( distance > 0 )
            {
                xr = MIDX + (LENS * x * SCALER / distance);
                yr = MIDY - (LENS * y * SCALER / distance);
                //xr = MIDX + ( Math.cos(a) * 50 );
                //yr = MIDY + ( Math.sin(a) * 50 );
                index = ( yr * 320 + xr ) * 4;
                pix[index++] = color;
                    pix[index++] = color;
                    pix[index++] = color;
                    pix[index++] = 255;
            }

    }

       
    };

    tinyC5.start();
            }
        </script>
    </head>
    <body onload="main()">

    <div id="container">
    <div id="tinyC5_container">
    </div>
</div>
<div id="footer">
    Anya's PQ Torus Knot. Rel's 2nd JS code <a href="http://rel.phatcode.net/">Genso's Junkyard</a>
</div>   
    </body>
</html>



Btw, this plots only 4 pixels:


for( i = 0; i < 360; i++ )
{
a = i * TO_RAD;
xr = MIDX + ( Math.cos(a) * 50 );
yr = MIDY + ( Math.sin(a) * 50 );
}



Thanks!
#15
Nice contest!

Looking forward to seeing some nice entries.
#16
Projects / [Android]Crappy Fish
April 11, 2014
[Android] Crappy Fish





Features(so far):
-Smooth gameplay
-Obstacle movement
-Animated menu
-Lots of animations-Moozic

*Got late in the game of the stupid Flappy Fish craze due to typhoon Haijan. No erlectricity for almost 2 months. :(
By the time we got internet, Flappy wasn't on the playstore no more. Hahahahaha!
Enjoy!

Source on my daughter's FB account:
https://www.facebook.com/notes/anya-therese-lope/crappy-fish-beta/623666971045098
#17
Freebasic / Confusion demo fx.
May 07, 2013
Found this a few days ago on my old laptop.  Enjoy!

Pretty old fx I did a few years ago.

2d + 3d.

rel.phatcode.net/junk.php?id=142

Just a pqtorus and a 2d tunnel.
#18
So I got sidetracked from my android game project and wondered about how to  make those live wallpapers. After some googlefu I was able to make an opengl es wallpaper and thought this might be a good platform for demo effects.

Here's the result. You can't be crazy with your fx though since your ui would lag.

What do you think guys?


screen:


apk:
http://www.rel.phatcode.net/Temp/PinoydenLiveWallpaper-002.apk
#19
Quote from: Jim on May 01, 2013
Please don't get yourself in any trouble over posting stuff here. It will almost certainly leak and it's pretty unlikely I'll be able to find anything.
Jim



http://www.rel.phatcode.net/Temp/Zweihander-droid-source-05-01-13.zip

I'm a rebelious!

:D
#20
Ok, I'll post the eclipse project tomorrow.


Btw, code is for dbf eyes only or my publisher would get angry.