Author Topic: [PROJECT] Racer3D: Replay  (Read 30132 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
[PROJECT] Racer3D: Replay
« 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:




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:



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)
« Last Edit: November 07, 2010, 03:31:20 pm by ScoutDavid »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [PROJECT] Racer3D: Replay
« Reply #1 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.

Offline MRide

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 711
  • Rating: +14/-0
  • You can't see this.
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #2 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.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #3 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?

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: [PROJECT] Racer3D: Replay
« Reply #4 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.


Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #5 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

ASHBAD_ALVIN

  • Guest
Re: [PROJECT] Racer3D: Replay
« Reply #6 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

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #7 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!

Offline Ranman

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1354
  • Rating: +83/-0
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #8 on: November 08, 2010, 06:19:04 pm »
This is lookin' sweet! B)
Ranman
Bringing Randy Glover's Jumpman to the TI-89 calculator. Download available at Ticalc.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #9 on: November 08, 2010, 06:24:12 pm »
This is lookin' sweet! B)

Thanks I can't wait to post the next version

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #10 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!

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #11 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.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #12 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!
« Last Edit: November 08, 2010, 07:44:33 pm by ScoutDavid »

Offline gangsterveggies

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +2/-1
  • Asm rules
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #13 on: November 08, 2010, 07:55:05 pm »
Cool... I hope you do a good job on that. Where did you got that?
I'm waiting for someone to do a calc Farmville. Maybe one day I'll do it!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [PROJECT] Racer3D: Replay
« Reply #14 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