"TronStix" game progress update with video

197 views
Skip to first unread message

Michael Seymour

unread,
Jun 9, 2015, 8:21:03 AM6/9/15
to androi...@googlegroups.com
I've been sharing progress on my game on Facebook, and I figured I'd share here too! I'll keep any future updates to this thread rather than creating a new one. It's a Tron style light-disc battle game ( I know about copyright laws, I'm not selling it without a complete sound/visual/name overhaul )
I'll just copy the latest progress report below, along with the spk (Google Drive link as it's 9.2Mb) and video to save you the trouble of downloading if you just want a peek :-)

https://drive.google.com/file/d/0B2AikX1G7D1GVXl5QVFLRU03WUE/view?usp=sharing

***************

"TronStix" video progress update #3!
Sod copyright laws, I'm not selling this :-) Also, volume warning! Turn volume down a bit while watching for clarity.

Added:
Tron style graphics for arena, joysticks (now with little animation around base) and disc. Your character is a beetle, basically a "bug" in the system (Hard to see it in video).
Tron Legacy background music ("Derezzed" by Daft Punk). 
Disc throw and reflect sound effects (placeholders, to be replaced with Tron disc sounds. Sound doesn't match video below but is accurate while playing)

Changed:
Disc now reflects accurately off walls.
Once thrown, you have to chase down and catch your disc.
Throwing is now pull-back and release rather than aim and release.

To do: 
Add enemies with basic behaviours (aim, throw, evade, chase etc) which will be red beetles with red discs.
Add scoring system and highscore table.
Add splash screen with menus for settings and scores etc.
***************

Dave Smart

unread,
Jun 12, 2015, 3:39:40 AM6/12/15
to androi...@googlegroups.com
Hi Michael,

That looks really impressive.... I think it could be a candidate for the official demos page :)

(Although I think you would have to change the music to royalty free music for us to publish it online)

Regards
David

Mr.Minecrafter Russia

unread,
Jun 12, 2015, 5:54:59 AM6/12/15
to androi...@googlegroups.com
I can't download it. Please give me it in other cloud (yadisk) or give here.

Michael Seymour

unread,
Jun 12, 2015, 2:42:19 PM6/12/15
to androi...@googlegroups.com
Thanks David, that's given me a motivation boost. I have to admit though, the graphics aren't mine either. Quick Google search of "Tron disc png" and "Beetle png" got those. I'll have to either make my own or find royalty free graphics too. Making my own is preferable
:-) I'm still fairly far off completion though, but I'll post along the way!

Michael Seymour

unread,
Jun 12, 2015, 2:44:17 PM6/12/15
to androi...@googlegroups.com
Oh, Mr Minecraft Russia, I can half the file size by getting rid of a music track I used as a tester but forgot to remove (duh, there's about 4Mb alone there). I'll see if I can post the spk soon

Michael Seymour

unread,
Jun 15, 2015, 9:35:53 AM6/15/15
to androi...@googlegroups.com
Well, I've started the code for adding enemies!
Both the enemies and their discs will have several "states". At the moment, I can call for a new enemy and have it appear in the top right corner, then turn toward the player with enemies[i].Animate();

var enemies = [];
var discs = [];

var enemy = new Enemy( 1 );
enemies.push ( enemy );
var disc = new Disc( enemies[0] );
discs.push ( disc );

function Enemy ( position )
{
    switch ( position )
    {
        case 1: this.x = 0.1; this.y = 0.9;
        case 2: this.x = 0.9; this.y = 0.9;
        case 3: this.x = 0.1; this.y = 0.1;
        case 4: this.x = 0.9; this.y = 0.1;
    }
    this.State = "Aim"
    this.xDir = 0;
    this.yDir = 0;
    this.Angle = 0;
    this.Animate = function()
    {
        switch ( this.State )
        {
            case "Aim":
            this.Angle = Math.atan2 ( circleY - this.y, circleX - this.x );
        }
    }
}

function Disc ( enemy )
{
    this.x = enemy.x
    this.y = enemy.y
}

Mr.Minecrafter Russia

unread,
Jun 15, 2015, 11:20:17 AM6/15/15
to androi...@googlegroups.com
Please go in full version of site, go in this topic , touch "Add File"(or other) and upload new version of game

Michael Seymour

unread,
Jun 15, 2015, 11:29:18 AM6/15/15
to androi...@googlegroups.com
Hi! I'm sorry I've decided only to post the spk once fully complete, I've realised I'm a little protective over my project :-)
I'm having trouble keeping frame rates up at the moment now I've started adding enemies with their own big chunks of calculations so may have to redo the game with GLView instead of Image and work on optimising the code in other areas.

Mr.Minecrafter Russia

unread,
Jun 15, 2015, 11:42:05 AM6/15/15
to androi...@googlegroups.com
Please! Pleaaaaaase!

Michael Seymour

unread,
Jun 16, 2015, 1:31:09 AM6/16/15
to androi...@googlegroups.com
It's not far off completion, I had a big coding session last night and got the enemy AI framework done! Does anyone know a decent screen recorder for a non rooted kitkat device?

function Enemy ( position )
{
    switch ( position )
    {
        case 1: this.x = 0.17; this.y = 0.83; break;
        case 2: this.x = 0.83; this.y = 0.17; break;
        case 3: this.x = 0.17; this.y = 0.17; break;
        case 4: this.x = 0.83; this.y = 0.83; break;
    }
    this.State = "TowardPlayer"
    this.xDir = 0;
    this.yDir = 0;
    this.Angle = 0;
    this.discX = this.x;
    this.discY = this.y;
    this.discXDir = 0;
    this.discYDir = 0;
    this.discAngle = this.Angle;
    this.discThrown = false;
    this.timer = 0;
    this.Animate = function()
    {
        if ( DistBetween ( this.x, this.y, 0.5, 0.5 ) > 0.45 ) 
        { this.x -= this.xDir; this.y -= this.yDir; }
        this.Angle = Math.atan2 ( circleY - this.y, circleX - this.x );
        if ( this.discThrown == true ) { this.discX += this.discXDir; this.discY = this.discYDir; }
        switch ( this.State )
        {
            case "TowardPlayer":             
                this.xDir = Math.cos(this.Angle)*0.4/20;
                this.yDir = Math.sin(this.Angle)*0.4/20;
                this.x += this.xDir;
                this.y += this.yDir;
                if ( DistBetween (this.x, this.y, circleX, circleY) < 0.1 ) this.State = "AwayPlayer";
                if ( this.discThrown == false ) { this.discX = this.x; this.discY = this.y; }
                //else { this.disc
                break;
            case "AwayPlayer":
                this.Angle = Math.PI + Math.atan2 ( circleY - this.y, circleX - this.x );
                this.xDir = Math.cos(this.Angle)*0.4/20;
                this.yDir = Math.sin(this.Angle)*0.4/20;
                this.x += this.xDir;
                this.y += this.yDir;
                if ( DistBetween (this.x, this.y, circleX, circleY) > 0.3 ) this.State = "Aim";
                if ( this.discThrown == false ) { this.discX = this.x; this.discY = this.y; }
                break;
            case "Aim":
                this.discAngle = this.Angle;
                this.xDir = 0;
                this.yDir = 0;
                this.timer++;
                if ( this.timer == 30 ) { this.State = "Release"; this.timer = 0; }
                this.discX = this.x - Math.cos(this.discAngle)*0.4/5*(this.timer/30);
                this.discY = this.y - Math.sin(this.discAngle)*0.4/5*(this.timer/30);
                break;
            case "Release":
                this.discThrown = true;
                this.discXDir = (this.x - this.discX)/50;
                this.discYDir = (this.y - this.discY)/50;
                this.State = "TowardPlayer";
                break;
        }
    }
}
Message has been deleted

Michael Seymour

unread,
Jun 18, 2015, 6:54:16 AM6/18/15
to androi...@googlegroups.com
I'm using Droidscript itself to generate my game graphics. The code below draws one corner of the arena (not final), then draws the corner four times to make the whole arena.
The code for saving the resulting images is at the bottom, however it's not working. I have the empty folder Img in my project folder, but it remains empty once the code below is run. Am I doing something wrong? Thanks!


var scrWidth = app.GetScreenWidth();
var scrHeight = app.GetScreenHeight();

var mainWidth = 1;
var mainHeight = scrWidth/scrHeight;

function OnStart()

    app.SetDebugEnabled ( false );
    
    app.SetOrientation ( "Portrait", InitialiseLayout );
   
    app.PreventScreenLock ( true );
}

function InitialiseLayout()
{
    app.SetScreenMode("Full");

    layAcross = app.CreateLayout ( "linear", "Horizontal,FillXY" );

    imgSee = app.CreateImage ( "null", mainWidth, mainHeight, "fix", 400, 400 );
   
    layAcross.AddChild ( imgSee );
    imgSee.SetColor( "Black" );

    app.AddLayout( layAcross );
    DrawGrid();
}

function DrawGrid()
{
    imgHide = app.CreateImage ( "null", mainWidth, mainHeight, "fix", 200, 200 );
    imgHide.SetPaintColor ( "White" );
    imgHide.SetPaintStyle ( "Line" );

    for ( i = 4; i > 0; i-- )
    {
    imgHide.SetLineWidth ( i );

    switch ( i ) {
    case 1: imgHide.SetPaintColor ( "Black" ); break;
    case 2: imgHide.SetPaintColor ( "White" ); break;
    case 3: imgHide.SetPaintColor ( "Black" ); break;
    case 4: imgHide.SetPaintColor ( "White" ); break; }

    imgHide.DrawCircle ( 0.75, 0.25, 0.2 );
    imgHide.DrawLine ( 0.25, 0.25, 0.75, 0.25 );
    imgHide.DrawLine ( 0, 0, 0.5, 0.5 );
    imgHide.DrawCircle ( 0.5, 0.5, 0.05 );
    imgHide.DrawCircle ( 1, 1, 0.1 );
    imgHide.DrawCircle ( 0.9, 0.5, 0.2 );
    imgHide.DrawCircle ( 0.5, 1.1, 0.2 ); 

    imgSee.DrawImage ( imgHide, 0, 0, 0.5, 0.5, 0 );
    imgSee.DrawImage ( imgHide, 0.5, 0, 0.5, 0.5, 90 );
    imgSee.DrawImage ( imgHide, 0.5, 0.5, 0.5, 0.5, 180 );
    imgSee.DrawImage ( imgHide, 0, 0.5, 0.5, 0.5, 270 ); } 

    imgHide.Save ( "Img/GridQuarter.png" );
    imgSee.Save ( "Img/GridWhole.png" );
}

Graham Caswell

unread,
Jun 19, 2015, 2:20:41 AM6/19/15
to androi...@googlegroups.com
Looking good.
The sample codes are very useful as I am relatively new to code writing.
Will be following the progress you make.

Michael Seymour

unread,
Jun 22, 2015, 7:20:53 PM6/22/15
to androi...@googlegroups.com
"Derezzed" video update #5 !!

Yes, I've skipped video #4. I posted it on Facebook but forgot to include it here!

What's new:
The name! I'm swaying away from heavy Tron sound and imagery. I'll still be using the general colours and theme in the finished product.
Enemies with enemy AI!! Enemies will spawn from the corners of the arena. They have three basic behaviours (split into sub-behaviours in the code). They are : Avoid player and player disc, aim and throw own disc, chase and catch own disc. They freeze for a couple of seconds once they've thrown their disc, otherwise their evasion is too efficient and you'd never be able to hit them!
Sliders for game speed and spawn rate! Now you can play at double speed or half speed depending on ability. Spawn rate can also be increased or decreased.
A scoring system! Score is calculated taking into account the game speed, spawn rate and number of enemies currently on screen. Basically, the faster you play, the faster the spawn rate and the more enemies on screen, the faster your score will go up!

Changed:
Arena graphics! The image for the arena is generated in-game, with no imported image used. A combination of masks results in an arena with a transparent pattern, enabling me to add animations "underneath" the arena, such as a circular indicator of the next spawn location. Code for this is attached and runs in it's own separate spk.

To do:
Change the rest of the graphics, especially that of the player and enemy bugs! They're currently identical which can make finding your own bug fairly difficult amongst a crowd.
Add proper splash screens and settings screen to replace current placeholder.
Add animations such as sparks when an enemy bug is frozen, a dispersing burst when an enemy is destroyed, disc trails to make them easier to see (toggleable) etc.
Add my own sounds and music.

And here's a video of a quick game!
DrawGrid.spk

name is privat

unread,
Jun 23, 2015, 8:39:58 AM6/23/15
to androi...@googlegroups.com
Great work!!!
Kindly regards,
Dirk

Michael Seymour

unread,
Jul 4, 2015, 6:35:30 PM7/4/15
to androi...@googlegroups.com
"Derezzed" video update #6 - High score video!
Can't compare this score to last video as I've implemented a different and better scoring system, but it's still the best score I've got so far. I had it easy though, two enemy bugs were chasing their discs in circles for a while :-D

https://youtu.be/1G34kd6EpBU

What's new:
All graphics are now changed, including joysticks and bugs! Animations have been added for wall reflect sparks, enemy "recharge" and enemy derez. I've actually been lazy (or clever depending how you see it) and made one animation which I use in different ways for all three things :-) All graphics and animations generated by the app on startup.
You can now set the maximum number of enemies in play so you're not swarmed if you're a new player, and you can choose to show the score workings (in real time) or not, which leads me to....

What's changed:
Scoring! I wanted to reward more difficult play, while keeping it within reason. The old system in the last video is ridiculous. I was applying multipliers based on game speed AND spawn rate AND number of enemies, and you got points with those multipliers just for an enemy appearing on the screen as well as for kills. You could have got a massive score just by pumping up the spawn rate and avoiding being killed as long as possible.
The new system simply rewards accuracy, with a little bonus for each enemy on screen. The new system is 10 points for a kill, with a 2.5 point bonus for each enemy on screen, multiplied by 10 if your disc hasn't bounced on the wall first. Each time your disc bounces off a wall you lose 2 off the multiplier down to a minimum of 2. So if you kill an enemy with a direct hit with one other enemy on screen it's (10 + 2.5 * 2) * 10 = 150 points. If you kill an enemy after the disc has bounced twice, with two other enemies on screen it's (10 + 2.5 * 3) * 6 = 105 points. So you see, accuracy is very important, as is fighting with more enemies on screen.

What's to come:
A game timer. I'll be limiting each game to 60 seconds (separate from game speed which only effects bug and disc movement speed). This is where pushing up the spawn rate, number of enemies and game speed can have an effect as you only have 60 seconds to get your high score. This will stop players simply picking off single enemies at lowest game speed to "infinity" for top scores.
Health. It can be frustrating at high game speed to lose after 10 seconds of play several times in a row. A decent health system should offer a bit of a buffer as long as it's done right.

Michael Seymour

unread,
Jul 5, 2015, 9:48:57 AM7/5/15
to androi...@googlegroups.com
Ok ya know what, I'm finding I have less and less time to work on this and I have a new baby due in less than a month. I had wanted to only post this when complete as I'm a bit of a perfectionist, but I'll post the spk with each video update from now on. At least it's available for people to play and learn from should I find I can't work on it any more :-) This version has only one sound, a game icon and a font used for the main title, but I'll be adding more stuff and features as time goes on!
Derezzed.spk

Michael Seymour

unread,
Jul 18, 2015, 11:30:50 AM7/18/15
to androi...@googlegroups.com
"Derezzed" video update #7

Sound effects and Music! tongue emoticon


All original sounds and music created with the synths, noise generators and kickers of SunVox, plus a little flair added with arpeggio effects and sweeping velocity (volume) effects. The background music is *exactly* a minute long and unfortunately I died before it really got into the best bit. This way I can set a 1/2/3 minute timer on the game and have the music loop perfectly.


Next up: Game timer and health, with visual indicators! Plus some music for the main menu, and splitting the settings into a different screen rather than the main screen. Also need to look into a suggestion that I alter the size and make-up of the joystick images to eliminate the square "clipping" that kinda ruins the look!



https://youtu.be/N6-LO3raESg

Not posting the spk as it's identical to previous.

Michael Seymour

unread,
Feb 3, 2017, 6:01:54 PM2/3/17
to DroidScript
"Derezzed" video update #9

Well, this has been an embarrassingly long time since my last video update! I'm trying to pick up the pace again so hopefully I can code and update more often.

So, since my last update I've made a few changes and additions! First here's the video: https://youtu.be/v5xgELUbDkc

Here is video update #8, which I was going to use but then did a load of coding and made it redundant! I'm including it as it's the first time I added a smoke effect, but before I switched to glview: https://youtu.be/ug13fBuABZo

1) Changed the rendering from using app images to glview which is immensely faster! The extra fps meant extra speed, so I had to slow the game down and change the animations to compensate! The joysticks no longer animate to show where your thumb is. There really is no point showing a moving image underneath your thumb as it can't be seen! The joysticks are pretty much now "touch pads". Functionally identical but the performance gain was very noticeable.

2) The menu has been redesigned to look more "gamelike" including currently redundant buttons for multiplayer, settings and help etc. Also included new menu music, which the video didn't actually show as I didn't give it chance to start, but I'll include it in a future vid!

3) Added difficulty levels. This was as simple as choosing four different settings and sticking labels on them, but it gives players chance to ask "What score do you have on Normal?" which brings me to.....

4) Persistent highscores! Now you can close the game and have your highscores saved for next time. There are actually potentially 80 highscores, one for each combination of settings, but they're all saved anyway. Next addition will be names so you know who owns what scores.

5) It's no longer a one hit death. The player starts with 100 health. Each hit loses 20 health. Pretty straightforward! Originally this was shown with text only, then an image was included that would show red on black the percentage of health remaining. This still ate up fps, so now I use a little trick by resizing a red image box over a black image box. Does the same thing with no hit to performance.

6) Matches do not last forever. You have 60 seconds to get your high score! The timer is shown in the same way as the health, only with a yellow bar that depletes every second. At the moment nothing happens when the timer reaches 0, but it is intended that the enemies stop spawning and your health drips to 1, then it's basically all or nothing with whatever's left.

7) You can now deflect enemy discs! If you hold your disc out without letting go, you create a shield that can knock away enemy discs. Every deflection also "absorbs energy" and you gain 5 health! Currently a little buggy as you may notice in the video. It isn't intended that you can catch an enemy disc within the shield xD

8) Extra fps means extra effects! I've added an emitter that generates a smoke effect, which makes enemy explosions look a lot better and gives a lot more oomph to player damage and death. Since health was added I've also included a red flash under the arena and added a new sound for it. Enemy "rez in" also looks better thanks to using an existing animation under the arena rather than the previous simple circle.

To complete the single player portion of the game, I need to add: Names to highscores, personalized player colours (clever use of masks), score screen on player death, better visual indication of score using the currently blank area on the right of the screen, a pause button and menu, better custom game menu, a working settings menu, either a tutorial or practice area, then opening splash screen and "about" section. At that point I could release it as "Early Access" and continue with multiplayer aspects like free for all matches with dynamic arenas and highscore sharing etc :-)

Derezzed.spk

Dave Smart

unread,
Feb 4, 2017, 9:03:11 AM2/4/17
to DroidScript
Nice Job Michael, it's looking really great!

Manuel Lopes

unread,
Feb 5, 2017, 9:19:01 AM2/5/17
to DroidScript
cool game
Reply all
Reply to author
Forward
0 new messages