Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Munchor on November 07, 2010, 02:57:32 pm

Title: [PROJECT] Racer3D: Replay
Post by: Munchor on November 07, 2010, 02:57:32 pm
Since Omnimaga is a game-based community I decided to try my first on gaming, so editing games to make them better is the best idea, so this thread is to discuss Racer3D: Replay.

Okay, so probably everybody knows the example that came with Axe 0.4.5, Racer3D, a great game, lemme show it to you:

(http://www.omnimaga.org/index.php?action=dlattach;topic=5203.0;attach=4311;image)


So, I'm working on my own version at the moment, it will use the default game as a base but add MANY more functionalities, but I'm having trouble with the Title Screen as some of you probably already know:

(http://www.omnimaga.org/index.php?action=dlattach;topic=5203.0;attach=4312;image)

Now, I mad the Title Screen Work, but I have a problem with the game, so here are BOTH of the codes:


ORIGINAL CODE:
Code: [Select]
.RACER3D
[3C7E427EFF99FF42]->PIC1
"SCORE:"->STR1
"GAME OVER"->STR2
»Sci
Return!If Full
Fix 5
128->B
40->L
For(A,0,40)
rand^3-1+B->B->{L1+A}
End
ClrDraw
For(A,0,95)
Line(A,rand^4+21,A,24)
End
StorePic
3->Y->R
[neg]100->X
0->T

Repeat getKey(15)
.MOVE
If getKey(2)
X+2->X
Horizontal +
Line(0,24,0,rand^4+21)
StorePic
End
If getKey(3)
X-2->X
Horizontal -
Line(95,24,95,rand^4+21)
StorePic
End

.SCORE
!If T+1->T^32
L-1->L
End
Text(0,0,STR1)
Text(22,0,T->DEC)

.SHIFT
conj(L1+39,L1+40,40)[radians]
If {L1}<5
{L1}+5->{L1}
End
If {L1}>250
{L1}-5->{L1}
End
rand^3-1+Y+{L1}->{L1}
DS<(R,14)
rand^5-2->Y
End

.DRAW
If Z=0->Z
For(A,0,39)
A+24->B
A/2+{[root]^2A*10*4)+L1}+X->C
If C-A->E>1000
0->E
End
If C+L->F>1000
0->F
End
For(D,E,96)+1,F,96))
Pxl-On(D-1,B)
End
End
Pt-Change(42,55,PIC1)
DispGraph

.DEATH
If E>42 or (F<50)
For(A,1,7)
Pt-Change(42,55,PIC1)
DispGraph
Pause 1500
End
Fix 4
Text(32,13,STR2)
Repeat getKey(0)
End
ClrHome
Return
End

RecallPic
End:End
Label Q
Fix 4

MY CODE:
Code: [Select]
.RACER3D
[00007E4242FFFF42]->PIC1
"SCORE:"->STR1
"GAME OVER"->STR2
"DAVID GOMES"->STR3
Label 1
ClrDraw
ClrHome
Text(0,0,"RACER 3D
Text(0,10,"1:PLAY
Text(0,20,"2:ABOUT
Text(0,30,"3:HELP
Text(0,40,"4:QUIT
Repeat getKey->Z
End
If Z=26
ClrHome
Disp "DAVID
Repeat getKey
End
Goto 1
End
If Z=18
ClrHome
ClrDraw
Repeat getKey->Z
End
Goto 1
End
If Z=35
ClrHome
Disp "STOP...
Repeat getKey
End
Goto 1
End
If Z=34
Return!If Full
Fix 5
128->B
40->L
For(A,0,40)
rand^3-3-1+B->B->{L1+A}
End
For(A,0,95)
Line(A,rand^4+21,A,24)
End
StorePic
3->Y->R
[neg]100->X
0->T

Repeat getKey(15)
.MOVE
If getKey(2)
X+2->X
Horizontal +
Line(0,24,0,rand^4+21)
StorePic
End
If getKey(3)
X-2->X
Horizontal -
Line(95,24,95,rand^4+21)
StorePic
End

.SCORE
!If T+1->T^32
L-1->L
End
Text(0,0,STR1)
Text(22,0,T->DEC)

.SHIFT
conj(L1+39,L1+40,40)[radians]
If {L1}<5
{L1}+5->{L1}
End
If {L1}>250
{L1}-5->{L1}
End
rand^3-1+Y+{L1}->{L1}
DS<(R,14)
rand^5-2->Y
End

.DRAW
If Z=0->Z
For(A,0,39)
A+24->B
A/2+{[root]^2A*10*4)+L1}+X->C
If C-A->E>1000
0->E
End
If C+L->F>1000
0->F
End
For(D,E,96)+1,F,96))
Pxl-On(D-1,B)
End
End
Pt-Change(42,55,PIC1)
DispGraph

.DEATH
If E>42 or (F<50)
For(A,1,7)
Pt-Change(42,55,PIC1)
DispGraph
Pause 250
End
Fix 4
ClrHome
Text(0,0,STR2
Text(0,20,STR1
Text(0,30,T->DEC
Text(50,55,STR3
Pause 9999
Pause 9999
Repeat getKey(0)
End
ClrHome
Return
End

RecallPic
End:End
Label Q
Fix 4
End


I would like to know who made the original Racer3D, was it Quigibo? I HAVE to post that person in the credits, since they did the original game and I'm using it as a base, even though changing most of the things.

by Scout David

P.S: I've made most of the things in separate files (extra sprites and options to change the speed of the car, but won't post them here for security of the code)
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 07, 2010, 03:55:19 pm
Hmm interesting, it would be nice to see a new version of this game with more features. I hope you can get the code fixed or someone to help. Btw it was made by Quigibo.
Title: Re: [PROJECT] Racer3D: Replay
Post by: MRide on November 07, 2010, 03:59:54 pm
I was actually considering doing something like this for my first try in Axe programming.
It'll be interesting to see what you do with it.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 08, 2010, 07:44:17 am
I was actually considering doing something like this for my first try in Axe programming.
It'll be interesting to see what you do with it.

The bug has been fixed
Quigibo was added to the team

A Title Screen was also added, working. The About and Help: Working.


To add:
*Turning Speed (Easy)
*Different Cars (Medium Difficulty)
*Making the user go back to the title screen when the game ends (Medium Difficulty)
*Adding difficulty levels (Hard)
*Adding an inverted mode, where you drive the car outside the track and if you enter the track you lose (ah, this looks promising) (Expert Level)


I can't post the fixed version for now, sorry, but I will later today or tomorrow.

Expectations?
Title: Re: [PROJECT] Racer3D: Replay
Post by: Aichi on November 08, 2010, 08:07:28 am
A Title Screen was also added, working. The About and Help: Working.
Ah nice. I am curious about how it looks like. :)

Also, I comment the things  you want to add. ^^

To add:
*Turning Speed (Easy)
- Yeah, it shouldnt be a problem.

*Different Cars (Medium Difficulty)
- I dont know how Quigibo designed the collision system. Maybe another
car sprite could crash by itself. Anyway yes, medium difficultly.

*Making the user go back to the title screen when the game ends (Medium Difficulty)
- Its very easy. ;)

*Adding difficulty levels (Hard)
- Do you mean you remove the random street system and use particular routes instead of it?
As you think, this would be hard for you.

*Adding an inverted mode, where you drive the car outside the track and if you enter the track you lose (ah, this looks promising) (Expert Level)
- It would be very easy, would it? Its no problem if Quigibo used a pixeltest collision,
cause then you just have to use DrawInv.

Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 08, 2010, 09:08:59 am
Ah nice. I am curious about how it looks like. :)

It looks OKAY, but I saw some title screens here and there and mine is based in Text(, so I'll probably make a picture one, cooler, hein?

To add:
*Turning Speed (Easy)
- Yeah, it shouldnt be a problem.

*Different Cars (Medium Difficulty)
- I dont know how Quigibo designed the collision system. Maybe another
car sprite could crash by itself. Anyway yes, medium difficultly.

*Making the user go back to the title screen when the game ends (Medium Difficulty)
- Its very easy. ;)

*Adding difficulty levels (Hard)
- Do you mean you remove the random street system and use particular routes instead of it?
As you think, this would be hard for you.

*Adding an inverted mode, where you drive the car outside the track and if you enter the track you lose (ah, this looks promising) (Expert Level)
- It would be very easy, would it? Its no problem if Quigibo used a pixeltest collision,
cause then you just have to use DrawInv.

Different cars, NOT RUNNING in the same race hahaha, that would be Expert^3, choosing from more than 1 sprite that I've made (8x8).

Next, the Inverted Mode will go last, but it's not that hard:
- Change the initial position of the car;
- Invert the signals that work for death, so instead of:

Code: [Select]
.DEATH
If E>42 or (F<50)
For(A,1,7)
Pt-Change(42,55,PIC1)
DispGraph
Pause 250
End
Fix 4
ClrHome
Text(0,0,STR2
Text(0,20,STR1
Text(0,30,T->DEC
Text(50,55,STR3
Pause 9999
Pause 9999
Repeat getKey(0)
End
ClrHome
Return
End

The opposite for If
Code: [Select]
E>42 or (F<50).

The difficulty levels I mean the time it takes for the course to get very small (as you probably noticed it gets smaller and smaller).



I have to make the title screen work fine, it doesn't work fine, it sucks:

You have to press the key 1 twice in order to play, you can to About and come back to the title screen, but then you can't play (the same thing with help) and when you press Clear during the game you go back to the title screen, but then you can't play too.

Code for Title Screen:
Code: [Select]
:Lbl 1
:ClrDraw
:ClrHome
:Output(0,0,"RACER 3D: REPLAY
:Text(0,15,"1:PLAY
:Text(0,25,"2:ABOUT
:Text(0,35,"3:HELP
:Text(0,45,"4:QUIT
:2->S
:Text(30,15,"5:TURN SPEED +
:Text(30,25,"6:TURN SPEED -
:Text(30,35,S
:Repeat getKey->Z
:End
:If Z=26
:ClrHome
:Output(0,0,"RACER 3D: REPLAY
:Text(0,15,"GAME BY:
:Text(0,35,"-DAVID
:Text(0,45,"-QUIGIBO
:Repeat getKey
:End
:Goto 1
:End
:If Z=18
:ClrHome
:Disp "HELP
:Repeat getKey
:End
:Goto 1
:End
:If Z=35
:ClrHome
:Goto 2
:End
:Repeat getKey
:End
:If Z=27
:S+1->S
:If Z=19
:S-1->S
:End
:Repeat getKey
:End
:If Z=34
// GAME CODE
:Lbl 2 // This is the last line of code so that the quit button in the title screen quits the program
Title: Re: [PROJECT] Racer3D: Replay
Post by: ASHBAD_ALVIN on November 08, 2010, 05:21:22 pm
:Text(30,35,S should be :Text(30,35,S>Dec  or it will just show tons o' gibberish.  What the >Dec does is displays S as a decimal, not as a string pointed to by the value of S.

just in case that's giving you problems too :P
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 08, 2010, 06:05:26 pm
:Text(30,35,S should be :Text(30,35,S>Dec  or it will just show tons o' gibberish.  What the >Dec does is displays S as a decimal, not as a string pointed to by the value of S.

just in case that's giving you problems too :P

Oh my god, i love you man: THAT SOLVED A LOT!
Title: Re: [PROJECT] Racer3D: Replay
Post by: Ranman on November 08, 2010, 06:19:04 pm
This is lookin' sweet! B)
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 08, 2010, 06:24:12 pm
This is lookin' sweet! B)

Thanks I can't wait to post the next version
Title: Re: [PROJECT] Racer3D: Replay
Post by: willrandship on November 08, 2010, 06:31:14 pm
Hmm, I just had an eyecandy idea: if you make a sun that moves when you turn, it would seem more 3D. Maybe clouds too, but too many could be too much at a time.

Looks nice! I like the inverted track idea!
Title: Re: [PROJECT] Racer3D: Replay
Post by: AngelFish on November 08, 2010, 06:41:11 pm
Another cool thing to do would be to scale the size of the city in the background as you drive. Just add an extra layer of pixels to the top of all of the buildings when the score reaches a certain modulus.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 08, 2010, 07:43:27 pm
Another cool thing to do would be to scale the size of the city in the background as you drive. Just add an extra layer of pixels to the top of all of the buildings when the score reaches a certain modulus.

A loop, every 100 T>Dec add a new layer, that wouldn't be hard, maybe every 300, so it wouldn't get above the screen (an if condition preventing so would also work).

The Title Screen is working and you can now choose the car turning/drifting speed.

However, it can go from 0 to 65636, and in the last one it looks like the inverted mode I was talking about.

An if condition to prevent this could work.

I just CAN'T WAIT to be able to upload progress, you'll like it I'm sure!
Title: Re: [PROJECT] Racer3D: Replay
Post by: gangsterveggies on November 08, 2010, 07:55:05 pm
Cool... I hope you do a good job on that. Where did you got that?
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 08, 2010, 11:11:37 pm
Hey gangsterveggies, welcome to Omnimaga forums. :) The game was gotten from Axe Parser zip file. It's made by Quigibo but he's enhancing it.

By the way, I like the cloud/sun idea. To make it even more 3D, make sure the clouds move twice faster than the other background and the sun 3 times faster
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 09, 2010, 04:41:42 pm
My ti-84 plus keypad crashed, but the BETA version was already finished and I lost it DAMN, so I'll do it again (not very hard maybe post it thursday).

I found a way to make the buildings look closer, but the clouds? I'll do that later, looks quite complicated
Title: Re: [PROJECT] Racer3D: Replay
Post by: gangsterveggies on November 09, 2010, 04:59:18 pm
You have to backup stuff in your pc... oh well... have fun doing it again.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 09, 2010, 05:00:03 pm
You have to backup stuff in your pc... oh well... have fun doing it again.

I did backup it...
...
1 week before

NOW I found out Axe will backup EVERYTHING, but I only found out after having it crashed, ooh!
Title: Re: [PROJECT] Racer3D: Replay
Post by: ASHBAD_ALVIN on November 09, 2010, 05:00:12 pm
well, in axe, you can back it up as an appvar :D

well, sorry to hear of the loss.  Hope you get it worked out :(
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 09, 2010, 05:02:07 pm
well, in axe, you can back it up as an appvar :D

well, sorry to hear of the loss.  Hope you get it worked out :(

Here's how it crashed:

my friend turned on the calculator
press the button GRAPH
Pressed the button Y=

CRASHED RAM DELETED

I saw it, it was just like that -.-
Title: Re: [PROJECT] Racer3D: Replay
Post by: ASHBAD_ALVIN on November 09, 2010, 05:02:45 pm
hmm, that's strange...
Title: Re: [PROJECT] Racer3D: Replay
Post by: gangsterveggies on November 09, 2010, 05:02:56 pm
Was it? Was it really like that? Your friend is conspiring against you! Watch out!
Title: Re: [PROJECT] Racer3D: Replay
Post by: yunhua98 on November 09, 2010, 05:03:38 pm
I blame OS2.53/54MP!  :(
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 09, 2010, 07:09:17 pm
Watch out, there's enough copies of Racer 3D: Replay for all, infinite actually!

Finally released a beta version!



Normal Speed Screenie:

(http://img248.imageshack.us/img248/2763/racer3dbeta1.gif)

Fast Speed Screenie:


(http://img525.imageshack.us/img525/3451/racer3dbeta2.gif)


Stupid Speed Screenie:

(I'm pressing right to go left and left to go right, you can turn the calculator upside down in this speed)
(I know how to remove this speed 65536 bug, but I don't want to, it's fun)

(http://img181.imageshack.us/img181/2002/racer3dbeta3.gif)

Good Player

(http://img.removedfromgame.com/imgs/1289348352-Racer3D.gif)
(by Qwerty.55)

What do you think?


I want to break my actual download record (1) to maybe 5, since this is a game, so hope you guys support me with my first game! :D

Title: Re: [PROJECT] Racer3D: Replay
Post by: AngelFish on November 09, 2010, 07:20:35 pm
 I think you crash a little to early in your screenshots. It doesn't really give a sense of the learning curve.
You might want to try extending the length like this:
(http://img.removedfromgame.com/imgs/1289348352-Racer3D.gif)
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 09, 2010, 07:21:37 pm
In my opinion, I think you crash a little to early in your screenshots. It doesn't really give a sense of the learning curve.
Try something like this:
(http://img.removedfromgame.com/imgs/1289348352-Racer3D.gif)

I lose to show you my game over screen and the fact it goes back to the title screen.

BTW, break my 1874 record ;)

EDIT: Added your screenie to my post :)
Title: Re: [PROJECT] Racer3D: Replay
Post by: AngelFish on November 09, 2010, 07:36:02 pm

I lose to show you my game over screen and the fact it goes back to the title screen.

BTW, break my 1874 record ;)

Oh, okay.

BTW: I only got to 1724. I had fun cheating to get there, though. Good job on the game.

Also, is the path random?
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 09, 2010, 07:37:13 pm

I lose to show you my game over screen and the fact it goes back to the title screen.

BTW, break my 1874 record ;)

Oh, okay.

BTW: I only got to 1724. I had fun cheating to get there, though. Good job on the game.

Also, is the path random?

Thanks, after 1780 it's luck, because when I play serious always get 1750.

The path is random yes and thanks!
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 10, 2010, 12:52:57 am
Nice, my suggestion would be to increase the background speed when you change the turning speed, so it looks more realistic when turning incredibly fast or slow. Also make sure that when pressing arrows it doesn't exit the title screen.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 10, 2010, 12:21:15 pm
Nice, my suggestion would be to increase the background speed when you change the turning speed, so it looks more realistic when turning incredibly fast or slow. Also make sure that when pressing arrows it doesn't exit the title screen.

Yeah, that's very bad, the arrows, because my friends when tried complained about that.

I'm already changing that.

BTW; Can NSpire batteries (the ones that were in the box) be recharged in the computer (USB Cable)?
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 10, 2010, 12:26:35 pm
Hmm I think you absolutely need rechargeable batteries and I don't think the Nspire can recharge them via USB. If I remember, it was possible to use the Nspire in USB mode without using battery power, though.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 10, 2010, 01:04:32 pm
Hmm I think you absolutely need rechargeable batteries and I don't think the Nspire can recharge them via USB. If I remember, it was possible to use the Nspire in USB mode without using battery power, though.

Damn, gonna need new batteries
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 10, 2010, 01:59:30 pm
Sorry to hear. I hope you can get some soon.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 10, 2010, 04:17:13 pm
Sorry to hear. I hope you can get some soon.

Gotcha, fixed the arrows bug, next thing I'll add is option for sprites :)

EDIT: 4 downloads, need one more to hit my limit
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 10, 2010, 11:29:24 pm
Your limit? ???
Title: Re: [PROJECT] Racer3D: Replay
Post by: ztrumpet on November 10, 2010, 11:33:41 pm
Nice. :)
I like putting the Turning Speed to 65535. ;D
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 11, 2010, 12:22:26 am
Lol I tried around 20 I think and it insanely turned fast.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Runer112 on November 11, 2010, 12:27:23 am
Sorry to hear. I hope you can get some soon.

[offtopic] I was scrolling up this thread from the bottom and ran across this post, without seeing what it was referencing... Out of context it sounds interesting ;) [/offtopic]
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 11, 2010, 12:29:31 am
What would it refer to out of context? ;D

is it an english expression/idiom I am unfamiliar with? Or is it more like most of the IRC quotes from #omnimaga? ;D
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 11, 2010, 09:24:30 am
Nice. :)
I like putting the Turning Speed to 65535. ;D

So do I, it's very weird. 65534 works too, when you set speeds above 20, press right or left and you lose.

My doubt: change sprite temporarily

Code: [Select]
.MOVE
If getKey(2)
X+2->X
Horizontal +
Line(0,24,0,rand^4+21)
StorePic
End
If getKey(3)
X-2->X
Horizontal -
Line(95,24,95,rand^4+21)
StorePic
End

This is the MOVE code, strangely using the same as Quigibo's because it works very well!

Ok, I have two sprites:

[3C7E427EFF99FF42]
and
[00007E4242FFFF42]

(this are not the final sprites, this is just a test)

How could I make the second sprite be used only when you press left and right, and the first sprite when you are not pressing any of them.

I've tried many things, always giving me an error :S
Title: Re: [PROJECT] Racer3D: Replay
Post by: meishe91 on November 11, 2010, 01:32:53 pm
You could try doing something where when you press left or right it stores a certain value to an offset variable, and when nothing is pressed zero is stored to it. Then just set that offset value to offset the sprite data so you're showing the correct one. Does that make sense?
Title: Re: [PROJECT] Racer3D: Replay
Post by: Builderboy on November 11, 2010, 01:52:48 pm
What would it refer to out of context? ;D

is it an english expression/idiom I am unfamiliar with? Or is it more like most of the IRC quotes from #omnimaga? ;D

http://www.urbandictionary.com/define.php?term=get%20some

;D
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 11, 2010, 01:53:43 pm
What would it refer to out of context? ;D

is it an english expression/idiom I am unfamiliar with? Or is it more like most of the IRC quotes from #omnimaga? ;D

http://www.urbandictionary.com/define.php?term=get%20some

;D

-.- let's just forget that hah
Title: Re: [PROJECT] Racer3D: Replay
Post by: aeTIos on November 11, 2010, 02:14:36 pm


So do I, it's very weird. 65534 works too, when you set speeds above 20, press right or left and you lose.

My doubt: change sprite temporarily

This is the MOVE code, strangely using the same as Quigibo's because it works very well!

Ok, I have two sprites:

[3C7E427EFF99FF42]
and
[00007E4242FFFF42]

(this are not the final sprites, this is just a test)

How could I make the second sprite be used only when you press left and right, and the first sprite when you are not pressing any of them.

I've tried many things, always giving me an error :S


Use something like
Code: [Select]
[3C7E427EFF99FF42]=>Pic1NT    (NT: Not-Turn)
[00007E4242FFFF42]=>Pic1T      (T: Turn)

If getKey(2)+(getKey(3))
Pt-On(Xpos,Ypos,Pic1T)
Else
Pt-On(Xpos,Ypos,Pic1NT
End

that would work, just add a DispGraph , else you wont see anything ;D

(PS: NP)
Title: Re: [PROJECT] Racer3D: Replay
Post by: meishe91 on November 11, 2010, 02:49:40 pm


So do I, it's very weird. 65534 works too, when you set speeds above 20, press right or left and you lose.

My doubt: change sprite temporarily

This is the MOVE code, strangely using the same as Quigibo's because it works very well!

Ok, I have two sprites:

[3C7E427EFF99FF42]
and
[00007E4242FFFF42]

(this are not the final sprites, this is just a test)

How could I make the second sprite be used only when you press left and right, and the first sprite when you are not pressing any of them.

I've tried many things, always giving me an error :S


Use something like
Code: [Select]
[3C7E427EFF99FF42]=>Pic1NT    (NT: Not-Turn)
[00007E4242FFFF42]=>Pic1T      (T: Turn)

If getKey(2)+(getKey(3))
Pt-On(Xpos,Ypos,Pic1T)
Else
Pt-On(Xpos,Ypos,Pic1NT
End

that would work, just add a DispGraph , else you wont see anything ;D

(PS: NP)


Going off that method and my method combined you could do:

Code: [Select]
[00007E4242FFFF423C7E427EFF99FF42]→Pic1
Pt-On(X,Y,Pic1+A
If getKey(2)+(getKey(3))
8→A
Else
0→A
End

Or what ever that equivalent for the Pic1+8 part is (I don't know if you need curly brackets or anything or if that's the correct number or not). Might save some space in the end or something. Just a thought.
Title: Re: [PROJECT] Racer3D: Replay
Post by: JustCause on November 11, 2010, 03:44:08 pm
My suggestion: increase the starting difficulty and slow the difficulty gain. 0-1200 is a joke...it's boring to play through

Love the project!
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 11, 2010, 03:45:21 pm
My suggestion: increase the starting difficulty and slow the difficulty gain. 0-1200 is a joke...it's boring to play through

I totally agree, and so my friends ;)
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 11, 2010, 08:28:42 pm
I personally found the difficulty to be fine, although it might be good to maybe increase it anyway. Keep up the good work!
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 11, 2010, 09:04:15 pm
I personally found the difficulty to be fine, although it might be good to maybe increase it anyway. Keep up the good work!

I'm not sure if I'll ever manage to do that: Quigibo told me that to so I would have to draw the game in rectangles instead of lines, so basically I'm going to have to do all again, but I have no idea of how to draw rectangles. Not even lines ;P
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 12, 2010, 03:13:10 am
Aw right. Mhmm... if people look at the code, maybe they might be able to help you. I kinda forgot if Line( was the same as in BASIC.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 12, 2010, 10:03:34 am
Aw right. Mhmm... if people look at the code, maybe they might be able to help you. I kinda forgot if Line( was the same as in BASIC.

Ok, I decided to make the source public (anyways, you can always get the code, so...)

Code: [Select]
.RACER3D
[3C7E427EFF99FF42]->PIC1
"SCORE:"->STR1
"GAME OVER"->STR2
"DAVID G."->STR3
2->S
Label 1
ClrDraw
ClrHome
Pause 500
Output(0,0,"RACER 3D: REPLAY
Text(0,15,"1:PLAY
Text(0,25,"2:ABOUT
Text(0,35,"3:HELP
Text(0,45,"4:QUIT
Text(40,15,"5:TURN SPEED +
Text(40,25,"6:TURN SPEED -
Text(40,35,S->DEC
Repeat getKey->Z
End
If Z=1
Goto 1
End
If Z=2
Goto 1
End
If Z=3
Goto 1
End
If Z=4
Goto 1
End
If Z=26
ClrHome
Output(0,0,"RACER 3D: REPLAY
Text(0,15,"GAME BY:
Text(0,30,"-QUIGIBO
Text(0,40,"-DAVID G.
Pause 15000
Goto 1
End
If Z=18
ClrHome
Output(0,0,"RACER 3D: REPLAY
Text(0,15,"HELP: TO DO
Pause 15000
Goto 1
End
If Z=35
Goto 2
End
If Z=27
1+S->S
Goto 1
End
If Z=19
S-1->S
Goto 1
End
If Z=34
Return!If Full
Fix 5
128->B
40->L
For(A,0,40)
PIC1->O
rand^3-1+B->B->{L1+A}
End
For(A,0,95)
Line(A,rand^4+21,A,24)
End
StorePic
3->Y->R
[neg]100->X
0->T

Repeat getKey->M
End
If M=23
Goto 1
End

Repeat getKey(15)
.MOVE
If getKey(2)
X+S->X
Horizontal +
Line(0,24,0,rand^4+21)
StorePic
End
If getKey(3)
X-S->X
Horizontal -
Line(95,24,95,rand^4+21)
StorePic
End

.SCORE
!If T+1->T^32
L-1->L
End
Text(0,0,STR1)
Text(22,0,T->DEC)

.SHIFT
conj(L1+39,L1+40,40)[radians]
If {L1}<5
{L1}+5->{L1}
End
If {L1}>250
{L1}-5->{L1}
End
rand^3-1+Y+{L1}->{L1}
DS<(R,14)
rand^5-2->Y
End

.DRAW
If Z=0->Z
For(A,0,39)
A+24->B
A/2+{[root]^2A*10*4)+L1}+X->C
If C-A->E>1000
0->E
End
If C+L->F>1000
0->F
End
For(D,E,96)+1,F,96))
Pxl-On(D-1,B)
End
End
Pt-Change(42,55,PIC1
DispGraph

.DEATH
If E>42 or (F<50)
For(A,1,7)
Pt-Change(42,55,PIC1)
DispGraph
Pause 250
End
Fix 4
ClrHome
Text(0,0,STR2
Text(0,20,STR1
Text(0,30,T->DEC
Text(50,55,STR3
Text(50,45,"QUIGIBO
Pause 9999


Goto 1
End

RecallPic
End:End
Label Q
Fix 4
End

Label 2
(full of bad habits this code, I like it, though)

Not Label, Lbl, and -> for STOs, a few changes should be made.

I need to change the Line( to Rect(, I don't think that's that hard, I will succeed, any help would be welcomed.

Quigibo advised me to make Rectangles 1*1, so I need to find out more about Rect(.

Thanks
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 13, 2010, 12:47:32 am
1*1? O.o
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 13, 2010, 07:56:43 am
1*1? O.o

Rectangles, 1px by 1px :s
Title: Re: [PROJECT] Racer3D: Replay
Post by: aeTIos on November 13, 2010, 08:25:07 am
um, you can do that by Pxl-On(Xpos,Ypos) ;D, you dont have to use Rect( 
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 13, 2010, 09:09:42 am
um, you can do that by Pxl-On(Xpos,Ypos) ;D, you dont have to use Rect( 

but to make the road shorten faster, i HAVE to draw rectangles, according to what Quigibo told me (and he created Axe :s)
Title: Re: [PROJECT] Racer3D: Replay
Post by: aeTIos on November 13, 2010, 09:23:29 am
I used for the road width:

21->r6
0->r5
repeat getkey(15)
r5+1->r5
if r5=100
r6-1->r6
0->r5
end
(...)
rand^4+r6->L
line(0,24,0,L)

-----

I think that's enough...
else, take a look at the code of tunnel3d




EDIT: 100th PosT! (>^_^)====  (PEEEEP)
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 13, 2010, 09:43:08 am
I used for the road width:
Code: [Select]
21->r6
0->r5
repeat getkey(15)
r5+1->r5
if r5=100
r6-1->r6
0->r5
end
(...)
rand^4+r6->L
line(0,24,0,L)
-----

I think that's enough...
else, take a look at the code of tunnel3d




EDIT: 100th PosT! (>^_^)====  (PEEEEP)

You changed it a little from the original, I'll try that :)
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 14, 2010, 03:03:04 am
1*1? O.o

Rectangles, 1px by 1px :s
But why would you use rectangles this small instead of just using a rectangle that is the width of the track and 1 pixel height? You might as well use Pxl-On otherwise.

Anyway, I just tried modifying the code to use Rect() instead of Line(), although I did not get the buildings to show up properly, and there's no speed increase it seems, so it might be best that you stick with Line().
Title: Re: [PROJECT] Racer3D: Replay
Post by: Quigibo on November 14, 2010, 04:37:27 am
DJ is right, the rectangles should have height 1 and the width of the road, that's what I said in my PM.  I got about a 3x speed increase when I tried it though.
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 14, 2010, 04:43:41 am
Could you post the code you had? I modified it from the copy at http://ourl.ca/7800/138865 .

Maybe the lack of a speed increase was due to the error I got with buildings. They were incredibly high, so they must have taken much more time to render. I tried Rect(0,rand^4-3,0,24) instead of Line(0,24,0,rand^4+21) but that was obviously not the right formula adaptation it seems...

The road looked fine, though.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 14, 2010, 03:30:06 pm
I tried a road with the Rect( command but it was truly weird, really, something crazy and tremendously hard to drive, I need a better adaptation.

It was like the road splited into several parts xD
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 15, 2010, 12:13:03 am
/me thinks Quigibo should post how he did it...
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 15, 2010, 07:43:28 am
/me thinks Quigibo should post how he did it...

ScoutDavid is of the same opinion =P Let's wait, I'm sure he will ;)
Title: Re: [PROJECT] Racer3D: Replay
Post by: Builderboy on November 15, 2010, 02:09:56 pm
If i am understanding correctly, all he did was replace

Line(X1,Y,X2,Y

with

Rect(X1,Y,X2-X1,1
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 16, 2010, 01:38:32 pm
If i am understanding correctly, all he did was replace

Line(X1,Y,X2,Y

with

Rect(X1,Y,X2-X1,1

Will try it right away, thanks.
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 16, 2010, 04:13:26 pm
If i am understanding correctly, all he did was replace

Line(X1,Y,X2,Y

with

Rect(X1,Y,X2-X1,1
Ah ok. My code was different because I was using the latest 8xp download, which was a while ago. Hopefully it can run faster. I wonder if in my case it was slower only because there was a rand instruction inside the Line() command?
Title: Re: [PROJECT] Racer3D: Replay
Post by: ASHBAD_ALVIN on November 16, 2010, 04:14:38 pm
Nice to see some progress on this.  How long until a BETA?
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 17, 2010, 12:53:56 pm
Nice to see some progress on this.  How long until a BETA?

I have no idea, I have got the sprite choice working, the rectangular road is still not fine, which is what I've been trying to do, but I'll make it, I'm sure!

I have 2 other projects on hold now, so I'm going slow.

w000t? 666 posts Alvin? Hahah
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 20, 2010, 06:14:35 am
New Version Release

New Features:
*Choose Car from 3 different sprites
*"Pause 9999" bad habit removed
*Fixed Bugs in the interface
*New Game Over Screen
*Help Page created

Download:

*Attached, use Asm(prgmRACER3D to open it or a shell ;)

Screenies:

(http://www.omnimaga.org/index.php?action=dlattach;topic=5203.0;attach=4562;image)
(http://www.omnimaga.org/index.php?action=dlattach;topic=5203.0;attach=4563;image)
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 20, 2010, 09:57:26 am
Nice to see updates! ALso it looks nice so far. :) However the background sometimes scrolls in the wrong direction. ???
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 20, 2010, 11:04:35 am
Nice to see updates! ALso it looks nice so far. :) However the background sometimes scrolls in the wrong direction. ???

It's the 65536 speed bug ;)

Hahahah, I just made a NEW VERSION, 2 in the same day, the second one is MUCH BETTER, don't download this one, wait 'til the other.

Will come today, yet!
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 20, 2010, 01:09:55 pm
Stable Version: Racer 3D:Replay

*Choose from 6 different sprites, including one that looks like first-person driving:
*Help and About improved
*Title Screen Interface improved
*Game itself suffered a 30bytes optimization. However, the program is larger because of images

Personally, I'm very proud of it and I think it looks great and since the original game by Quigibo a lot has been made and improved, so I really need some feedback.

This is a stable version, ready to play during classes!

I need to make the following:
*Adding layers to background as time goes by
*Highscore System
*A turbo system that makes the car go really fast when you press the forward key
Title: Re: [PROJECT] Racer3D: Replay
Post by: yunhua98 on November 20, 2010, 01:13:22 pm
nice!  I really like the turbo and first person!
great job.  ;)
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 20, 2010, 01:15:17 pm
nice!  I really like the turbo and first person!
great job.  ;)

The first person could be a Mode, that works for all cars, so if you press the key 'Mode' it goes for first person sprite.

Like that idea?

It would be easy to implement, only need to learn how to change the content of a variable in Axe, since it is quite confusing :s
Title: Re: [PROJECT] Racer3D: Replay
Post by: yunhua98 on November 20, 2010, 01:16:00 pm
thats  good ldea, causse I really like First-Person stuff.  ;)
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 20, 2010, 01:17:04 pm
thats  good ldea, causse I really like First-Person stuff.  ;)

:D

Regarding the turbo it may be really hard to make, so it'll be one of the last things to do.

The HighScore system could be easy with the help of the community, since a lot of people make them for their games :D
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 21, 2010, 12:55:47 am
Nice!
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 22, 2010, 08:31:49 am
This new version hadn't as much success as the other :S

Even though, I'm quite proud...

:)

I'm trying to make what DJ recommended: add a layer to the background as the T>Dec raises :)
Title: Re: [PROJECT] Racer3D: Replay
Post by: JustCause on November 22, 2010, 08:41:32 am
This has actually come along quite nicely. Nice to see updates, I'll definitely download this. Nice work, Scout!
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 22, 2010, 08:49:07 am
This has actually come along quite nicely. Nice to see updates, I'll definitely download this. Nice work, Scout!

Thanks much JustCause!
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 22, 2010, 02:28:39 pm
Yeah I was a bit busier so I didn't have time to try this game, as well as about 40 other games/versions I have saved on my computer desktop over the last month or so. I hate work schedules where you only have one day off at once instead of 2 in a row. X.x
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 22, 2010, 05:35:47 pm
Yeah I was a bit busier so I didn't have time to try this game, as well as about 40 other games/versions I have saved on my computer desktop over the last month or so. I hate work schedules where you only have one day off at once instead of 2 in a row. X.x

I know a forum owner who has a schedule just like you. Coincidence? lol

Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 22, 2010, 11:56:46 pm
Lol that is possible. In my case I think it has to do with the fact Christmas is approaching. Eventually I'll most likely work from 7:45 AM to 4:45 PM instead of 4:45 PM to 10:15 PM or stuff like that. X.x

Also someone kept calling sick lately so I kept being called to go at work earlier. X.x
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 09:40:31 am
Returning to topic, Racer3D: Replay is a bit dead now, I haven't worked on it for a week.

I have an Axe Doubt now:

I have Pic1 in coordenates(0,0,).

Now, I want Pic1 to move 10pixels right, every time I press the key right (which is getkey(3)).

I want it to move without any animation, just move. Any ideas?
Title: Re: [PROJECT] Racer3D: Replay
Post by: calcdude84se on November 27, 2010, 12:22:48 pm
Returning to topic, Racer3D: Replay is a bit dead now, I haven't worked on it for a week.

I have an Axe Doubt now:

I have Pic1 in coordenates(0,0,).

Now, I want Pic1 to move 10pixels right, every time I press the key right (which is getkey(3)).

I want it to move without any animation, just move. Any ideas?
The first thing you need to consider is that the drawing of Pic1 at (0,0) is still there, even after you draw it again.
So (unless you want the old one to remain) you have to do one of two things: (There might be more, these are the two that have occurred to me.)
1) Store a copy of the screen before Pic1 was drawn at all to, say, L3 (the backbuffer). Draw Pic1. When you want to move Pic1, copy the backbuffer to the main buffer. This will effectively remove Pic1 from the screen. You can now draw Pic1 in its new location.
2) When you want to move Pic1, redraw whatever was underneath it. (If it was a tile, redraw it. If you can't redraw it so easily, you'll have to find a way to "grab" what was being covered and draw that when Pic1 moves.) Pic1 is removed from the screen and you can redraw it.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 12:26:54 pm
Code: [Select]
:[38107C1010282828->Pic1
:Pt-Change(0,0,Pic1
:DispGraph
:Repeat getKey->Z
:End
:If Z=2
:Pt-Off(0,0
:Pt-Change(0,10,Pic1
:End


Pt-Off doesn't work like that and probably isn't supposed to do that.

I'm sure this doesn't work because I didn't 'StorePic' or 'RecallPic' like you said:
Returning to topic, Racer3D: Replay is a bit dead now, I haven't worked on it for a week.

I have an Axe Doubt now:

I have Pic1 in coordenates(0,0,).

Now, I want Pic1 to move 10pixels right, every time I press the key right (which is getkey(3)).

I want it to move without any animation, just move. Any ideas?
The first thing you need to consider is that the drawing of Pic1 at (0,0) is still there, even after you draw it again.
So (unless you want the old one to remain) you have to do one of two things: (There might be more, these are the two that have occurred to me.)
1) Store a copy of the screen before Pic1 was drawn at all to, say, L3 (the backbuffer). Draw Pic1. When you want to move Pic1, copy the backbuffer to the main buffer. This will effectively remove Pic1 from the screen. You can now draw Pic1 in its new location.
2) When you want to move Pic1, redraw whatever was underneath it. (If it was a tile, redraw it. If you can't redraw it so easily, you'll have to find a way to "grab" what was being covered and draw that when Pic1 moves.) Pic1 is removed from the screen and you can redraw it.

Title: Re: [PROJECT] Racer3D: Replay
Post by: calcdude84se on November 27, 2010, 12:53:57 pm
So you choose the first technique :)
That's fine.
You seem not to understand how Pt-Off( and Pt-Change( work, so let me explain that.
Pt-Off( takes the same arguments as Pt-On(, but clears the space behind it first. It does not erase an area.
Pt-Change( also takes the same arguments as Pt-On(, but, rather than using OR, it uses XOR (Black and Black will make white, not black)

Your code is a start in the right direction, but I should point out a certain problem: your code (if you draw the sprite correctly) will, when you press the correct key, move the sprite from (0,0) to (10,0), but pressing it again will not move it. You'll need a variable to keep track of where Pic1 currently is and, as your original intent was, move it 10 to the right every time, not just once ;D
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 12:55:11 pm
Code: [Select]
:[38107C1010282828->Pic1
:Pt-Change(0,0,Pic1
:DispGraph
:Repeat getKey(3)
:Pt-Off(0,0
:Pt-Change(0,10,Pic1
:End

Isn't that like this to allow multiple key inputs? Maybe I'm just confused :S
Title: Re: [PROJECT] Racer3D: Replay
Post by: calcdude84se on November 27, 2010, 01:12:59 pm
I misread your code a bit, sorry.
Now, I want Pic1 to move 10pixels right, every time I press the key right (which is getkey(3)).
However, what your code would do if that were valid syntax (see what I said on Pt-Off( above) is this:
XOR Pic1 at (0,0) (equivalent to just drawing it if the area is empty)
Erase Pic1 at (0,0)
Until you press right, flash Pic1 at (0,10) (I think you mean (10,0). The Pt- commands take their arguments as X,Y,SPRITE)
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 27, 2010, 01:13:53 pm
Getkey with a number in parhentesis at the end is indeed what you use if you want to have multiple keypresses. For example, getkey(54) will check if 2ND is pressed. It will return 1 if it is and 0 if it isn't.

However, I think for multiple keypresses in a loop you would need to do the following:

Repeat getKey(3) and (getkey(4))

because of an axe glitch or something.

Could you explain in more details what you are trying to do?

Also I hope this projects continues again soon. :)
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 01:14:17 pm
I misread your code a bit, sorry.
Now, I want Pic1 to move 10pixels right, every time I press the key right (which is getkey(3)).
However, what your code would do if that were valid syntax (see what I said on Pt-Off( above) is this:
XOR Pic1 at (0,0) (equivalent to just drawing it if the area is empty)
Erase Pic1 at (0,0)
Until you press right, flash Pic1 at (0,10) (I think you mean (10,0). The Pt- commands take their arguments as X,Y,SPRITE)

So, is there another way of deleting something, or I can replace 0,0 using Pt-Change with a blank image?

!!! So, I can do Pt-Off(0,0,Pic1 to delete it?
Title: Re: [PROJECT] Racer3D: Replay
Post by: ASHBAD_ALVIN on November 27, 2010, 01:15:14 pm
also, turn off full speed mode before that method of getting a key, it will return 1 if a key in it's group is pressed, not just the unique key itself.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 01:16:44 pm
Getkey with a number in parhentesis at the end is indeed what you use if you want to have multiple keypresses. For example, getkey(54) will check if 2ND is pressed. It will return 1 if it is and 0 if it isn't.

However, I think for multiple keypresses in a loop you would need to do the following:

Repeat getKey(3) and (getkey(4))

because of an axe glitch or something.

Could you explain in more details what you are trying to do?

Also I hope this projects continues again soon. :)

I have an Axe Doubt now:

I have Pic1 in coordenates(0,0,).

Now, I want Pic1 to move 10pixels right, every time I press the key right (which is getkey(3)).

This is what I'm trying to do, which will help me with the turbo :)
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 27, 2010, 01:17:00 pm
also, turn off full speed mode before that method of getting a key, it will return 1 if a key in it's group is pressed, not just the unique key itself.
Didn't Quigibo fix the delay in 15 Mhz mode? ???
Title: Re: [PROJECT] Racer3D: Replay
Post by: ASHBAD_ALVIN on November 27, 2010, 01:17:41 pm
oh, maybe he did in 0.4.5.  Of course, I wouldn't know, I can only use 0.4.4
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 01:20:19 pm
Code: [Select]
:[38107C1010282828->Pic1
:Pt-Change(0,0,Pic1
:DispGraph
:Repeat getKey(3)
:Pt-Off(0,0,Pic1
:Pt-Change(0,10,Pic1
:End

Back to code.. How's that?
Title: Re: [PROJECT] Racer3D: Replay
Post by: calcdude84se on November 27, 2010, 01:26:08 pm
Code: [Select]
:[38107C1010282828->Pic1
:Pt-Change(0,0,Pic1
:DispGraph
:Repeat getKey(3)
:Pt-Off(0,0,Pic1
:Pt-Change(0,10,Pic1
:End

Back to code.. How's that?
So, as I said before, Pt-Off( actually still draws the sprite, it just clears what's behind it first ;D
To get rid of what's at (0,0), you can use either of the methods I mentioned before.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 01:51:34 pm
I reread the thread and couldn't find your 'methods', so here is a new idea:
Code: [Select]
:[38107C1010282828->Pic1
:Pt-Change(0,0,Pic1
:DispGraph
:Repeat getKey(3)
:ClrDraw
:Pt-Change(0,10,Pic1
:DispGraph
:End

I added ClrDraw, that could work, right?
Title: Re: [PROJECT] Racer3D: Replay
Post by: aeTIos on November 27, 2010, 01:52:42 pm
yes, that should work.
                  || |||   
(better now? vvvvv
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 01:53:15 pm
yes

That's a very uncomprehensible reply now, is that a 'yes it works very good scoutDavid, you rule'?
Title: Re: [PROJECT] Racer3D: Replay
Post by: aeTIos on November 27, 2010, 01:53:52 pm
lol, ill edit
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 27, 2010, 01:54:48 pm
yes

That's a very uncomprehensible reply now, is that a 'yes it works very good scoutDavid, you rule'?
That would pretty much be the same thing, aside from the you rule part ???
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 01:56:08 pm
yes

That's a very uncomprehensible reply now, is that a 'yes it works very good scoutDavid, you rule'?
That would pretty much be the same thing, aside from the you rule part ???

It was, of course, a joke. I'm now printing this code and will then implement it in my code.

Now, I still have to divide a 16*16 sprite I have into 4 8*8 sprites to make a loading screen (not needed but it's professional)
Title: Re: [PROJECT] Racer3D: Replay
Post by: aeTIos on November 27, 2010, 01:56:51 pm
I think it means something like 'thats a really good idea of you!'
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 01:57:49 pm
yes, that should work.
                  || |||   
(better now? vvvvv

Yeah better, but where's the 'you rule!'? hahah j/k

Now, I still have to divide a 16*16 sprite I have into 4 8*8 sprites to make a loading screen (not needed but it's professional).

You think it looks pro?
Title: Re: [PROJECT] Racer3D: Replay
Post by: aeTIos on November 27, 2010, 01:58:10 pm
yes

That's a very uncomprehensible reply now, is that a 'yes it works very good scoutDavid, you rule'?
That would pretty much be the same thing, aside from the you rule part ???

It was, of course, a joke. I'm now printing this code and will then implement it in my code.

Now, I still have to divide a 16*16 sprite I have into 4 8*8 sprites to make a loading screen (not needed but it's professional)

USE lordconiupiters 16*16 sprite drawing routine, if you dont use grayscale.
Link: in a minute
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 02:00:26 pm
yes

That's a very uncomprehensible reply now, is that a 'yes it works very good scoutDavid, you rule'?
That would pretty much be the same thing, aside from the you rule part ???

It was, of course, a joke. I'm now printing this code and will then implement it in my code.

Now, I still have to divide a 16*16 sprite I have into 4 8*8 sprites to make a loading screen (not needed but it's professional)

USE lordconiupiters 16*16 sprite drawing routine, if you dont use grayscale.
Link: in a minute

I first need to know what a subroutine is. Also, splitting into 4 8*8 is not hard, if you're suggesting something easier
Title: Re: [PROJECT] Racer3D: Replay
Post by: calcdude84se on November 27, 2010, 02:00:47 pm
The first thing you need to consider is that the drawing of Pic1 at (0,0) is still there, even after you draw it again.
So (unless you want the old one to remain) you have to do one of two things: (There might be more, these are the two that have occurred to me.)
1) Store a copy of the screen before Pic1 was drawn at all to, say, L3 (the backbuffer). Draw Pic1. When you want to move Pic1, copy the backbuffer to the main buffer. This will effectively remove Pic1 from the screen. You can now draw Pic1 in its new location.
This is the "method" I mentioned ;)
I reread the thread and couldn't find your 'methods', so here is a new idea:
Code: [Select]
:[38107C1010282828->Pic1
:Pt-Change(0,0,Pic1
:DispGraph
:Repeat getKey(3)
:ClrDraw
:Pt-Change(0,10,Pic1
:DispGraph
:End

I added ClrDraw, that could work, right?
That should work, but I don't think it does what you originally intended. When you run it, what you will see is Pic1 appearing quickly once then disappearing at (0,0), and then it will display at (0,10), 10 pixels down, until you press right.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 02:03:03 pm
Quote
That should work, but I don't think it does what you originally intended. When you run it, what you will see is Pic1 appearing quickly once then disappearing at (0,0), and then it will display at (0,10), 10 pixels down, until you press right.

Yeah, I know, when I read the code, I imagine that happening, even without running it, since I haven't tested it yet.

The problem is this is probably the easier way of doing it without having to learn something new.

All that is here:

Code: [Select]
:[38107C1010282828->Pic1
:Pt-Change(0,0,Pic1
:DispGraph
:Repeat getKey(3)
:ClrDraw
:Pt-Change(0,10,Pic1
:DispGraph
:End

I already knew how to do, so I don't need to learn nothing new, which means I don't have to forget about anything I already knew!
Title: Re: [PROJECT] Racer3D: Replay
Post by: calcdude84se on November 27, 2010, 02:23:45 pm
My confusion is that I thought you wanted it to start at (0,0) and only move to (10,0) after you press right. I thought that, after that, you wanted it to continue to move right every time you pressed right.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 02:33:30 pm
My confusion is that I thought you wanted it to start at (0,0) and only move to (10,0) after you press right. I thought that, after that, you wanted it to continue to move right every time you pressed right.

What I want is this:

Pic1 at (0,0)
User presses Right
Pic1 at (10,0)
User presses Right
Pic1 at (20,0)
User presses Right
Pic1 at (30,0)
User presses Right
....
Pic1 at (MAX,0)
Pic1 goes back to (0,0)

Code: [Select]
:[38107C1010282828->Pic1
:10->A
:Pt-Change(0,0,Pic1
:DispGraph
:Repeat getKey(3)
:ClrDraw
:Pt-Change(0,A,Pic1
:A+10->A
:DispGraph
:If A>=MAX
:0->A
:End
:End


I think the order of the code is wrong, but something like that would work?

by the way, what is the max?
Title: Re: [PROJECT] Racer3D: Replay
Post by: calcdude84se on November 27, 2010, 02:41:26 pm
The max is 80, I think. If it's at 90, then part of the sprite is cut off.
However, the condition for the loop won't work. "Repeat getKey(3)" means that it does the loop until you press right. That means that, when you press right, the sprite doesn't move, but the program exits ;)
Edit: 1400th post! :D
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 02:43:19 pm
Code: [Select]
:[38107C1010282828->Pic1
:10->A
:Lbl 0
:Pt-Change(0,0,Pic1
:DispGraph
:Repeat getKey->Z
:End
:If Z!=3
:Goto 0
:End
:ClrDraw
:Pt-Change(0,A,Pic1
:A+10->A
:DispGraph
:If A>79
:0->A
:End
:End

This will only allow one 'right click', I'm afraid :S
Title: Re: [PROJECT] Racer3D: Replay
Post by: calcdude84se on November 27, 2010, 02:51:34 pm
Now it repeats until you press any key, and you're no longer using direct input, which means you can only read one keypress at a time.
For the condition of the Repeat, you should choose a key that quits the program and use that as the condition of the Repeat loop. ;)
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 04:44:42 pm
Code: [Select]
:[38107C1010282828->Pic1
:10->A
:Lbl 0
:Pt-Change(0,0,Pic1
:DispGraph
:Repeat getKey(15)
:Goto 2
:End
:Lbl 2
:Repeat getKey->Z
:If Z!=3
:Goto 0
:End
:If Z=3
:ClrDraw
:Pt-Change(0,10,Pic1
:End

Or should I do something like:

Code: [Select]
:Repeat getKey->Z
:End
:While Z!=15
:If Z=3
:ClrDraw
:Pt-Change(0,10,Pic1
:End

The second one looks better to me :)
Title: Re: [PROJECT] Racer3D: Replay
Post by: calcdude84se on November 27, 2010, 05:49:17 pm
The first one is needlessly complicated and doesn't work anyway, so let's focus on the second :)
The main problem in the second one is that you're only checking for the key once. (The Repeat loop just waits for a key to be pressed, then continues, the key stored to Z)
Note: I'll continue as if you've fixed it to check for a key each time around the While loop.
You can still use getKey(15) and getKey(3); you don't have to use just regular getKey.
Also, you're missing an End. (You have a While and an If, but only one End).
You'll want a DispGraph in there too (in the If statement)
Also, you're still drawing the sprite at (0,10), not (10,0). Axe takes coordinates as X,Y in the Pt-( commands, not the Y,X that BASIC uses.
Note: I'll continue as if you've fixed these problems too.
The code's very close to perfect, but you still have a problem: each time you press right, it draws the sprite at (10,0). Never at (20,0) etc., but always at (10,0).
You'll need to use another variable to keep track of Pic1's current X position, and add 10 to it each time. As you've stated, if it goes too far right, its X position should be reset to 0.

Okay, so I'm somewhat forcing you along (Sorry x.x), but does this help?
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 06:11:08 pm
Okay, Calcdude, I found a working way (using my calculator, I can't simulate the compiler with my mind yet, like I do with Python).


A screenie and a .8xp is attached for you to see, there is 1 problem, that you can easily see in the GIF.

Code:
Code: [Select]
:.PICTEST
:[38107C1010282828→Pic1
:0→A
:Lbl 0
:ClrDraw
:ClrHome
:Pt-Change(0,0,Pic1
:DispGraph
:Lbl 1
:If A>99
:0→A
:ClrDraw
:Pt-Change(A,0,Pic1
:DispGraph
:End
:If A<0
:90→A
:ClrDraw
:Pt-Change(A,0,Pic1
:DispGraph
:End
:Repeat getKey→Z
:End
:Repeat getKey(15)
:If Z=3
:ClrDraw
:A+10→A
:Pt-Change(A,0,Pic1
:DispGraph
:Goto 1
:End
:If Z=2
:ClrDraw
:A-10→A
:Pt-Change(A,0,Pic1
:DispGraph
:Goto 1
:End
:End
:Lbl 2

It was supposed to go to (90,0) when you press left and Pic1 is at (0,0).

Any idea how to fix this?
Title: Re: [PROJECT] Racer3D: Replay
Post by: Runer112 on November 27, 2010, 07:09:34 pm
In Axe, just about all mathematics and comparsions are, by default, unsigned. And in an unsigned system, you can never have a value less than zero. What you need is a signed comparison.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 07:12:09 pm
In Axe, just about all mathematics and comparsions are, by default, unsigned. And in an unsigned system, you can never have a value less than zero. What you need is a signed comparison.

Code: [Select]
:If -B>0
#DO CODE
:End

You mean this?
Title: Re: [PROJECT] Racer3D: Replay
Post by: nemo on November 27, 2010, 07:15:57 pm
he means >> and <<. the signed comparisons.
Title: Re: [PROJECT] Racer3D: Replay
Post by: ASHBAD_ALVIN on November 27, 2010, 07:17:06 pm
or...

Code: [Select]
:If -B>>0
:.code :P
:End

the comparisons >>,<<, and a few others are for signed comparisons.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 07:17:20 pm
he means >> and <<. the signed comparisons.

Ouch, gonna have to learn something new and that means forgetting about something old.

/me sighs

Well, documentation, link? I had never heard of them :S
Title: Re: [PROJECT] Racer3D: Replay
Post by: ASHBAD_ALVIN on November 27, 2010, 07:17:51 pm
hmm, should be in that axe commands sheet that comes with the download...
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 27, 2010, 07:18:50 pm
hmm, should be in that axe commands sheet that comes with the download...

EXP1<<EXP2
EXP1≤≤EXP2
EXP1>>EXP2
EXP1≥≥EXP2   Signed comparisons for numbers that aren't always positive. Returns 1 if the statement is true or 0 if its false.

THIS!
Title: Re: [PROJECT] Racer3D: Replay
Post by: ASHBAD_ALVIN on November 27, 2010, 07:21:33 pm
yes.  that is it.  if you use the other ones, it'll give you really odd numbars/results/other crap.
Title: Re: [PROJECT] Racer3D: Replay
Post by: calcdude84se on November 28, 2010, 09:09:48 am
So, Scout, could you correct your code with that knowledge so we can look at it again? :)
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 28, 2010, 09:22:20 am
So, Scout, could you correct your code with that knowledge so we can look at it again? :)

I tried, but it doesn't work :(

Code: [Select]
:.PICTEST
:[38107C1010282828→Pic1
:0→A
:Lbl 0
:ClrDraw
:ClrHome
:Pt-Change(0,0,Pic1
:DispGraph
:Lbl 1
:If A>99
:0->A
:ClrDraw
:Pt-Change(A,0,Pic1
:DispGraph
:End
:If -A>>0
:90->A
:ClrDraw
:Pt-Change(A,0,Pic1
:DispGraph
:End
:Repeat getKey→Z
:End
:Repeat getKey(15)
:If Z=3
:ClrDraw
:A+10->A
:Pt-Change(A,0,Pic1
:DispGraph
:Goto 1
:End
:If Z=2
:ClrDraw
:A-10->A
:Pt-Change(A,0,Pic1
:DispGraph
:Goto 1
:End
:End
:Lbl 2

This won't work, I think
Title: Re: [PROJECT] Racer3D: Replay
Post by: lookitsan00b on November 28, 2010, 10:24:34 pm
Code: [Select]
:If A>99
If A is -10, '>' sees it as... a really big positive number (without going too much in depth), which is greater than 99.
Then it sets A to 0, so your second condition is never true.
It should be:

Code: [Select]
:If A>>99

Hope this helps ;D
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 29, 2010, 08:50:07 am
Code: [Select]
:If A>99
If A is -10, '>' sees it as... a really big positive number (without going too much in depth), which is greater than 99.
Then it sets A to 0, so your second condition is never true.
It should be:

Code: [Select]
:If A>>99

Hope this helps ;D

That works, but this is my doubt:
Code: [Select]
// IF A IS MINOR THAN O
90->A
ClrDrwa
Pt-Change(A,0,Pic1
DispGraph
End

What would replace the first line? I tried several things but did not succeed :S
Title: Re: [PROJECT] Racer3D: Replay
Post by: Runer112 on November 29, 2010, 08:56:29 am
Code: [Select]
If A<<0
90->A
ClrDraw
Pt-Change(A,0,Pic1
DispGraph
End
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 29, 2010, 09:06:45 am
I did try that, but the image won't even move left when I press left with that. I'll post my whole code in a few minutes.

The .8xp is attached and here's the code:

Code: [Select]
:.PICTEST
:[38107C1010282828→Pic1
:0→A
:Lbl 0
:ClrDraw
:ClrHome
:Pt-Change(0,0,Pic1
:DispGraph
:Lbl 1
:If A>>99
:0→A
:ClrDraw
:Pt-Change(A,0,Pic1
:DispGraph
:End
:If A<<0
:90→A
:ClrDraw
:Pt-Change(A,0,Pic1
:DispGraph
:End
:Repeat getKey→Z
:End
:Repeat getKey(15)
:Z=3
:ClrDraw
:A+10→A
:Pt-Change(A,0,Pic1
:DispGraph
:Goto 1
:End
:If Z=2
:ClrDraw
:A-10→A
:Pt-Change(A,0,Pic1
:DispGraph
:Goto 1
:End
:Lbl 2

Title: Re: [PROJECT] Racer3D: Replay
Post by: Runer112 on November 29, 2010, 10:34:32 am
You lost the If before Z=3. Which means you're also missing an End to close the loop it's in.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 29, 2010, 05:35:44 pm
You lost the If before Z=3. Which means you're also missing an End to close the loop it's in.

Heheheheh how stupid of me, fixed it and is working great! Now, I gotta work on my loading screen, it needs to be very fast, so it does not bother people.
Title: Re: [PROJECT] Racer3D: Replay
Post by: calcdude84se on November 29, 2010, 07:57:11 pm
I seemed to have missed the answering of this question, but I'm glad everything got resolved :) (Congrats Runer)
Good luck on the rest of this project! :D
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on November 30, 2010, 03:53:27 pm
I seemed to have missed the answering of this question, but I'm glad everything got resolved :) (Congrats Runer)
Good luck on the rest of this project! :D

Thanks!

No problem calcdude, the community is large and always ready to co-op :)
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on November 30, 2010, 11:59:19 pm
True, I'm glad many people try to help others. I remember a few years ago when someone asked a question or did a mistake, he would be looked upon or be told to search, even if it's nearly impossible to search for the answer, and now it's the opposite. It's still good to do a search before asking, but it's also good to know that others want to help if they can and have time. :)
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on December 01, 2010, 02:50:21 pm
True, I'm glad many people try to help others. I remember a few years ago when someone asked a question or did a mistake, he would be looked upon or be told to search, even if it's nearly impossible to search for the answer, and now it's the opposite. It's still good to do a search before asking, but it's also good to know that others want to help if they can and have time. :)

Yes, that's very good, I think was "Lemme Google that for you"d once here lol.


BACK ON TRACK:

Project Finished, lost the source code, the final release of the game was the last one I updated.

I'm sorry for people who wanted highscores, adding labels to background, etc. :(
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on December 01, 2010, 02:58:36 pm
Sorry to hear, didn't you have a backup elsewhere, though? You should always have backups of your stuff on a flash drive or a computer, not just the calc, otherwise you're playing with fire with your projects.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on December 01, 2010, 03:42:37 pm
Sorry to hear, didn't you have a backup elsewhere, though? You should always have backups of your stuff on a flash drive or a computer, not just the calc, otherwise you're playing with fire with your projects.

I had, but of the version 1.0, and the latest one was 1.1, which had too many updates for me to rewrite it.

Also, giving up on Farmville and finished Racer3D gives me some space to a new project, probably apuzzle one.
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on December 01, 2010, 04:01:06 pm
Ah ok, well at least I'm glad a version is intact. Are you planning to upload somewhere, by the way? (like Omni downloads section or ticalc) You would need to add Quigibo as author, though.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on December 01, 2010, 04:03:52 pm
Ah ok, well at least I'm glad a version is intact. Are you planning to upload somewhere, by the way? (like Omni downloads section or ticalc) You would need to add Quigibo as author, though.

He is author, but INSIDE the program. I will probably add it to both ticalc and Omnimaga downloads later :)
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on December 01, 2010, 11:24:13 pm
Ah ok. I recommend adding him as co-author on ticalc.org, though, since it could be rejected or taken down since he wrote a lot of the code.
Title: Racer 3D: Replay
Post by: Munchor on December 04, 2010, 06:53:49 am
Racer 3D: Replay



http://www.omnimaga.org/index.php?action=downloads;sa=view;down=599
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on December 04, 2010, 06:55:40 am
I already posted it in TIcalc and added Quigibo as author :)

Someone changed Quigibo to Kevin Horowitz and added his e-mail which was very nice!

I also added it to Omnimaga downloads, but I can only list Quigibo in the text that describes the program, though. There is no 'author's feature
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on December 04, 2010, 04:26:48 pm
Ah right I forgot I removed the author field. It was too buggy and is the reason why the old download section was discontinued. It won't let me move files uploaded in the wrong directory like SpriteLib...
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on December 04, 2010, 04:53:19 pm
Ah right I forgot I removed the author field. It was too buggy and is the reason why the old download section was discontinued. It won't let me move files uploaded in the wrong directory like SpriteLib...

That's really bad :S

However, Quigibo is referred in the text and he never really showed concern concerning his part of the work, so, with this project it shouldn't be a problem.
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on December 04, 2010, 06:59:44 pm
Yeah it should be fine.
Title: Re: [PROJECT] Racer3D: Replay
Post by: Ashbad on December 05, 2010, 01:09:31 pm
Cool! I just saw this in the downloads section, and I'm impressed!  Nice job Scout!
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on December 05, 2010, 01:10:32 pm
Cool! I just saw this in the downloads section, and I'm impressed!  Nice job Scout!

Thanks, now I just gotta get with my next gam wuuut? 999!
Title: Re: [PROJECT] Racer3D: Replay
Post by: feerik on December 21, 2010, 06:03:12 pm
looks great
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on December 21, 2010, 06:07:40 pm
looks great


THANKS much :)
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on January 21, 2011, 05:35:17 pm
Added a poll :)
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on January 25, 2011, 01:03:14 am
I have some ideas for a new version: Different race tracks. They could remain random, but track 1 for example could have smooth curves, track 2 more of them, track 3 some sharper curves and some tracks could be almost night time or something. It would be nice if there could be different backgrounds or track styles. An example could be this:

(http://www.omnimaga.org/index.php?action=dlattach;topic=5281.0;attach=4422;image)

This was by aeTIos by the way: http://ourl.ca/7878
Title: Re: [PROJECT] Racer3D: Replay
Post by: Munchor on January 25, 2011, 07:35:48 am
I already knew about that Racer3D Variant, but I could try making different tracks, not very hardly, yes.
Title: Re: [PROJECT] Racer3D: Replay
Post by: DJ Omnimaga on January 26, 2011, 01:15:21 am
Yeah I know, I just wanted to remind you in case you could add it. It looked nice ;D