Author Topic: Your Projects - Post and Critique  (Read 116592 times)

0 Members and 1 Guest are viewing this topic.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Your Projects - Post and Critique
« Reply #495 on: September 27, 2010, 08:54:43 pm »
i don't have any software that can read .8xp files.... so if you post the source code in a code box (using [code] *code here* [/code]) like below, i'd be glad to help.
Code: [Select]
.AXE
[010203->GDB1
For(A,0,2
Disp {GDB1+A}>Dec,i
End


Offline ikemike

  • LV3 Member (Next: 100)
  • ***
  • Posts: 67
  • Rating: +4/-0
  • Hmm.
    • View Profile
Re: Your Projects - Post and Critique
« Reply #496 on: September 27, 2010, 08:58:53 pm »
Code: [Select]
Lbl F
ClrHome
"Score:"→Str1
"High Score: "→Str2
"vHIGHSCR"→Str0
GetCalc(Str0)→θ
!If θ
UnArchive Str0
GetCalc(Str0)→θ
End
!If θ
GetCalc(Str0,2)→θ
End
If S>{θ}^r
S→{θ}^r
End
Archive Str0

Disp Str1,i,S>Dec,i,i,Str2,i,{θ}^r>Dec

^r being the "read" marker and >Dec being the signing symbol

Thanks for the help.
« Last Edit: September 27, 2010, 09:02:32 pm by ikemike »
Anonymous Legend

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Your Projects - Post and Critique
« Reply #497 on: September 27, 2010, 09:01:20 pm »
well, for one you're trying to access the data stored in your appvar after already having archived it.
stick that Archive Str0 command after the disp stuff
there's probably something else, but i trust nemo to deal with it as i have an essay to write. good luck!

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Your Projects - Post and Critique
« Reply #498 on: September 27, 2010, 09:04:08 pm »
Code: [Select]
Lbl F
ClrHome
"Score:"→Str1
"High Score: "→Str2
"vHIGHSCR"→Str0
GetCalc(Str0)→θ
!If θ  .if there's no appvar, create one
GetCalc(Str0,2)→θ
Copy([0000],θ,2)  .copy 2 bytes of 0 to the data.
Else
UnArchive Str0  .otherwise, unarchive the appvar
End
If S>{θ}^r
S→{θ}^r
End
Disp Str1,S>Dec,i,i,Str2,{θ}^r>Dec
Archive Str0
« Last Edit: September 27, 2010, 09:05:07 pm by nemo »


Offline ikemike

  • LV3 Member (Next: 100)
  • ***
  • Posts: 67
  • Rating: +4/-0
  • Hmm.
    • View Profile
Re: Your Projects - Post and Critique
« Reply #499 on: September 27, 2010, 09:04:36 pm »
Umm... Now, it's clearing the high score every other playthrough.
« Last Edit: September 27, 2010, 09:12:47 pm by ikemike »
Anonymous Legend

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Your Projects - Post and Critique
« Reply #500 on: September 27, 2010, 09:16:10 pm »
Don't forget, GetCalc() returns 0 if the appvar is archived.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Your Projects - Post and Critique
« Reply #501 on: September 27, 2010, 09:20:08 pm »
Don't forget, GetCalc() returns 0 if the appvar is archived.

really? go figure. i've never really used appvars, just skimmed the commands list to figure out how they work. i assume ikemike can make the necessary change then.


Offline ikemike

  • LV3 Member (Next: 100)
  • ***
  • Posts: 67
  • Rating: +4/-0
  • Hmm.
    • View Profile
Re: Your Projects - Post and Critique
« Reply #502 on: September 27, 2010, 10:01:53 pm »
Oh—a question; why are we using {theta} as the file if Str0 is being pointed to?
Anonymous Legend

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Your Projects - Post and Critique
« Reply #503 on: September 27, 2010, 10:16:26 pm »
Theta is used in the code above to store the location of the AppVar in RAM.  In other words, Theta is used as a pointer that points to where the Data is. :)

Good luck ikemike. ;D
« Last Edit: September 27, 2010, 10:16:36 pm by ztrumpet »

Offline XVicarious

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +45/-28
  • I F**king Love Twisty Puzzles
    • View Profile
    • XVicarious
Re: Your Projects - Post and Critique
« Reply #504 on: January 14, 2011, 04:24:08 pm »
How you guys like? Its still under development I'm planning to add a boss fight. And the name PShooter is from the original version made with TI-Basic using text (it was really really slow lol). But its attached. I have a bunch of optimization to go still. The score still isn't displayed. And losing all your lives does not end the game yet (so just press clear).

Please tell me what i can do to improve it.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Your Projects - Post and Critique
« Reply #505 on: January 14, 2011, 06:03:43 pm »
I think it's very nice (especially the sprite design) but it started to become somewhat dull after a while.  May I recommend gradually increasing the difficulty, by either creating more enemies after some time, or perhaps by changing the type of enemy bullet?  Also, once you add support for scores, maybe you should try adding an on-screen counter of how many enemies you've killed.

Also, I'm wasn't sure how to go pass the title screen/you've lost the game screen.  It would have been nice if pressing [2ND] would have let me move on.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline XVicarious

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +45/-28
  • I F**king Love Twisty Puzzles
    • View Profile
    • XVicarious
Re: Your Projects - Post and Critique
« Reply #506 on: January 14, 2011, 06:08:11 pm »
Yeah I was planning that. The problem with more enemies is variables, or in Axe is there a way to have more than the what... 29 or so variables? Like A-Z and Theta?
And maybe after a certain amount of time the enemies shoot faster? Like as in more often?
And finally the screen... I'm not quite sure what the problem with that is. I'm thinking of removing it after I add a counter.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Your Projects - Post and Critique
« Reply #507 on: January 14, 2011, 06:21:09 pm »
Yeah I was planning that. The problem with more enemies is variables, or in Axe is there a way to have more than the what... 29 or so variables? Like A-Z and Theta?
And maybe after a certain amount of time the enemies shoot faster? Like as in more often?
And finally the screen... I'm not quite sure what the problem with that is. I'm thinking of removing it after I add a counter.

*psst*  Want to know a secret?
I can tell you how to get about 710 more variables - for free!

If you want to do this:
10->A
10->B
Where A and B are the coordinates of an enemy, you could do this instead:
10->{L1}
10->{L1+1}
(The L1 is the list number one, and don't forget the curly braces).

You can safely store numbers up to about 714 (so doing 42->{L1+710} is perfectly safe).

Also, if all the enemies act exactly the same, you could do this:
Code: [Select]
.Storing enemy location
For(A,0,15)               //I want 16 enemies
    rand^95->{A*2+L1}     //X-coordinate
    rand^30->{A*2+1+L1}   //Y-coordinate
End

.Displaying enemies
For(Z,0,15)
    Pt-On({A*2+L1},{A*2+1+L1},Pic1)
End

These are called pointers.  If you search the Axe forum, you could probably get a better explanation of them, but this is the quick implementation guide ;)
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline XVicarious

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +45/-28
  • I F**king Love Twisty Puzzles
    • View Profile
    • XVicarious
Re: Your Projects - Post and Critique
« Reply #508 on: January 14, 2011, 06:25:22 pm »
Thank you so much for that... Pointer lol.

edit: And with what you showed me... Collision checking? That would be quite hard like this, or no?
« Last Edit: January 14, 2011, 06:42:31 pm by jkag »

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Your Projects - Post and Critique
« Reply #509 on: January 14, 2011, 06:37:40 pm »
No problem!  Pointers are your friends - with them, you can do so many magical things. 
btw, here's more info on what pointers actually are:
1] In all computing devices, there is only a set amount of memory.  In order to use the memory, they're all treated as if they're arranged in a line.

2] The very first byte is called byte number 0, the second byte is called byte number 1, etc.

3] This byte number is the address - the address tells you exactly which byte you're talking about.

4] Each byte can hold a number.  Think of houses - they have addresses, and they hold stuff inside.

5] So, by doing 10->X, you're telling Axe to store 10 to a certain byte in memory (Because a lot of these bytes hold vital information, variables are given so you don't have to remember a bunch of numbers whenever you want to store something).  If I do something like 11->{1337}, I am storing the number 11 to byte number 1337 (you should never do this, though.  Storing numbers to random places in RAM is the quickest way to a RAM clear).

6] If we examine {L1+5}, the L1 part is a numerical address to a place in RAM you can freely muck about in without any danger.  Think of it like pi - it's a number which is hardish to remember, so the compile just substitutes it for you when compiling. 

7] The stuff inside the braces tell you which byte you're thinking of, and adding the braces tell you to store to that particular byte.

8] Don't add braces around variables, though.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.