Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Munchor

Pages: 1 ... 98 99 [100] 101 102 ... 424
1486
Axe / Re: Axe Q&A
« on: May 19, 2011, 02:06:07 pm »
I seriously don't get this, in most of my programs I use X+2->X and sometimes even 3. In order to avoid skipping vertical lines I usually check if (X<88) and (X<87) and stuff like that.

Either way, I am using Axe 0.5.2, but perhaps it was not the program's problem, I shall try again.

1487
News / Re: Omnimaga 2011 Programming Contest, Part #1: Axe Parser
« on: May 19, 2011, 01:35:19 pm »
I'd like to know who the judges, besides DJ, are. Thanks

1488
Other Calculators / Re: nSpire OS 3.0.2 Released?
« on: May 19, 2011, 01:31:49 pm »
TNOC is not blocked. :)
Unencrypted Lua is blocked. :( Until somebody makes an encryptor, we will have to send our lua docs through 3.0.1 to get them encrypted so they will work on 3.0.2.

Good and bad news :/

1489
Axe / Re: Axe Q&A
« on: May 19, 2011, 01:31:18 pm »
Yes, it is. The advantage to having x256 is that you can have the object move at partial speeds (such as one pixel every three frames for the illusion of 33% speed). pxl-Test( and all those other commands still treat it as if it were a multiple of 256, but this way you can have one object moving one pixel every frame and another at a fraction of that speed.

Ah I see, thanks.

So I have a new question about this, can I have like the acceleration of X in values that are also in 256 mode?

So, I'll give this example:

Code: [Select]
.Y of the sprite
0→Y
.X of the sprite
0→X
.X Acceleration of the sprite
0→A
.Y Acceleration of the sprite
0→B
Repeat getKey(15)
  ClrDraw

  If getKey(2)
    A-128→A
  End

  If getKey(3)
    A+128→A
  End

  Line(0,63,95,63)
 
  X+A→X
  Y+B→Y

  Pxl-On(X/256,Y/256)

  If (pxl-Test(X,Y+1)=0)
    Y+128→Y
  End

  DispGraph
End

Is this code OK for accelerating a sprite? For the record, this crashed my calculator during runtime.

1490
Other Calculators / Re: nSpire OS 3.0.2 Released?
« on: May 19, 2011, 01:26:32 pm »
WOW, I just really hope they don't block TNOC nor Lua, that'd be super evil of them.

1491
TI is going to be very mad.

I don't get that, the tutorial already exists, so they'd be already mad.

1492
Axe / Re: Axe Q&A
« on: May 19, 2011, 01:16:04 pm »
pxl-Test(X,Y+1) should be pxl-Test(X,Y/256+1)

Also you can save a lot of memory by doing !If pxl-Test(X,Y/256+1) instead of If (pxl-Test(X,Y/256+1)=0).

I had tried that before and I knew it would work.

My problem is though: Aren't I ruining all the 256 collision by pixel testing with Y/256. Isn't that doing the same as if Y was not a giant value?

1493
Axe / Re: Anyone have an easy tilemapper for AXE?
« on: May 19, 2011, 01:04:09 pm »
I don't, but if I were you I'd try one of the following:


I actually have a tilemapping engine in a topic I made a long ago I was given one... Let me find it.

1494
ASM / Re: David's Z80 Assembly Questions
« on: May 19, 2011, 01:02:50 pm »
I tried it Deep Thought as I got what you said (e is not being decreased when the pixel is white), but the square still goes through the line:

Code: [Select]
.nolist
#include "ti83plus.inc"
#include "dcs7.inc"
.list
   .org userMem-2
   .db $BB,$6D
Init:
  B_CALL (_ClrLCDFull)
  ld hl,0
 
Loop:
 
  ld b,8
  ld ix,MyImage
  ld a,h
  push hl
 
  call iPutSprite        ;Display Image
  call iFastCopy         ;Put it in the buffer
 
  B_CALL(_GrBufClr)      ;Clears the graph screen
 
  ;Draw line code
  ld h,0
  ld l,63
  ld d,95
  ld e,63
  ld a,1
 
  call fastline
  ;End of draw line code
 
  ;Start of gravity code
  ld a,8
  add a,l
  ld e,a                 ;Sets e to y+8
 
  ld a,h                 ;Sets a to x
 
  call iGetPixel
 
  ld e,0
  and (hl)
  call z,SetGravity      ;If pixel below image is white, y=y+1
 
  ;End of gravity code
 
  pop hl
 
  ld a,l
  add a,e
 
  ld l,a
 
  ;Getkeys code
  ld a,$FE
  out (1),a
  nop
  nop
  nop
  in a,(1)
 
  bit 1,a
  call z,CheckMoveLeft
 
  bit 2,a
  call z,CheckMoveRight
 
  bit 3,a
  call z,CheckMoveUp
  ;End of getkeys code
 
  jp Loop

SetGravity:
  ld e,0
  inc e
  ret

CheckMoveUp:
  push af
  ld a,l
  cp 0
 
  call nz,MoveUp
  pop af
  ret

MoveUp:
  dec l
  dec l
  ret
 
CheckMoveLeft:
  push af
  ld a,h
  cp 0
 
  call nz,MoveLeft
  pop af
  ret

MoveLeft:
  dec h
  dec h
  ret

CheckMoveRight:
  push af
  ld a,h
  cp 87
 
  call c,MoveRight
  pop af
  ret

MoveRight:
  inc h
  inc h
  ret

MyImage:
  .db $FF,$81,$81,$81,$81,$81,$81,$FF

1495
Axe / Re: Axe Q&A
« on: May 19, 2011, 12:59:25 pm »
I have a question, I just made my first program to try and learn acceleration and more about physics.

here's my problem though:

Code: [Select]
0→Y
5→X
Repeat getKey(15)
  ClrDraw

  Line(0,63,95,63)
  Pxl-On(X,Y/256)

  If (pxl-Test(X,Y+1)=0)
    Y+128→Y
  End

  DispGraph
End

That's a little tiny dot but it doesn't move down as it was supposed to (due to gravity).

Any idea of what I'm doing wrong?

Thanks

1496
TI Z80 / Re: My explosive contest entry
« on: May 19, 2011, 12:37:37 pm »
Lol guys don't worry, pulleys are not working :P I tried to get them to work but they build up a kind of resonance between the two systems and fail catastrophically.

Post screenshot? For public amusement?

Seconded.

1497
Axe / Re: Physics Lessons
« on: May 19, 2011, 12:28:29 pm »
O.O That is some short source code (AC.8XP). Thanks a lot Builderboy. However, I didn't get a word since I never used velocity and I didn't even get the first lesson so would I get this.

Nice job!

1498
ASM / Re: David's Z80 Assembly Questions
« on: May 19, 2011, 12:16:37 pm »
Btw Scout, you're learning ASM as fast as I was, so give yourself a pat on the back.
* Scout pats himself on the back.

Code: [Select]
.nolist
#include "ti83plus.inc"
#include "dcs7.inc"
.list
   .org userMem-2
   .db $BB,$6D
Init:
  B_CALL (_ClrLCDFull)
  ld hl,0
 
Loop:
 
  ld b,8
  ld ix,MyImage
  ld a,h
  push hl
 
  call iPutSprite        ;Display Image
  call iFastCopy         ;Put it in the buffer
 
  B_CALL(_GrBufClr)      ;Clears the graph screen
 
  ;Draw line code
  ld h,0
  ld l,63
  ld d,95
  ld e,63
  ld a,1
 
  call fastline
  ;End of draw line code
 
  ;Start of gravity code
  ld a,8
  add a,l
  ld e,a                 ;Sets e to y+8
 
  ld a,h                 ;Sets a to x
 
  call iGetPixel
 
  pop hl
  call z,SetGravity      ;If pixel below image is white, y=y+1
 
  ;End of gravity code
 
  ;Getkeys code
  ld a,$FE
  out (1),a
  nop
  nop
  nop
  in a,(1)
 
  bit 1,a
  call z,CheckMoveLeft
 
  bit 2,a
  call z,CheckMoveRight
 
  bit 3,a
  call z,CheckMoveUp
  ;End of getkeys code
 
  jp Loop

SetGravity:
  inc l
  ret

CheckMoveUp:
  push af
  ld a,l
  cp 0
 
  call nz,MoveUp
  pop af
  ret

MoveUp:
  dec l
  dec l
  ret
 
CheckMoveLeft:
  push af
  ld a,h
  cp 0
 
  call nz,MoveLeft
  pop af
  ret

MoveLeft:
  dec h
  dec h
  ret

CheckMoveRight:
  push af
  ld a,h
  cp 87
 
  call c,MoveRight
  pop af
  ret

MoveRight:
  inc h
  inc h
  ret

MyImage:
  .db $FF,$81,$81,$81,$81,$81,$81,$FF

Here's my updated code, the gravity works but the main sprite still goes through the black line, I'm pretty sure I'm checking the pixel beneath the sprite the wrong way:

Code: [Select]
;Start of gravity code
  ld a,8
  add a,l
  ld e,a                 ;Sets e to y+8
 
  ld a,h                 ;Sets a to x
 
  call iGetPixel
 
  pop hl
  call z,SetGravity      ;If pixel below image is white, y=y+1
 
  ;End of gravity code

Basically what I want to do is Y-1 if there is no ON pixel beneath the sprite.

So I did this:

Code: [Select]
call iGetPixel
 
  and (hl)
  call z,SetGravity      ;If pixel below image is white, y=y+1
 
  ;End of gravity code
 
  pop hl                  ;Get old hl value
 
  ld a,l                  ;Set a to l to do some math with ti
  add a,e              ;I add e to a
 
  ld l,a            ;I set l to a, so if anything was increased to 'e', the 'y' position is also increased
...
SetGravity:
  ld e,0
  inc e
  ret

However, the sprite stills goes through the black line.

1499
TI Z80 / Re: Eitrix for TI-84 Plus
« on: May 19, 2011, 11:38:58 am »
I'll look into Crabcake.

Oh, yes, and I just uploaded to the omni downloads section and ticalc.org. I'll add links when the files are approved.

Omnimaga Downloads are always automatically approved.
Only if you have a huge amount of posts. :P

Oh! I had no idea :(

1500
ASM / Re: David's Z80 Assembly Questions
« on: May 19, 2011, 11:36:10 am »
Code: [Select]
.nolist
#include "ti83plus.inc"
#include "dcs7.inc"
.list
   .org userMem-2
   .db $BB,$6D
Init:
  B_CALL (_ClrLCDFull)
  ld hl,0
 
Loop:
 
  ld b,8
  ld ix,MyImage
  ld a,h
  push hl
 
  call iPutSprite        ;Display Image
  call iFastCopy         ;Put it in the buffer
 
  B_CALL(_GrBufClr)      ;Clears the graph screen
 
  ;Draw line code
  ld h,0
  ld l,63
  ld d,95
  ld e,63
  ld a,1
 
  call fastline
  ;End of draw line code
 
  ;Start of gravity code
  ld a,8
  add a,l
  ld e,a                 ;Sets e to y+8
 
  ld a,h                 ;Sets a to x
 
  call iGetPixel
 
  and (hl)
  call z,SetGravity      ;If pixel below image is white, y=y+1
 
  ;End of gravity code
 
  pop hl
 
  ;Getkeys code
  ld a,$FE
  out (1),a
  nop
  nop
  nop
  in a,(1)
 
  bit 1,a
  call z,CheckMoveLeft
 
  bit 2,a
  call z,CheckMoveRight
 
  bit 3,a
  call z,CheckMoveUp
  ;End of getkeys code
 
  jp Loop

SetGravity:
  inc l
  ret

CheckMoveUp:
  push af
  ld a,l
  cp 0
 
  call nz,MoveUp
  pop af
  ret

MoveUp:
  dec l
  dec l
  ret
 
CheckMoveLeft:
  push af
  ld a,h
  cp 0
 
  call nz,MoveLeft
  pop af
  ret

MoveLeft:
  dec h
  dec h
  ret

CheckMoveRight:
  push af
  ld a,h
  cp 87
 
  call c,MoveRight
  pop af
  ret

MoveRight:
  inc h
  inc h
  ret

MyImage:
  .db $FF,$81,$81,$81,$81,$81,$81,$FF

I found out I don't need to push/pop af and did that, the gravity doesn't work at all though.

Pages: 1 ... 98 99 [100] 101 102 ... 424