Author Topic: [PROJECT] Racer3D: Replay  (Read 30111 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
Re: [PROJECT] Racer3D: Replay
« Reply #75 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

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 #76 on: November 21, 2010, 12:55:47 am »
Nice!

Offline Munchor

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

Offline JustCause

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 810
  • Rating: +115/-5
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #78 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!
See you, space cowboy...

Offline Munchor

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

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 #80 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

Offline Munchor

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


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 #82 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

Offline Munchor

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

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #84 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.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Munchor

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


Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #86 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
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Munchor

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

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: [PROJECT] Racer3D: Replay
« Reply #88 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)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

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 #89 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. :)