• Alien Breed 5 Episode III: Impact 5 2
Currently:  

Author Topic: Alien Breed 5 Episode III: Impact  (Read 57370 times)

0 Members and 1 Guest are viewing this topic.

Offline JamesV

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 276
  • Rating: +77/-0
    • View Profile
    • James V's TI-Calculator page
Alien Breed 5 Episode III: Impact
« on: December 21, 2015, 08:37:32 am »

Since 3.5 years ago when I decided to do Alien Breed 5, I've had a rough plan in my head for it to be a 3-part game, ie. the first main release, followed by two additional campaigns with new features to be added later. I've recently started working on the 3rd and (most likely) final part. It's still very early days, but I've already gotten a few cool things done.


As usual, there will be a new campaign, although it will be different in structure to Episodes I & II. There will also be new gameplay elements, some new enemies, more achievements and potentially some slight graphics tweaks in the form of more tile animations.


So far, I've reworked the level file format to allow for some of the additional gameplay elements, which will allow for more things to happen in levels. The level editor pretty much had to be rebuilt from scratch, as well as making a simple program to convert the existing Episode I & II data to the new format. I'm now halfway through implementing the calculator-side changes to all of this, so that the game correctly interprets the new level format and starts incorporating the new elements.


Additionally, whilst this will still include the standard TI-83+/84+ flash application release, over the last 36 hours I've been doing some tests to see how viable it would be to include a build for the TI-84+CE!


I've drawn inspiration from MateoConLechuga's Mono2Color project for the TI-84+CSE, and after a few experiments determined that I'll most likely have to stick with monochrome tiles & sprites so that I can run the LCD in 1bpp mode, otherwise the frame rate gets way too slow. Below you can view a demonstration showing the game in 3 different zoom levels (x1, x2 & x3). As you'll see, x1 moves super quick, x2 moves roughly the same speed as the TI-83+/84+ monochrome version (within 1fps), and x3 is a bit slower again (around 7-8fps slower). Of course this demo only includes the scrolling background, no player/enemy/gunfire sprites. However, all the tile drawing & sprite rendering is done on a 768 byte buffer, the part that slows things down is scaling this 96x64 resolution buffer up to either 192x128 (x2) or 288x192 (x3). I'm confident that drawing the sprites over the tilemap will have minimal effect with the CPU speed of the TI-84+CE (but this will be my next few experiments).


The 768 video buffer -> vram drawing/scaling routines were written fairly quickly, so I might be able to optimise them a little. I'll continue playing around and see how I can improve it. At the very least, I'd like to have a TI-84+CE version with a play screen of 192x128.


« Last Edit: December 23, 2015, 07:43:24 am by JamesV »

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: Alien Breed 5 v3.0.0
« Reply #1 on: December 21, 2015, 10:40:26 am »
Great work as always! Can't wait to see what comes out of this? Are you planning to release a tutorial/the source for your mono-to-color method at some point?
I am Bach.

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Alien Breed 5 v3.0.0
« Reply #2 on: December 21, 2015, 10:50:58 am »
Do you use parctial redraw? Because different screen sizes run at different speeds, it seems to me you are not :P
Anyhow, this is cool :)
This reminds me i need to start working on my mincraft port to the CE :P
-German Kuznetsov
The impossible chemical compound.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Alien Breed 5 v3.0.0
« Reply #3 on: December 21, 2015, 12:37:31 pm »
Hey James, this is pretty awesome. Honestly, it doesn't look too bad at 3x resolution speed wise. I wonder what the bottle neck is though since the processor is a lot faster?

Offline Digital

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 107
  • Rating: +0/-0
  • 10101
    • View Profile
    • Digital's Hp
Re: Alien Breed 5 v3.0.0
« Reply #4 on: December 21, 2015, 02:10:44 pm »
That sounds like it'll be a pretty good and fun game :)
yes, non CE and CE support, always great to have both, can't wait to try it out.
I'm sorry if i might make some mistakes, I'm German so English isn't my first language. Please correct me :)

Offline JamesV

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 276
  • Rating: +77/-0
    • View Profile
    • James V's TI-Calculator page
Re: Alien Breed 5 v3.0.0
« Reply #5 on: December 21, 2015, 05:08:26 pm »
Great work as always! Can't wait to see what comes out of this? Are you planning to release a tutorial/the source for your mono-to-color method at some point?
Certainly the code and details and implementation will be released - it's actually quite simple. The tiles/sprites are just drawn to a 768 byte buffer as they would be on the non-colour calcs, then it's just a special routine to scale this up either x2 or x3 as it simultaneously writes it to LCD memory.

Do you use parctial redraw? Because different screen sizes run at different speeds, it seems to me you are not
Anyhow, this is cool
This reminds me i need to start working on my mincraft port to the CE
Partial redraw? I'm only writing as much data to the LCD as required each frame, which is either 3072 bytes (192*128/8) for the x2 zoom or 6912 bytes (288*192/8) for the x3 zoom (remembering that the LCD is in 1bpp mode to resemble the non-colour calcs). Or does the 84+CE have some kind of interlacing method like the CSE that I've missed in the documentation?

Hey James, this is pretty awesome. Honestly, it doesn't look too bad at 3x resolution speed wise. I wonder what the bottle neck is though since the processor is a lot faster?
The bottle neck is probably just my inefficient routine that I put together in a rush :P

After sleeping on it, I came up with a different method this morning for copying & scaling the video buffer more efficiently. I only had a chance to test it on the 3x zoom (288x192 resolution) and it was running at pretty much the same frame rate as the 83+/84+ non CE version. I'll try it later on 2x zoom as well and see how fast it gets, but at a rough calculation it should be about 30% faster than the 83+/84+ non CE frame rate.

Either way, it's certainly workable :)

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Alien Breed 5 v3.0.0
« Reply #6 on: December 21, 2015, 05:36:31 pm »
Awesome, I'm glad to hear you were able to get a nice speed boost. :D

Offline JamesV

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 276
  • Rating: +77/-0
    • View Profile
    • James V's TI-Calculator page
Re: Alien Breed 5 v3.0.0
« Reply #7 on: December 23, 2015, 07:42:55 am »

Today I've finished off (for the time being) the new level event scripting that will feature in Episode III: Impact (and Episodes I & II will be patched to the new format as well). The new format gives me more power to add multiple triggers & events during a level. In the below screenshot there are a few examples:


1. After a certain amount of time passes, an in-level text block is displayed, and the darkness filter is enabled.
2. When the player walks up to the computer, another text is displayed and the darkness filter is disabled.
3. Bosses are no longer triggered by a single tile - an area is set (can be any rectangular shape up to 32x32 tiles in size) that triggers a boss (technically there could be multiple bosses in a level now), and in this case also modifies two tiles in the level to seal off the room (previously this was locked to modify one tile when a boss fight started, and one more tile when a boss fight finished).
4. When the boss is killed, multiple tiles are modified to open various paths out of the room, the countdown sequence is triggered, and the level is flagged as being ready for completion.


Triggers & commands can be used in various combinations to create various events so that I can add more depth to the new levels.





Now that this is done, I'm going to attempt to start adapting the code and applying the new LCD routines to make it compatible with the TI-84+CE :)

Offline JamesV

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 276
  • Rating: +77/-0
    • View Profile
    • James V's TI-Calculator page
Re: Alien Breed 5 Episode III: Impact
« Reply #8 on: December 25, 2015, 06:29:29 pm »

With some assistance from MateoConLechuga, the 3x scaling/drawing routine is now running substantially faster on the TI-84+CE. Thanks Mateo!


Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Alien Breed 5 Episode III: Impact
« Reply #9 on: December 28, 2015, 08:07:35 am »
Hey James, those new features sound awesome! :D Also nice to hear that @MateoConLechuga was able to lend you a hand. Great work guys! Maybe you can add a splash of colour now?  ;D

Offline JamesV

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 276
  • Rating: +77/-0
    • View Profile
    • James V's TI-Calculator page
Re: Alien Breed 5 Episode III: Impact
« Reply #10 on: December 30, 2015, 01:49:37 am »
Hey James, those new features sound awesome! :D Also nice to hear that @MateoConLechuga was able to lend you a hand. Great work guys! Maybe you can add a splash of colour now?  ;D
I have some ideas on how to integrate a minimal amount of colours without slowing things down, although for the most part I think there will still only be two colours on screen at once in terms of the "play field" (the planned HUD could use up to 256 colours). This is simply because the video buffer is still only 768 bytes (96x64/8 = 1bpp) to enable faster scrolling and tile/sprite rendering behind the scenes. But it's still early days so who knows what I might be able to achieve - I'll be sure to experiment further! :)

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Alien Breed 5 Episode III: Impact
« Reply #11 on: December 30, 2015, 10:15:52 pm »
Ah, I forgot about it being 1bpp. I was still thinking minimalistic, but a little more than 2. Hmm.... Well, I'll leave it to you to tinker. ;)

Offline Ivoah

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +3/-0
    • View Profile
    • Codinghobbit
Re: Alien Breed 5 Episode III: Impact
« Reply #12 on: December 31, 2015, 12:24:37 am »

With some assistance from MateoConLechuga, the 3x scaling/drawing routine is now running substantially faster on the TI-84+CE. Thanks Mateo!



It seems like it'd be nicer if it showed more of the map, instead of scaling everything up.
http://codinghobbit.no-ip.org
My Calcs:
TI-86 (now broken) $2
TI SR-56 - $0
TI-Nspire CX CAS - $152
TI-84+ Silver Edition - $56
TI-84+ Silver Edition - $0
TI-85 - $0
TI-73 Explorer VS - $10
ViewScreen - $3

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6266
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Alien Breed 5 Episode III: Impact
« Reply #13 on: December 31, 2015, 12:14:42 pm »
It seems like it'd be nicer if it showed more of the map, instead of scaling everything up.
That would completely change the feeling of the game between devices though.
/e

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Alien Breed 5 Episode III: Impact
« Reply #14 on: January 02, 2016, 07:36:41 am »
I've been thinking of a way you could somehow attach color data per tile, each tile would still only support two tiles but you could do something similar to RLE where you'd have an extra buffer keeping track of the current palette. Something like:
Code: [Select]
        ; bit 7
        exx
        ld a,(hl) ;hl' points to palette array
        exx
        sla d \ adc a,a
It's a bit slower and you'd have to inc hl' at the end of each djnz iteration. You could possibly get around using the shadow registers if you pushed bc (you could maybe move the push bc before the ld bc,288 to the vbcx3Row label), opening up C to use instead of D for the gbuf byte to rotate, then you could use DE to hold the pointer to the palette array. The palette array just tells you the first palette value, eg. 0 corresponds to palette entries 0 and 1, 1 corresponds to 2 and 3, 2 corresponds to 4 and 5, etc. That'd look something like:
Code: [Select]
        ; bit 7
        ld a,(de) ;de points to palette array
        sla c \ adc a,a
The overhead would be a bit less than my first idea, i think. Each tile would still only have two colors, but the map would be a bit more colorful. You'd also have to fill out the palette array as you draw your tilemap, but that shouldn't take up too much time. Definitely wish i had a CE right about now :D

EDIT: And if you come up with something that's too processor heavy, there's always shifting two pixels per frame which would still look really nice.
« Last Edit: January 02, 2016, 07:39:48 am by chickendude »