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.
Topics - Spenceboy98
16
« on: February 15, 2013, 04:21:24 pm »
There was this game I used to play on the internet, and I don't remember what website it was on or what it was called. The gave was between two semi-circles with eyes. They hit a ball back and forth until one of them dropped it. If someone knows this game, I would appreciate if you'd tell me what it's called. Anyways, I Decided to try to recreate it in Axe, and this is what I have so far: This is my code so far: :.TENNIS :#Icon(0000000000000000000000000000000003C00FF01FF83F9C7F9E7FFEFFFFFFFF) :[030F1F3F7F7FFFFF]→Pic1 :[C0F0F89C9EFEFFFF] :[030C1026464080FF]→Pic2 :[C0300804020201FF] :0→X :56→Y :88→Z :56→W :0.1→G :0→V :Repeat getKey(15) :ClrDraw :G+V→V :Pt-On(X,Y,Pic1 :Pt-On(X+8,Y,8+Pic1 :If Y≥56 :56→Y :0→V :End :Y+V→Y :If getKey(2) and (X>0) :X-1→X :End :If getKey(3) and (X<80) :X+1→X :End :If getKey(54) and (Y=56) :-4→V :Y+V→Y :End :DispGraph :End
I want to make the jumping slower(without reducing the height of jump), so if anyone could help me with that, it would be appreciated. Also, if anyone could help me with some physics(ball bouncing off the semicircle), that would be nice too(I'll be looking on Google for this, but if you know of something, by all means, reply and post it).
17
« on: January 06, 2013, 02:35:42 pm »
Equationhttp://www.omnimaga.org/index.php?action=downloads;sa=view;down=787This is a TI-Basic program that when you type in the variables for certain math equations, it gives you the answer to the math problem. It includes several Algebra Equations including slope, Pythagorean Theorem, distance, midpoint, and quadratic. It also includes geometry equations too. Edit: I added more options to the quadratic. Conversion planned. You can also find the nth number of the Fibonacci sequence. I hope you enjoy... Screenshots: Download it here.
19
« on: January 04, 2013, 10:28:24 pm »
Anyone else a fan of Fringe on FOX? I love the show and can't wait for the next episode. Even though she is not in this season, Gene is my favorite character.
20
« 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. My Code: #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.
21
« on: December 18, 2012, 09:19:38 pm »
This is a little game in Axe I started a little while back, but never really finished. Today I finished a little working version: The object of the game is to dodge the cars that you are passing. Later, I will probably add bonuses and stuff. Download of source is attached.
22
« on: November 16, 2012, 11:16:35 pm »
Cross post: Yup. I'm gonna try to port Zombie Gun to the Prizm. Original by squidgetx. I asked and he approves. I will be doing this in C. 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
23
« on: October 25, 2012, 11:30:47 am »
[LuaZM] Bloxorzhttp://www.omnimaga.org/index.php?action=downloads;sa=view;down=829This program was ported by Spenceboy98 and KermMartian. The first full Lua game for the Casio Prizm, Bloxorz is a port of an Nspire game. It has 16 levels. An older version of it froze when it got to the 16th level, so if it does, please message Spenceboy98 at cemetech or omnimaga. Use the arrow key to move the block around. Press [OPTN] to go to the level screen. Press [EXIT], [AC/ON], or [MENU] to quit. Requires LuaZM. I hope I'm not missing anything. Enjoy... Credits go to Nick Steen for the original NSpire game. Download it here.
25
« on: June 16, 2012, 12:31:00 am »
Is there a way to change the background color of the screen without storing a gigantic sprite?
26
« on: May 24, 2012, 05:32:48 pm »
Can someone please give me an example of a raycaster in C. I don't really understand the coding of a raycaster, and I need help. I've been looking at this tutorial, but it really isn't making any sense. Can someone help me?
27
« on: May 22, 2012, 11:03:55 pm »
I made a Nyan Cat animation for my Prizm. It's a big file, but it plays at a pretty good speed. I attach it here.
28
« on: April 27, 2012, 07:28:55 pm »
Does anyone know how to do physics in Prizm C? I think I wanna try to make a platformer game.
29
« on: April 03, 2012, 11:29:46 pm »
I don't know how to optimize Axe code, so I am asking for help. What original code does: Code: :.AXETEST :identity(3FFC3FFC30CF30CF300C300C0C300C303FFC3FFC330C330C3FFC3FFCF00FF00F) :0→X :56→Y :[7E4B42247E527EC3]→Pic1 :Repeat getKey(15) :StorePic :Pt-On(X,Y,Pic1) :DispGraph :Pt-Change(X,Y,Pic1 :RecallPic :If getKey(2) :Lbl PIP :[7ED242247E4A7EC3]→Pic2 :X-1→X :Goto LEFT :End :If getKey(3) :Lbl PI :X+2→X :End :If getKey(4) :Lbl IP :[7E7E42247EC37EC3]→Pic3 :Y-1→Y :Goto UP :End :If getKey(1) :Lbl PIPI :[7E665A247EC37EC3]→Pic4 :Y+1→Y :Goto DOWN :End :End :Lbl LEFT :Repeat getKey(15) :StorePic :Pt-On(X,Y,Pic2) :DispGraph :Pt-Change(X,Y,Pic2 :RecallPic :If getKey(2) :X-2→X :End :If getKey(3) :Goto PI :End :If getKey(4) :Goto IP :End :If getKey(1) :Goto PIPI :End :End :Lbl UP :Repeat getKey(15) :StorePic :Pt-On(X,Y,Pic3) :DispGraph :Pt-Change(X,Y,Pic3) :RecallPic :If getKey(4) :Y-1→Y :End :If getKey(2) :Goto PIP :End :If getKey(3) :Goto PI :End :If getKey(1) :Goto PIPI :End :End :Lbl DOWN :Repeat getKey(15) :StorePic :Pt-On(X,Y,Pic4 :DispGraph :Pt-Change(X,Y,Pic4 :RecallPic :If getKey(1) :Y+1→Y :End :If getKey(2) :Goto PIP :End :If getKey(3) :Goto PI :End :If getKey(4) :Goto IP :End :End :
Is there any way to optimize it?
30
« on: March 22, 2012, 03:48:01 pm »
What are the getKey values for [2nd], [MODE], and [DEL]? I can't seem to find them.
|