Author Topic: Alien Breed 5  (Read 21724 times)

0 Members and 1 Guest are viewing this topic.

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Alien Breed 5
« Reply #90 on: October 07, 2012, 05:59:55 am »
It's very likely, especially if you have a lot of files. Even if they're archived, they'll take up space in the VAT.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Alien Breed 5
« Reply #91 on: October 07, 2012, 06:39:12 am »
I think you didn't quite have enough RAM free; if the program file & the data file are both located in Archive mem, you need about 22KB of free RAM. This includes the program file being copied to RAM, the data file being copied to RAM, plus 3.2KB for decompression of the levels. So you want to avoid having unneccessary files in RAM, such as the Ion install files, etc.

I'd say maybe that's why it worked on the 83+, perhaps you had a little more free RAM?

Glad you got it working somehow though :)
Lol, Ion install files :P
Why would I need Ion install files if I have zStart ? It includes Ion libs and automatically reinstalls itself after a RAM Clear.
And I have nothing in my RAM. Everything is in Archive. But as Chickendude said, I have a lot of files (appvars, programs, etc) so I have a lot of entries in the VAT. Even right after a RAM Clear I only get 21207 bytes of RAM.

But yeah, on my 83+, as there is almost nothing on it, I have more than 23000 bytes of free RAM :D

edit I got an idea *.*
Since your program approximately takes 16000 bytes but less than 16384, why not compiling it as an app so there is a lot of free RAM ? :D
« Last Edit: October 07, 2012, 06:40:28 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Alien Breed 5
« Reply #92 on: October 07, 2012, 09:09:42 am »
You need to figure out how to reclaim your missing ram. I've had this happen before as well. I think somehow you have stuff marked for deletion that is still taking up space. D: Have you tried a full reset?

Offline JamesV

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 276
  • Rating: +77/-0
    • View Profile
    • James V's TI-Calculator page
Re: Alien Breed 5
« Reply #93 on: April 26, 2013, 08:22:24 am »
I've been working on an update for AB5, which I hope to have out soon. The update will have the following improvements:

  • Flash app version available for TI-83+/84+ calculators.
  • New enemy AI.
  • Levels automatically start loading during view of mission objectives to save time.
  • Miscellaneous bits of code optimisation.
  • Enemies are no longer deactivated as soon as they are off screen - they now stay active within a certain distance of the screen edge.

Here's a short screenshot, which shows the new flash app version loading, and how levels automatically start loading during the mission objectives.


Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Alien Breed 5
« Reply #94 on: April 26, 2013, 01:23:09 pm »
Also have you considered moving levels into appvars so that they don't fill up the program list ?

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Alien Breed 5
« Reply #95 on: April 26, 2013, 03:21:26 pm »
I've been working on an update for AB5, which I hope to have out soon. The update will have the following improvements:

  • Flash app version available for TI-83+/84+ calculators.
  • New enemy AI.
  • Levels automatically start loading during view of mission objectives to save time.
  • Miscellaneous bits of code optimisation.
  • Enemies are no longer deactivated as soon as they are off screen - they now stay active within a certain distance of the screen edge.

Here's a short screenshot, which shows the new flash app version loading, and how levels automatically start loading during the mission objectives.
Glad to learn you made it a Flash app, I'll finally be able to play this on my 84+SE :D

Also have you considered moving levels into appvars so that they don't fill up the program list ?
I second this request. Even though it is not as annoying as not being able to launch the game, it would still be an improvement to have them elsewhere than in the program list ;)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline JamesV

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 276
  • Rating: +77/-0
    • View Profile
    • James V's TI-Calculator page
Re: Alien Breed 5
« Reply #96 on: April 28, 2013, 08:57:34 am »
Good idea guys, I've added "move level data into appvars for flash app build" to my to-do list :)

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Alien Breed 5
« Reply #97 on: April 28, 2013, 12:26:56 pm »
Nice.
BTW I'm feeling that the scrolling is much too slow, this eventually gets boring hence I don't play this game too much though it's awesome. ;)

Offline JamesV

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 276
  • Rating: +77/-0
    • View Profile
    • James V's TI-Calculator page
Re: Alien Breed 5
« Reply #98 on: April 29, 2013, 07:24:03 pm »
Nice.
BTW I'm feeling that the scrolling is much too slow, this eventually gets boring hence I don't play this game too much though it's awesome. ;)

Thanks for the feedback! I'll add this to my to-do list and see what I can do :)

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Alien Breed 5
« Reply #99 on: April 30, 2013, 11:24:26 am »
Nice.
BTW I'm feeling that the scrolling is much too slow, this eventually gets boring hence I don't play this game too much though it's awesome. ;)

Thanks for the feedback! I'll add this to my to-do list and see what I can do :)
Some stupid thing I just found out to fasten things a bit is just to add frameskipping. You don't change anything to the drawings to the buffers but you don't always copy them to the screen. That is not really a smart optimization hack but it really works for monochrome games.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Alien Breed 5
« Reply #100 on: April 30, 2013, 01:45:49 pm »
Also multi buffering is a good idea instead of redrawing every frame. ;) There are efficient ways of scrolling without redrawing the whole screen.
« Last Edit: April 30, 2013, 01:47:00 pm by Streetwalker »

Offline Joshuasm32

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 142
  • Rating: +19/-7
    • View Profile
    • Network
Re: Alien Breed 5
« Reply #101 on: April 30, 2013, 06:31:02 pm »
Hey, James, I think that your ABIV game was awesome!  One idea though: can the sprite for the main character be changed?  I gave the program to some of the kids at school, and, no offense, but for the longest time, they thought the avatar was a giant butt.  ???  I am not joking.  I think that the Omnimaga community should try to create a better sprite...   ;)
« Last Edit: April 30, 2013, 06:54:19 pm by codebender »
My name is Josh and I a developer at Moonzean. I enjoy Radiohead, web development, Java, and cryptograms.
Spoiler For No Surprises, by Radiohead:
A heart that's full up like a landfill
A job that slowly kills you
Bruises that won't heal

You look so tired unhappy
Bring down the government
They don't, they don't speak for us

I'll take a quiet life
A handshake of carbon monoxide

And no alarms and no surprises
No alarms and no surprises
No alarms and no surprises
Silent, silent

This is my final fit
My final bellyache

With no alarms and no surprises
No alarms and no surprises
No alarms and no surprises please

Such a pretty house
And such a pretty garden

No alarms and no surprises
No alarms and no surprises
No alarms and no surprises please

Offline JamesV

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 276
  • Rating: +77/-0
    • View Profile
    • James V's TI-Calculator page
Re: Alien Breed 5
« Reply #102 on: April 30, 2013, 10:21:13 pm »
Also multi buffering is a good idea instead of redrawing every frame. ;) There are efficient ways of scrolling without redrawing the whole screen.
Currently the screen is buffered. The background is only drawn once (when the level is first loaded). This is saved to the video buffer. Then the sprites are drawn on top of that and the result is copied to the lcd. After that, the buffer is restored (the background with no sprites over the top). The next frame, if the player has moved towards a screen edge, the background is scrolled 1 pixel and saved to the buffer again, before drawing the sprites. So the background isn't being fully re-rendered each frame.

The scrolling itself is actually quite fast. What's slow is the drawing of the sprites, as they are all masked and also clipped if they hang off the screen. Because of this, the game runs substantially faster when there is just the player sprite on screen, but then slows down noticably when more enemies, bullets & animations are all on screen at once. To combat this speed change, the game is currently throttled back so that it runs at a maximum frame rate of around 29fps (according to WabbitEmu). That way, the speed reduction is less when there are lots of enemies, bullets & animations to draw (I'll have to do some testing when I get a chance to get exact figures on the speed changes).
EDIT: I just ran a few quick tests. If I run the game at full speed unthrottled with only the player sprite on screen, it scrolls on average at 35fps. With 8 extra sprites are on screen, it averages at 24fps. With 12 extra sprites on screen, it averages at 18fps.

I intend to look at writing a faster sprite routine for enemies, bullets & animations that only handle clipping, but not masking. Those particular sprites don't really have any need for masking, and a routine that ignores masking should (in theory) operate at about twice the speed. Hopefully this allows me to release the throttle a bit and increase the frame rate without the game speeding up & slowing down too much when it has more sprites to draw.
EDIT: Based on the above tests, the game can run 20% faster when there are no sprites on screen. I'll be trying unmasked sprites to see if this decreases the speed reduction factor when there are many sprites on screen at once.

Hey, James, I think that your ABIV game was awesome!  One idea though: can the sprite for the main character be changed?  I gave the program to some of the kids at school, and, no offense, but for the longest time, they thought the avatar was a giant butt.  ???  I am not joking.  I think that the Omnimaga community should try to create a better sprite...   ;)
Haha, I've never heard it referred to as a giant butt before, but I can definitely see it :) I've tried to keep the sprite as close a match as possible to the sprite in the original Amiga games. However, I'm always happy to consider anything that gets drawn up. I would like to keep it fairly faithful to the original though if possible :)
« Last Edit: May 01, 2013, 02:21:18 am by JamesV »

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Alien Breed 5
« Reply #103 on: May 01, 2013, 02:42:40 am »
Currently the screen is buffered. The background is only drawn once (when the level is first loaded). This is saved to the video buffer. Then the sprites are drawn on top of that and the result is copied to the lcd. After that, the buffer is restored (the background with no sprites over the top). The next frame, if the player has moved towards a screen edge, the background is scrolled 1 pixel and saved to the buffer again, before drawing the sprites. So the background isn't being fully re-rendered each frame.

The scrolling itself is actually quite fast. What's slow is the drawing of the sprites, as they are all masked and also clipped if they hang off the screen. Because of this, the game runs substantially faster when there is just the player sprite on screen, but then slows down noticably when more enemies, bullets & animations are all on screen at once. To combat this speed change, the game is currently throttled back so that it runs at a maximum frame rate of around 29fps (according to WabbitEmu). That way, the speed reduction is less when there are lots of enemies, bullets & animations to draw (I'll have to do some testing when I get a chance to get exact figures on the speed changes).
EDIT: I just ran a few quick tests. If I run the game at full speed unthrottled with only the player sprite on screen, it scrolls on average at 35fps. With 8 extra sprites are on screen, it averages at 24fps. With 12 extra sprites on screen, it averages at 18fps.

I intend to look at writing a faster sprite routine for enemies, bullets & animations that only handle clipping, but not masking. Those particular sprites don't really have any need for masking, and a routine that ignores masking should (in theory) operate at about twice the speed. Hopefully this allows me to release the throttle a bit and increase the frame rate without the game speeding up & slowing down too much when it has more sprites to draw.
EDIT: Based on the above tests, the game can run 20% faster when there are no sprites on screen. I'll be trying unmasked sprites to see if this decreases the speed reduction factor when there are many sprites on screen at once.
Oh nice, I didn't know that you decreased the overall speed to reduce the slowdown with a bunch of ennemies.
And yeah I don't think that the entities need masking since they're all black.

I felt your tilemapper was because I wrote this : http://ourl.ca/18573 but it's not comparable since you have a much more elaborate game. :P

Offline JamesV

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 276
  • Rating: +77/-0
    • View Profile
    • James V's TI-Calculator page
Re: Alien Breed 5
« Reply #104 on: May 01, 2013, 07:19:57 am »
I just had a proper look over my code (which I really should have done earlier :P but I was in a hurry) and discovered that the enemies/bullets/animations don't actually use masked sprites at the moment... But in any case, I'll go over the sprite routine that's used for them and see if it can be improved :)