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.


Messages - Spenceboy98

Pages: 1 ... 20 21 [22] 23 24 ... 39
316
TI Z80 / Re: [Axe] KarRace
« on: December 30, 2012, 05:40:06 pm »
*SUPER DOUBLE POST UPDATE*

It has a finish line now(you don't see it in the screeny). It appears when the score gets over 9000. It now speeds up when you get to 4500 instead of 1500.



It seems slower now. Do you think I should use Full?

Also, before I uploaded this pic, this is what RFG looked like:


317
TI Z80 / Re: [Axe] KarRace
« on: December 29, 2012, 09:50:34 pm »
It looks like somehow the LCD's z-address got set to 1 (or is it 63?), which makes it so the whole screen is shifted down one row and the bottom one row wraps around to the top. Hopefully it was just caused by some random one-time thing, in which case you should be able to fix it by archiving anything you want to save and then clearing your RAM.

It works fine on the regular calculator, so....

Lookin' sweet Spenceboy98!!

Thanks!

318
TI Z80 / Re: [Axe] KarRace
« on: December 29, 2012, 09:23:15 pm »
Looks awesome! (There is an artifact at the top of the screen when a sprite is clipped at the bottom of the screen?)

I saw that, but I don't know why it does it...

319
TI Z80 / Re: [Axe] KarRace
« on: December 29, 2012, 09:19:31 pm »
woo, the wheels are looking cool :D

Thanks!

wow, amazing :) nice work! it looks great

Thanks to you too. :P

320
TI Z80 / Re: [Axe] KarRace
« on: December 29, 2012, 03:17:44 pm »
*UPDATE*

Animated Wheels:


321
Miscellaneous / Re: Christmas - what did you get?
« on: December 29, 2012, 02:12:39 pm »
Wow, that's a pretty nice microphone! :D What are you going to be using it for?

I'm gonna be using it for recording things, such as, singing, random things for youtube. I'm planning on overdubbing some cartoons for fun.

Yeah it sounds pretty good. WOuld definitively be good to record music instruments or for game reviews or something, since there would be barely any editing job needed (which often reduces the sound quality, especially noise reduction)

Maybe I could do some game reviews(or commentated walkthroughs). Hm...

322
Miscellaneous / Re: Christmas - what did you get?
« on: December 29, 2012, 01:07:25 pm »
I finally got my new microphone in the mail yesterday. Listen to that nice quality: http://www.mediafire.com/?ur338bv7255v14q

323
Casio Calculators / Need Help with Prizm Raycaster
« on: December 28, 2012, 01:21:11 pm »
I'm making a raycaster based off of this, and for some reason, it isn't working right. I came here to ask because I know there are some raycasting experts here. :P

My Code:
Code: [Select]
#include "keyboard.hpp"
#include "color.h"
#include "display.h"
#include "keyboard_syscalls.h"
#include "math.h"
#include "stdlib.h"

void plot(int x0, int y0, int color) {
   char* VRAM = (char*)0xA8000000;
   VRAM += 2*(y0*LCD_WIDTH_PX + x0);
   *(VRAM++) = (color&0x0000FF00)>>8;
   *(VRAM++) = (color&0x000000FF);
   return;
}

void drawLine(int x1, int y1, int x2, int y2, int color) {
    signed char ix;
    signed char iy;

    // if x1 == x2 or y1 == y2, then it does not matter what we set here
    int delta_x = (x2 > x1?(ix = 1, x2 - x1):(ix = -1, x1 - x2)) << 1;
    int delta_y = (y2 > y1?(iy = 1, y2 - y1):(iy = -1, y1 - y2)) << 1;

   plot(x1, y1, color);
    if (delta_x >= delta_y) {
        int error = delta_y - (delta_x >> 1);        // error may go below zero
        while (x1 != x2) {
            if (error >= 0) {
                if (error || (ix > 0)) {
                    y1 += iy;
                    error -= delta_x;
                }                           // else do nothing
         }                              // else do nothing
            x1 += ix;
            error += delta_y;
            plot(x1, y1, color);
        }
    } else {
        int error = delta_x - (delta_y >> 1);      // error may go below zero
        while (y1 != y2) {
            if (error >= 0) {
                if (error || (iy > 0)) {
                    x1 += ix;
                    error -= delta_y;
                }                           // else do nothing
            }                              // else do nothing
            y1 += iy;
            error += delta_x;
            plot(x1, y1, color);
        }
    }
}

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

int playerh = 32;
int fov = 60;
int viewingangle = 45;
int playergridx = 2;
int playergridy = 2;
int playerunitx;
int playerunity;
int projectionh = 200;
int projectionw = 320;
int distance = 160/tan(30);
int column = 60/320;
int planemx = 160;
int planemy = 100;
int AngleInc = 1;
int XDisplacement;
int YDisplacement;
int correctdistance;
int sliceheight;
int Ax;
int Ay;
int Cx;
int Cy;
int Dx;
int Dy;
int Bx;
int By;
int Xa;
int Ya;
int Xb;
int Yb;
int DxA;
int DyA;
int CyA;
int CxA;
int liney;

int MapData[10][10] = {
{1,1,1,1,1,1,1,1,1,1},
{1,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,1},
{1,1,1,1,1,1,1,1,1,1}
};

int absolute(int n){
if(n < 0){
n = -n;
}
return n;
}
int main(){
XDisplacement = cos(viewingangle) * 10;
YDisplacement = sin(viewingangle) * 10;
playerunitx = 32 + (playergridx * 64);
playerunity = 32 + (playergridy * 64);
while(1){
int key = PRGM_GetKey();
if(key == KEY_PRGM_MENU) {  GetKey(&key); }
if(viewingangle <= 180 && viewingangle >= 0){
Ya = 64;
Ay = floor(playerunity / 64) * (64) - 1;
} else if(viewingangle <= 360 && viewingangle >= 181){
Ya = -64;
Ay = floor(playerunity / 64) * (64) + 64;
}
Ax = playerunitx + (playerunity - Ay) / tan(viewingangle);
Xa = 64 / tan(viewingangle);

Cx = Ax + Xa;
Cy = Ay + Ya;
CxA = floor(Cx / 64);
CyA = floor(Cy / 64);

playergridx = playerunitx/64;
playergridy = playerunity/64;

for(int w = 0; w < 10; w++){
if(MapData[CxA][CyA] == 1)
break;
CxA = floor(Cx / 64);
CyA = floor(Cy / 64);
Cx += Xa;
Cy += Ya;
}
Cx = floor(Cx / 64);
Cy = floor(Cy / 64);

if(viewingangle <= 270 && viewingangle >= 90){
Xb = 64;
Bx = floor(playerunity / 64) * (64) - 1;
} else if((viewingangle <= 89 && viewingangle >= 0) && (viewingangle <=360 && viewingangle >= 271)){
Xb = -64;
Bx = floor(playerunity / 64) * (64) + 64;
}
By = playerunity + (playerunitx - Bx) * tan(viewingangle);
Dx = Bx + Xb;
Dy = By + Yb;
DxA = floor(Dx / 64);
DyA = floor(Dy / 64);

for(int e = 0; e < 10; e++){
if(MapData[DyA][DxA] == 1)
break;
DxA = floor(Dx / 64);
DyA = floor(Dy / 64);
Dx += Xa;
Dy += Ya;
}
Dx = floor(Dx / 64);
Dy = floor(Dy / 64);
for(int i = 0; i < 320; i++){
if((absolute(playerunitx - Dx) / cos(viewingangle)) < (absolute(playerunitx - Cx) / cos(viewingangle))){
for(int j = -30; j < 30; j++){
correctdistance = (absolute(playerunitx - Dx) / cos(viewingangle)) * cos(j);
sliceheight = 64 / correctdistance * 277;
liney = 100 - (sliceheight / 2);
drawLine(i, liney, i, liney + correctdistance, COLOR_RED);
Bdisp_PutDisp_DD();
}
} else {
for(int j = -30; j < 30; j++){
correctdistance = (absolute(playerunitx - Cx) / cos(viewingangle)) * cos(j);
sliceheight = 64 / correctdistance * 277;
liney = 100 - (sliceheight / 2);
drawLine(i, liney, i, liney + correctdistance, COLOR_RED);
Bdisp_PutDisp_DD();
}
}
}
if(key == KEY_PRGM_UP){
playerunitx += XDisplacement;
playerunity += YDisplacement;
}
if(key == KEY_PRGM_DOWN){
playerunitx -= XDisplacement;
playerunity -= YDisplacement;
}
if(key == KEY_PRGM_LEFT){
viewingangle -= AngleInc;
}
if(key == KEY_PRGM_RIGHT){
viewingangle += AngleInc;
}
if(viewingangle > 360){
viewingangle = 0;
}
if(viewingangle < 0){
viewingangle = 360;
}
}
return 0;
}


The "for" loops used to be "while" loops, but the while loop would never break(something with that math is messed up if you can help), so I just changed it to a for loop, so that it would eventually break.

Another problem I am having is that when displaying the lines, it is going incredibly slow. Could anyone help with that?

I am using this raycaster as a learning example to myself, so that I will be able to make a raycaster in most any language. Any help would be appreciated.

324
Other Calc-Related Projects and Ideas / Re: OmniRPG - Sprites
« on: December 27, 2012, 06:08:08 pm »
Here is my final:
Side:

Face:

Back:

325
Music Showcase / Re: Whatcha Making, guys?
« on: December 26, 2012, 10:10:11 pm »
The is the most recent version of the song I'm writing(the most recent that is on this computer):
http://www.mediafire.com/?w5ul9luki154374

It doesn't really have a name yet. The part where it only plays the low part is when the words are supposed to be. It's going to be a brony type song(it says, "nopony"). Other than that, if you've heard the brony song, "Awoken", the story is a little similar(kinda sad/depressing).

326
Other Calc-Related Projects and Ideas / Re: OmniRPG - Sprites
« on: December 26, 2012, 09:32:41 pm »
I just made front views:


Bigger:


I don't know if my sprites will work for this RPG though...

327
Other Calc-Related Projects and Ideas / Re: OmniRPG - Sprites
« on: December 26, 2012, 06:37:52 pm »
If we are designing our own npc character, this is what I want for mine(it's a pony):


Bigger:


Monochrome:

328
Miscellaneous / Re: Christmas - what did you get?
« on: December 25, 2012, 03:04:39 pm »
So far, I've gotten an Adipose stress toy as an early gift and I should be getting my MXL 990 USB microphone in the mail soon. :)

329
Miscellaneous / Re: 2012 Apocalypse Survivors
« on: December 21, 2012, 11:32:31 pm »
I feel fantastic and I'm still alive.

330
Other Calculators / Re: People react to your calculator...
« on: December 21, 2012, 12:57:06 pm »
People usually just ask me if I am playing games or if I have games.

Pages: 1 ... 20 21 [22] 23 24 ... 39