Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Spenceboy98 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:
(http://img.removedfromgame.com/imgs/KarRace.gif)
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.
-
woo, looking good so far! :thumbsup:
-
Looks nice. Does it increase in speed as you progress, getting harder?
-
Looks nice. Does it increase in speed as you progress, getting harder?
Not currently, but I can do that. :)
-
*BUMP*
Here is one with a speed up and a menu:
(http://img.removedfromgame.com/imgs/0-KarRace.gif)
(It's actually faster on calc)
Do you think it's too fast? My friend suggested the speed up to be as a bonus. What do you think?
Also, how do you make it display a variable on the screen? I tried earlier, but it did not work.
-
What do you mean by showing a variable ? Like display a score on the buffer ? Look at the fix command, it will help you.
-
Like display a score on the buffer ?
Yes. I don't know how the FIX command will help.
-
Also, how do you make it display a variable on the screen? I tried earlier, but it did not work.
If you try to display a number, don't forget the ">Dec". If you do "Text(0,,A)" it will display the string pointed by A, not the number that is in A, which is displayed by "Text(0,,A>Dec)".
Yes. I don't know how the FIX command will help.
The Fix command will help if you need for example the Text routine to write on the buufer instead of writing directly on the screen.
-
Also, how do you make it display a variable on the screen? I tried earlier, but it did not work.
If you try to display a number, don't forget the ">Dec". If you do "Text(0,,A)" it will display the string pointed by A, not the number that is in A, which is displayed by "Text(0,,A>Dec)".
Yes. I don't know how the FIX command will help.
The Fix command will help if you need for example the Text routine to write on the buufer instead of writing directly on the screen.
Thanks
-
You should make it so when it starts, the first car can't appear in the middle areas, so you don't constantly die instantly at the very start of the game.
-
You should make it so when it starts, the first car can't appear in the middle areas, so you don't constantly die instantly at the very start of the game.
^This. Also, you should not only display other cars when they are entirely on the screen but as soon as they are partly on screen.
(Also, concerning my previous post, notice that >Dec is in Math)
-
It looks suspiciously like the "Car Racing" game included in most Pop Stations. Good start though, maybe you should actually add a racing aspect to the game.
-
You should make it so when it starts, the first car can't appear in the middle areas, so you don't constantly die instantly at the very start of the game.
Yeah. I do need to do that.
It looks suspiciously like the "Car Racing" game included in most Pop Stations. Good start though, maybe you should actually add a racing aspect to the game.
Well, in the game, you're passing the cars that are going slower than you. At the end, there will be a finish line.
You should make it so when it starts, the first car can't appear in the middle areas, so you don't constantly die instantly at the very start of the game.
^This. Also, you should not only display other cars when they are entirely on the screen but as soon as they are partly on screen.
(Also, concerning my previous post, notice that >Dec is in Math)
I tried, but it was just resetting their positions over and over. It twas annoying, so I just went with what I'm doing now.
-
May I suggest adding some animated elements to the wheels? This can really add a lot of depth into the motion of the game.
-
May I suggest adding some animated elements to the wheels? This can really add a lot of depth into the motion of the game.
I don't know how to do animated sprites. :P
-
I tried, but it was just resetting their positions over and over. It twas annoying, so I just went with what I'm doing now.
Sounds like you don't properly understand that Axe works with unsigned integers. With this system negative numbers are really very large unsigned numbers. So if you are using a > instead of a >> then it will trigger if you have a number greater than OR a negative number. Usefull in some cases but backfires here.
-
Here is a fixed one:
(http://img.removedfromgame.com/imgs/1-KarRace.gif)
-
Looking nice!
Just curious, are you using FULL?
-
Those black lines at the edge of the screen... they are there to create the illusion that you are moving, right? The other cars are moving too, right? But they are slower than you are moving... If they are moving... and the black lines are stationary... you should probably make the black lines move downwards much faster than the other cars.
-
Those black lines at the edge of the screen... they are there to create the illusion that you are moving, right? The other cars are moving too, right? But they are slower than you are moving... If they are moving... and the black lines are stationary... you should probably make the black lines move downwards much faster than the other cars.
I can try.
Looking nice!
Just curious, are you using FULL?
No. I am not. I'm not even sure what FULL does(TIME FOR RESEARCH).
Edit: Yeah. I'm not(now I know what it does :P).
-
FULL sets the calculator into 16MHZ mode, higher clocking==more speed :D
EDIT: but the 83+ doesn't support that.
-
Lookin' great Spenceboy98!
I agree with Roboman on the lines to create the illusion of speed -- Mak'em move fast! The faster the cars are moving should be directly related to how much faster the lines move with respect to the cars.
Keep up the awesome work!
-
Here it is with FULL:
(http://img.removedfromgame.com/imgs/2-KarRace.gif)
I still haven't fixed the black line things.
Also, can someone explain how to do animated sprites?
-
Well, not so much of a speed increase, i would just stick to without full if i was you ;)
-
Is this a more reasonable speed for the black lines?
(http://img.removedfromgame.com/imgs/3-KarRace.gif)
Also, again, can someone explain how to do animated sprites?
-
Is this a more reasonable speed for the black lines?
I'd shoot for about 10 to 20 times faster as a starting point.
I'm not an Axe programmer... so I can't comment on sprite animation. :(
-
I've never used animated sprites, but it should be fairly simple.
[FE134RANDOMSPRITEINFO]->Pic1
[next animation2]
[next animation3]
[animation4]
Through the loop, have a counter go up by 1 - say variable I.
Instead of Pt-On(X,Y,Pic1)
do
Pt-On(X,Y,I^4+Pic1)
Something like that.
-
Is this a more reasonable speed for the black lines?
I'd shoot for about 10 to 20 times faster as a starting point.
I'm not an Axe programmer... so I can't comment on sprite animation. :(
I hope this is good enough.
(http://img.removedfromgame.com/imgs/5-KarRace.gif)
I've never used animated sprites, but it should be fairly simple.
[FE134RANDOMSPRITEINFO]->Pic1
[next animation2]
[next animation3]
[animation4]
Through the loop, have a counter go up by 1 - say variable I.
Instead of Pt-On(X,Y,Pic1)
do
Pt-On(X,Y,I^4+Pic1)
Something like that.
I'll try.
-
Looks better now :)
Although they kinda fuse together on the speed up :P
-
Now your talkin'. Looks GREAT! :)
Have you thought about starting at a speed of 0 and increasing up to say... 250mph? As you speed up the lines move faster and faster.
-
Now your talkin'. Looks GREAT! :)
Have you thought about starting at a speed of 0 and increasing up to say... 250mph? As you speed up the lines move faster and faster.
I can't really make it go at a certain mph. I just do it by pixels. Right now it is going every 5px. The opponent cars are going 1px.
-
I've never used animated sprites, but it should be fairly simple.
[FE134RANDOMSPRITEINFO]->Pic1
[next animation2]
[next animation3]
[animation4]
Through the loop, have a counter go up by 1 - say variable I.
Instead of Pt-On(X,Y,Pic1)
do
Pt-On(X,Y,I^4+Pic1)
Something like that.
Yeah, something like that but not really :P
First of all, his sprites are not 8x8 so he surely doesn't use only one Pt-On. Let's say that he uses a routine called Display.
Then, I^4+Pic1 doesn't display the first sprite, then the second one, etc, but it displays the sprite composed of the 8 first bytes found at I^4+Pic1, so when I=0, it works, but when I=1, it displays the 7 last bytes of the first sprite and the first byte of the second one.
So the real formula is Display(X,Y,I^<number of frames in the animation>*<size in bytes of one sprite>+Pic1)
-
I = 0 -> I^4*8 = 0 (anim 1)
I = 1 -> I^4*8 = 8 (anim 2)
I = 2 -> I^4*8 = 128 (nop won't work)
So the real formula =
0->I
Loop
If I= <number of anim>
0->I
End
Pt-on(X,Y,I*8 (or whatever size) +pic1)
I++
Endloop
-
I agree with Hayleia. Multiply by the # of bytes a frame takes.
In Axe, the "^" is a modulus, the remainder, not a power.
-
oooh ok, sorry, didn't know that xp
in that case, yes hayleia's formula is correct
-
Now your talkin'. Looks GREAT! :)
Have you thought about starting at a speed of 0 and increasing up to say... 250mph? As you speed up the lines move faster and faster.
I can't really make it go at a certain mph. I just do it by pixels. Right now it is going every 5px. The opponent cars are going 1px.
Well, you don't have to do MPH directly to change where the black lines are... you could say... add MPH/5 to the position of the lines?
-
*UPDATE*
Animated Wheels:
(http://img.removedfromgame.com/imgs/6-KarRace.gif)
-
wow, amazing :) nice work! it looks great
-
woo, the wheels are looking cool :D
-
woo, the wheels are looking cool :D
Thanks!
wow, amazing :) nice work! it looks great
Thanks to you too. :P
-
Looks awesome! (There is an artifact at the top of the screen when a sprite is clipped at the bottom of the screen?)
-
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...
-
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.
-
Lookin' sweet Spenceboy98!!
-
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!
-
*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.
(http://img.removedfromgame.com/imgs/9-KarRace.gif)
It seems slower now. Do you think I should use Full?
Also, before I uploaded this pic, this is what RFG looked like:
(http://img.removedfromgame.com/imgs/RFG6.png)
-
Oh that looks nice with the road lines! :D I also like how you got the wheels animation. :)
(http://img.removedfromgame.com/imgs/RFG6.png)
Rapture from The Game? O.O
-
Oh that looks nice with the road lines! :D I also like how you got the wheels animation. :)
(http://img.removedfromgame.com/imgs/RFG6.png)
Rapture from The Game? O.O
Thank you! Maybe it was rapture. :P
-
*UPDATE*
Not a very large update, but it is one. I had to start from an older version(got deleted from my calc a while back), but I got it back to it's latest state(I had to redo the animation frames and other stuff). Plus, it shows your score back to you when you crash.
(http://img.removedfromgame.com/imgs/10-KarRace.gif)
Also, do you think it seems too slow at first? Should I make it faster? Use Full?
-
Use Full?
No, that would break compatibility with 83+BE for nothing. Also, it seems like you can have it fast without using Full seeing the part after "speed up", so really, there would be no point using Full :)
-
I think the speed is quite fine. Nice looking little program you have there. :)
-
I like the turning wheels :D
-
You should add some cars that goes the wrong way every now and then as the race progresses. :P
-
You should add some cars that goes the wrong way every now and then as the race progresses. :P
Yeah. I should make it more difficult as it goes too. :P Maybe I should have a car that looks like it's rotating(like it's swerving). That would probably be too much work to do all those animation frames. If I did do this, do you think that I should keep the regular car that goes by like you're passing it? I probably would need to, so it is not the same thing over and over.
I might slow down the speed up so that maybe I could do multiple speed ups. I'll see what I can do about that.
-
...I might slow down the speed up...
:P
I think an interesting idea might be to turn it into more of a racing game, Lotus Turbo Challenge-style. Holding 2nd will accelerate the car (releasing it will slow the car down) and you have to make it to a checkpoint within a certain amount of time, that sorta thing. Adding multiple cars would be cool, too. It looks really pretty, the car sprites are exceptionally well done (did you draw them yourself? Seriously, they're gorgeous!) it just feels like a slow avalanche game right now. You could even have power-ups that would let you shoot a car that's in front of you or temporarily upgrade your bumper to absorb shocks from bumping into other cars, that sorta stuff. You could maybe even have the other cars turn slightly while they come down. Anyway, the animation and everything looks great, you've done a great job so far!
EDIT: Oh, and i second not breaking 83+ compatibility!
-
I had an idea similar to this, but I'll let you tackle this one as it seems you have nailed this on. My idea was loosely based off of the handheld sega mcdonald toy, "Sonic Speedway". http://sonic.wikia.com/wiki/Sonic_Speedway Which is similar to you game in a sense. This game was based off the game "Sonic Drift" which I was also thinking of porting. Maybe consider this while planning your game? http://sonic.wikia.com/wiki/Sonic_Drift Overall it's looking good!
-
...I might slow down the speed up...
:P
I think an interesting idea might be to turn it into more of a racing game, Lotus Turbo Challenge-style. Holding 2nd will accelerate the car (releasing it will slow the car down) and you have to make it to a checkpoint within a certain amount of time, that sorta thing. Adding multiple cars would be cool, too. It looks really pretty, the car sprites are exceptionally well done (did you draw them yourself? Seriously, they're gorgeous!) it just feels like a slow avalanche game right now. You could even have power-ups that would let you shoot a car that's in front of you or temporarily upgrade your bumper to absorb shocks from bumping into other cars, that sorta stuff. You could maybe even have the other cars turn slightly while they come down. Anyway, the animation and everything looks great, you've done a great job so far!
EDIT: Oh, and i second not breaking 83+ compatibility!
Hm... good ideas. I might actually make this into a racing game(it's called KarRace, so...). It probably won't take me much to take out the speed up and add acceleration. I would make more sprites, but I don't want to make the size of the game too big :P(and yes, I created the sprites myself, thanks :)). I was thinking about doing powerups at the beginning, but I have it so that if there is an "on" pixel in front of the car, it is a crash, so I am not sure how I would implement it.
Does anyone else think I should do acceleration instead of speed up after a certain amount of time?
I had an idea similar to this, but I'll let you tackle this one as it seems you have nailed this on. My idea was loosely based off of the handheld sega mcdonald toy, "Sonic Speedway". http://sonic.wikia.com/wiki/Sonic_Speedway Which is similar to you game in a sense. This game was based off the game "Sonic Drift" which I was also thinking of porting. Maybe consider this while planning your game? http://sonic.wikia.com/wiki/Sonic_Drift Overall it's looking good!
I might check this out another time. Thanks!
-
Actually allowing accelerating/braking like in Lotus would also make it less like just another Tunnel type game (although it's not a tunnel but it isn't really a proper racing game yet). You could have checkpoints too.
-
*UPDATE*
Now the game starts with the speed equaling 0. You press [2ND] for power(thinking about doing [ALPHA] for brakes and [^](UP) for temporary boost). Now the other player(s) keeps going if you stop(note: there is no real track, so opponent just loops around screen).
(http://img.removedfromgame.com/imgs/11-KarRace.gif)
Things to do(in no particular order):
1. Fix wheels so the stop when vehicles stop :P .
2. Figure out how to do a track with multiple checkpoints.
3. Checkpoints(in #2, but saying it anyways).
4. Timer to time player(won't be too hard unless you guys want actual seconds which I don't know how to do).
5. Finish title screen(put the title in the title screen, polish it, etc).
Any other things I missed? Any suggestions?
Edit:
I also made it so that when you put power it goes up slowly, but you can't really tell because it's so fast. Any ideas on how to make it any slower and noticeable?
-
How are you handling the speed ? Is it a variable you continuously add to your position ?
If so, divide this variable's value by 2 when adding it. It'll make the acceleration smoother. Also, don't forget to multiply the speed limit by 2 too.
-
You might need to use larger variables/values. I'm not sure how you advance the screen, but you could do something like an acceleration of 8 advances 1 pixel a frame, an acceleration of 1 will advance 1 pixel every 8 frames, and an acceleration of 64 (!) would advance 8 pixels a frame. You could also use a higher value, though a power of 2 would be most convenient. That way you can just shift it over and get how many pixels you need to advance. Maybe every ten frames you could raise the acceleration by 1, assuming you're holding [2nd] that way it'll gradually get faster. So you could have two variables, acceleration and a scrolling variable. The acceleration gets added to the scrolling variable, and if it's greater than (say) 8, scroll the screen. If it's a multiple of two, you can just bit shift it over and you'll have how many pixels to scroll.