Author Topic: [PROJECT] Racer3D: Replay  (Read 30865 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 #90 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?

ASHBAD_ALVIN

  • Guest
Re: [PROJECT] Racer3D: Replay
« Reply #91 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.
« Last Edit: November 27, 2010, 01:15:31 pm by ASHBAD_ALVIN »

Offline Munchor

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

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 #93 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? ???
« Last Edit: November 27, 2010, 01:17:17 pm by DJ Omnimaga »

ASHBAD_ALVIN

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

Offline Munchor

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

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 #96 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.
"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 #97 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?
« Last Edit: November 27, 2010, 01:51:55 pm by ScoutDavid »

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: [PROJECT] Racer3D: Replay
« Reply #98 on: November 27, 2010, 01:52:42 pm »
yes, that should work.
                  || |||   
(better now? vvvvv
« Last Edit: November 27, 2010, 01:55:16 pm by aeTIos »
I'm not a nerd but I pretend:

Offline Munchor

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

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: [PROJECT] Racer3D: Replay
« Reply #100 on: November 27, 2010, 01:53:52 pm »
lol, ill edit
I'm not a nerd but I pretend:

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 #101 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 ???

Offline Munchor

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

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: [PROJECT] Racer3D: Replay
« Reply #103 on: November 27, 2010, 01:56:51 pm »
I think it means something like 'thats a really good idea of you!'
I'm not a nerd but I pretend:

Offline Munchor

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