Yup. I'm gonna try to port Zombie Gun to the Prizm. Original by squidgetx. I just sent the email asking if I can, so this isn't a sure thing. I will be doing this in C.

My Modifications:
    More Weapons
    Vehicles
    New Kinds of Zombies
    New Upgrades(temporary and permanent(unless you want to turn them off))


Those are all the modifications I can think of for now. If I can think of any more, I will add to the list. Please don't give suggestions on the modifications because I'm not sure if it is allowed.

Original for TI-83+/84+: http://www.ticalc.org/archives/files/fileinfo/449/44961.html

EDIT: It has been approved! I will start working on this as soon as possible. Smile
Vehicles...yes!
you should have a supergod like upgrade for temp, and maybe a "mech" or helicopter for vehicles Very Happy

The 83+ Version is pretty neat, can't wait to see this one!
The_Coded wrote:
Vehicles...yes!
you should have a supergod like upgrade for temp, and maybe a "mech" or helicopter for vehicles Very Happy

The 83+ Version is pretty neat, can't wait to see this one!


I hope I can live up to your expectations. Razz

I've already started with the sprites. I know they aren't very good from a pixel artist point of view, but I like them for now.
This is what I have for a zombie:


This is the person on top of the terrain to test the proportions:



Give me your opinions please about the sprites and proportions.


Edit: Actually, I changed the male sprite a little:
hmm, for an MSpaint this is great, but he is kinda slim.
LuxenD wrote:
hmm, for an MSpaint this is great, but he is kinda slim.


That's like saying a story is great because it was written in vi or notepad Wink MS Paint is entirely capable of producing fine, raster art, given a good artist with experience in said program.

I would further critique the sprite artistically, but really, Spence has the right idea of quickly cranking out some working graphics so that he can get to the programming aspect, which is much more crucial to the final result (I personally have many times spent 90% of my development timeline of graphics for games, which usually led to a rushed engine and/or a cancelled project.) Good graphics and failing code do not a game make, so I suggest, Spence, that if you plan on tweaking the sprites later, do it after all the coding is complete Smile

Good luck on the entry, looking good so far. I think it's cool/weird that the modified port of an entry for another contest is being entered into another contest.
Progress Update: I finally understand the tilemapping, but now I need to figure out how to clip the sprites...
Here's a moving screenshot(faster on calc):


I couldn't get a good color moving one. That's why it is grayscale.

Here's a not-moving colored one(small):
Will the character have multiple sprites? Meaning walking will be animated or is he going to moon walk with no motion?
zeldaking wrote:
Will the character have multiple sprites? Meaning walking will be animated or is he going to moon walk with no motion?


I'll do that later. Right now, I am focusing on the programming.
I'm modifying my CopySprite routine based off of this for clipping: http://www.hugi.scene.org/online/coding/hugi%2014%20-%20coclip.htm

It should be displaying correctly, but it's erasing and displaying in a weird diagonal manner. Hmm....

Edit: I will post updates on this problem. This isn't asking for help. Just updating.
I am looking forward to this so awesomely Very Happy I like the simple sprites, it reminds me of the C64 and feels right at home on the Prizm.

Can't wait to see how you implement the animations and weaponry, keep up the good work.

Also a few suggestions for the vehicles if you want them: Make them temporary, limited ammo, perhaps 1-hit to destroy them?(so they aren't OP) and something that flies Very Happy...because flying is awesome and zombies agree..but really nice work here!
Here is a test for the blood splatter:


Edit:
I didn't see your reply until now. Razz I'll take those suggestions into consideration.
Hey Spence, What are you using to capture video on your Prizm? I can't seem to use my emulator at all..way too slow..nice blood though!

Will there be...cake?
The_Coded wrote:
Hey Spence, What are you using to capture video on your Prizm? I can't seem to use my emulator at all..way too slow..nice blood though!

Will there be...cake?


This is the tutorial I used: http://www.omnimaga.org/index.php?action=articles;sa=view;article=86

If I told you that there was cake, it would be a lie. Smile
I don't really know if I'll be able to finish this before the due date. I hope I will, but I'm having trouble with the zombies. :/
I'm not going to be able to enter the contest with this. Sad I'm still going to finish it eventually though, so don't be too sad. I'm going to come right out and ask for code help. Razz This is my code for spawning zombies:

Code:
      for(int h = 0; h < 20; h++){
         zombiespawn++;
         speedlimit++;
         if (speedlimit>=3 && zombie[h][1]==153){
            zombie[h][0] = zombie[h][0] + zombie[h][3];
            speedlimit = 0;
         }
         if ((zombie[h][0]+terrainx)==playerx){
            zombie[h][4] = 0;
            health-=2;
         }
         if(zombie[h][4] == 0){
            CopySpriteMasked(ZombieRight, zombie[h][0]+terrainx, zombie[h][1], 18, 39, 0xf000);
         }
         if(zombie[h][4] == 1){
            CopySpriteMasked(ZombieLeft, zombie[h][0]+terrainx, zombie[h][1], 18, 39, 0xf000);
         }
         if (playerx - (zombie[h][0]+terrainx) > 0){
            zombie[h][3] = 1;
            zombie[h][4] = 1;
         }
         if (playerx - (zombie[h][0]+terrainx) < 0){
            zombie[h][3] = -1;
            zombie[h][4] = 0;
         }
         if(zombiespawn == 5){
            if (zombie[h][1] > 153){
               for(int yminus = 0; yminus < 39; yminus++){
                  zombie[h][1]--;
               }
            }
            zombiespawn = 0;
         }
      }


I don't understand why it isn't spawning one at a time. Can anyone help?
Probably because you have no Bdisp_PutDisp_DD anywhere in there, I would assume?
Nope. It didn't work.
It's hard to trace this when we don't know what half the variables are used for, or what the surrounding code context is. Post some more, perhaps?
Ashbad wrote:
It's hard to trace this when we don't know what half the variables are used for, or what the surrounding code context is. Post some more, perhaps?


More code? Here's it all:

Code:
#include "keyboard.hpp"
#include "keyboard_syscalls.h"
#include "display.h"
#include "color.h"
#include "stdlib.h"
#include "ZombieData.h"

void fillArea(int x, int y, int width, int height, int color) {
   //only use lower two bytes of color
   char* VRAM = (char*)0xA8000000;
   VRAM += 2*(LCD_WIDTH_PX*y + x);
   for(int j=y; j<y+height; j++) {
      for(int i=x; i<x+width;  i++) {
         *(VRAM++) = (color&0x0000FF00)>>8;
         *(VRAM++) = (color&0x000000FF);
      }
      VRAM += 2*(LCD_WIDTH_PX-width);
   }
}

void CopySprite(const void* datar, int x, int y, int width, int height) {
   if (x > 360 || x < 0){
      return;
   }     
   color_t*data = (color_t*) datar;       
   color_t* VRAM = (color_t*)0xA8000000;       
   VRAM += LCD_WIDTH_PX*y + x;       
   for(int j=y; j<y+height; j++) {       
      for(int i=x; i<x+width; i++) {       
         *(VRAM++) = *(data++);       
     }       
     VRAM += LCD_WIDTH_PX-width;       
   }       
}     

void CopySpriteMasked(const void*datar, int x, int y, int width, int height, int maskcolor) {   
   if (x > 360 || x < 0){
      return;
   }
   color_t*data = (color_t*) datar;   
   color_t* VRAM = (color_t*)0xA8000000;   
   VRAM += LCD_WIDTH_PX*y + x;   
   for(int j=y; j<y+height; j++) {   
      for(int i=x; i<x+width;  i++) {   
         if (*(data) != maskcolor) {   
            *(VRAM++) = *(data++);   
         } else { VRAM++; data++; }   
      }   
      VRAM += LCD_WIDTH_PX-width;   
   }   


int PRGM_GetKey(){       
  unsigned char buffer[12];       
  PRGM_GetKey_OS( buffer );       
  return ( buffer[1] & 0x0F ) * 10 + ( ( buffer[2] & 0xF0 ) >> 4 );       
}     

void fill_scr(color_t color) {
        unsigned int temp_color = (unsigned int)(color<<16) | color;
   for(int i = 0; i < LCD_WIDTH_PX*LCD_HEIGHT_PX/2; i++) {
      *((int*)0xA8000000+i) = temp_color;
   }
}

int random(int lower, int upper) {
  static int a = 123456789;
  static int b = 362436069;
  static int c = 521288629;
  static int d = 88675123;
  int t;
 
  t = a ^ (a << 11);
  a = b;
  b = c;
  c = d;
  return (d = d ^ (d >> 19) ^ (t ^ (t >> 8)))%upper + lower;
}

int zombiespawn = 0;
int terrainx = 0;
int playerx = 185;
int playery = 153;
int leftright = 1;
int zombieleftright = 1;
int zombiex;
int zombiemover = 1;
int speedlimit = 0;
int level = 1;
int zombiehealth = 20;
int zombiey = 190;
int health = 200;
int zombie[20][5];
int mapdata[9][30] = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
};

int main() {
for(int h = 0; h < 20; h++){
   zombie[h][0] = random(0,702);
   zombie[h][1] = 190;
   zombie[h][2] = 20;
   zombie[h][3] = 1;
   zombie[h][4] = 1;
}
   while(1) {
      int key = PRGM_GetKey();       
      if(key == KEY_PRGM_MENU) {  GetKey(&key); }
      fill_scr(0x306b);
      for(int h = 0; h < 20; h++){
         zombiespawn++;
         speedlimit++;
         if (speedlimit>=3 && zombie[h][1]==153){
            zombie[h][0] = zombie[h][0] + zombie[h][3];
            speedlimit = 0;
         }
         if ((zombie[h][0]+terrainx)==playerx){
            zombie[h][4] = 0;
            health-=2;
         }
         if(zombie[h][4] == 0){
            CopySpriteMasked(ZombieRight, zombie[h][0]+terrainx, zombie[h][1], 18, 39, 0xf000);
         }
         if(zombie[h][4] == 1){
            CopySpriteMasked(ZombieLeft, zombie[h][0]+terrainx, zombie[h][1], 18, 39, 0xf000);
         }
         if (playerx - (zombie[h][0]+terrainx) > 0){
            zombie[h][3] = 1;
            zombie[h][4] = 1;
         }
         if (playerx - (zombie[h][0]+terrainx) < 0){
            zombie[h][3] = -1;
            zombie[h][4] = 0;
         }
         if(zombiespawn == 5){
            if (zombie[h][1] > 153){
               for(int yminus = 0; yminus < 39; yminus++){
                  zombie[h][1]--;
                  Bdisp_PutDisp_DD;
                  Bdisp_AllCr_VRAM();
               }
            }
            zombiespawn = 0;
         }
      }
      for(int i = 0; i < 9; i++){
         for(int j = 0; j < 30; j++){
            if(mapdata[i][j] == 1){
               CopySprite(Terrain1, j*24+terrainx, i*24, 24, 24);
            }
         }
      }
      if (leftright == 0){
         CopySpriteMasked(PlayerLeft, playerx, playery, 14, 39, 0xf000);
      }
      if (leftright == 1){
         CopySpriteMasked(PlayerRight, playerx, playery, 14, 39, 0xf000);
      }
      if (key==KEY_PRGM_LEFT){
         terrainx = terrainx + 1;
         leftright = 1;
      }
      if (key==KEY_PRGM_RIGHT){
         terrainx = terrainx - 1;
         leftright = 0;
      }
      fillArea(92, 5, health, 15, COLOR_RED);
      Bdisp_PutDisp_DD();       
      Bdisp_AllCr_VRAM(); 
   }       
   return 0;       
}
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement