This is a game similar to whack-a-mole. It shows a 3×3 board of dots. When a X appears on a dot, you must press the adjacent button on the numberpad. It will go on until you either press the wrong button, or run out of time. I can't get a screenshot now, but i'm close to finishing.
I'm sorry I haven't been here for a while, I've been sort of busy.
I am making it in C. I've worked on it some more, and now all I have to do is the title screen and the function that detects key presses on the number pad. I might implement more game modes once I'm done.
I am making it in C. I've worked on it some more, and now all I have to do is the title screen and the function that detects key presses on the number pad. I might implement more game modes once I'm done.
That sounds really cool!
If you need ideas, here are a few (I have no idea how difficult or easy these may be):
2x2
1x1(reflex timing sort of thing)
Things that you have to avoid
Race against AI
Extra time for correct answers
Multiple Lives
Highscores
Multiplayer (maybe with linked calcs?)
Different levels/difficulties
Color schemes
l'm not sure if any of these are good, but I hope they can spark some ideas!
If you need ideas, here are a few (I have no idea how difficult or easy these may be):
2x2
1x1(reflex timing sort of thing)
Things that you have to avoid
Race against AI
Extra time for correct answers
Multiple Lives
Highscores
Multiplayer (maybe with linked calcs?)
Different levels/difficulties
Color schemes
l'm not sure if any of these are good, but I hope they can spark some ideas!
What do you get when you multiply six by nine? Forty-Two. | TI-Monopoly
Thats a lot of great ideas! For different modes, all I had was different speeds. I'm going to try to include highscores. It started out as a game I made in TI-BASIC, but I though it would be better in C (as in the basic one was letters on the homescreen).
I ran into a problem while coding. Whenever I test the keys, it exits the program. I'm not sure what I'm doing this time, but I know its something stupid that's right in front of my face, as it always is when I program. Can anyone see anything that would make the program do that?
Code:
Code:
/* Keep these headers */
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>
/* Standard headers - it's recommended to leave them included */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <lib/ce/graphx.h>
#include <lib/ce/keypadc.h>
int a, b=40, Y, X, i, key, death=0;
int x_pos[3]={40,160,280};
int y_pos[3]={40,120,200};
void check_key(void);
void main(){
pgrm_CleanUp();
gfx_Begin(gfx_8bpp);
gfx_FillScreen(256);
gfx_SetColor(143);
for(Y=0;Y<3;Y++){
a=40;
for(X=0;X<3;X++){
gfx_FillCircle(a,b,25);
a=a+120;
}
b=b+80;
}
//start main game loop
while(death==0){
a=randInt(0,2);
b=randInt(0,2);
X=x_pos[a];
Y=y_pos[b];
gfx_SetColor(0xE0);
gfx_FillCircle(X,Y,25);
for(i=0;i<=1000;i++){
key=kb_AnyKey();
if (i==1000 || key==kb_Clear){
death=1;
break;
}
if (key & kb_1) {
if(X==40 & Y==200){break;} else {death=1;}}
if (key & kb_2) {
if(X==160 & Y==200){break;} else {death=1;}}
if (key & kb_3) {
if(X==280 & Y==200){break;} else {death=1;}}
if (key & kb_4) {
if(X==40 & Y==120){break;} else {death=1;}}
if (key & kb_5) {
if(X==160 & Y==120){break;} else {death=1;}}
if (key & kb_6) {
if(X==280 & Y==120){break;} else {death=1;}}
if (key & kb_7) {
if(X==40 & Y==40){break;} else {death=1;}}
if (key & kb_8) {
if(X==160 & Y==40){break;} else {death=1;}}
if (key & kb_7) {
if(X==280 & Y==40){break;} else {death=1;}}
}
gfx_SetColor(143);
gfx_FillCircle(X,Y,25);
}
gfx_End();
pgrm_CleanUp();
}
You are using a break; within an if statement. Please don't Also, you aren't using key scanning techniques correctly. You may want to check out the header file and example programs again Also, some of your & should really be logical &&.
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
» Go to Registration page
Page 1 of 1
» All times are UTC - 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
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