Author Topic: ANother noob qusestion  (Read 8336 times)

0 Members and 1 Guest are viewing this topic.

Offline obon7

  • LV2 Member (Next: 40)
  • **
  • Posts: 34
  • Rating: +1/-1
    • View Profile
ANother noob qusestion
« on: November 27, 2011, 11:35:13 pm »
Can anybody explain to me what a sprite is and how do you use/create them THX. :banghead:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: ANother noob qusestion
« Reply #1 on: November 27, 2011, 11:43:34 pm »
Sprite is an 8x8 object used in games

A sprite would be stored like
[sprite data]->Pic1
Or pic2, pic3 etc

Inside the [], the sprite is in hexadecimal.
For example,
[FFFFFFFFFFFFFFFF]->Pic1
(16 Fs) would make a block that is all black

To make the hexadecimals, I use the program included in the axe folder that is with the app
 It is called HEXPIC , I believe.

To use them, once you have stored it, like in pic1

Do
Pt-On(X coord, Y coord,Pic1)

(and don't forget to DispGraph ;) )
 
« Last Edit: November 27, 2011, 11:46:08 pm by epic7 »

Offline obon7

  • LV2 Member (Next: 40)
  • **
  • Posts: 34
  • Rating: +1/-1
    • View Profile
Re: ANother noob qusestion
« Reply #2 on: November 27, 2011, 11:56:11 pm »
THX

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: ANother noob qusestion
« Reply #3 on: November 28, 2011, 05:14:02 pm »
And if you are making the sprite move, I suggest using
Pt-change(X,Y,pic#)
dispgraph
Pt-change(X,Y,pic#)

pt change simply changes the point from on to off, or vis versa. And pt-on just turns it on, or pt-off which is off. :)
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: ANother noob qusestion
« Reply #4 on: November 28, 2011, 05:16:27 pm »
Lol, I've never used that before :P
I just do pt-On

and always have a dispgraphclrdraw

I tried pt-off once but it screwed up ???

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: ANother noob qusestion
« Reply #5 on: November 28, 2011, 05:19:07 pm »
Lol, I've never used that before :P
I just do pt-On

and always have a dispgraphclrdraw

I tried pt-off once but it screwed up ???
yeah me too, I save everything but the moving thing to the back buffer and use RecallPic every Frame.

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: ANother noob qusestion
« Reply #6 on: November 28, 2011, 05:19:47 pm »
point off just makes the 8 by 8 white, then draws the black part to the screen :P
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: ANother noob qusestion
« Reply #7 on: November 28, 2011, 05:26:21 pm »
Lol, I've never used that before :P
I just do pt-On

and always have a dispgraphclrdraw

I tried pt-off once but it screwed up ???
yeah me too, I save everything but the moving thing to the back buffer and use RecallPic every Frame.

Ooh, good idea.

Wait, how? :P
« Last Edit: November 28, 2011, 05:27:03 pm by epic7 »

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: ANother noob qusestion
« Reply #8 on: November 28, 2011, 05:31:27 pm »
Lol, I've never used that before :P
I just do pt-On

and always have a dispgraphclrdraw

I tried pt-off once but it screwed up ???
yeah me too, I save everything but the moving thing to the back buffer and use RecallPic every Frame.

Ooh, good idea.

Wait, how? :P
I usually use an appvar- do this:
Code: [Select]
:GetCalc("appvLELVEL",Y0
:Copy(Y0,L3,768
:Repeat GetKey(15)
:RecallPic
:draw player and stuff
:DispgraphClrdraw
:movement stuff
:End

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: ANother noob qusestion
« Reply #9 on: November 28, 2011, 06:11:34 pm »
Wait, how do you make appvars?
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: ANother noob qusestion
« Reply #10 on: November 28, 2011, 06:15:44 pm »
Wait, how do you make appvars?
:GetCalc("appvNameOfAppvar",#OfBytes)->Pointer
then to store stuff into it:
Copy(StuffToCopy,Pointer,#OfBytes)

...such as:
:GetCalc("appvBLAH",768)->A //apvar created and stored into A with 768 bytes (enough for a picture)
:Copy(L6,A,768) //copies buffer into appvar (just like an OS pic)

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: ANother noob qusestion
« Reply #11 on: November 28, 2011, 06:17:53 pm »
so is L6 a list? How does that part work, How do I put stuff as the list?
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: ANother noob qusestion
« Reply #12 on: November 28, 2011, 06:20:10 pm »
so is L6 a list? How does that part work, How do I put stuff as the list?
L6 isn't a "list", such as the lists in the OS, but they are Pointers.
L6 happens to be where the data for the buffer is stored. (buffer: aka: graph screen ;))
when you use the command dispgraph, it evaluates the data in L6 and draws points accordingly.
« Last Edit: November 28, 2011, 06:20:58 pm by parser padwan »

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: ANother noob qusestion
« Reply #13 on: November 28, 2011, 06:22:43 pm »
so could I store a main loop as an appvar? for example, could I have my program set up as this:

in the program it has the menu info, then if you press level 1 it opens appvLEVEL1 which has all of the loop and stuff for that level, ? This is, to store level 1 as an appvar instead of another program.
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: ANother noob qusestion
« Reply #14 on: November 28, 2011, 06:25:26 pm »
so could I store a main loop as an appvar? for example, could I have my program set up as this:

in the program it has the menu info, then if you press level 1 it opens appvLEVEL1 which has all of the loop and stuff for that level, ? This is, to store level 1 as an appvar instead of another program.
you can store data in an appvar, but as far as putting code in them, it doesn't work. I'm not sure why, but asm people say that a lot of stuff gets screwed up. (ask asm person for more info)