Author Topic: Blaster Master!  (Read 27977 times)

0 Members and 1 Guest are viewing this topic.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Blaster Master!
« Reply #45 on: July 30, 2011, 12:30:34 am »
No, because the elements in Powder were stored so that each particle type was grouped with all of the others (to allow me to apply the particle rules to the whole section) and each particle could exist independently. Basically, if I had copied the full entry for a particle (the entry size was constant for ease of access) to another location within each section, it wouldn't have changed anything except the size of the list.
« Last Edit: July 30, 2011, 12:30:51 am by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Blaster Master!
« Reply #46 on: July 30, 2011, 01:03:14 am »
cool! i'd like to see how you went about doing that.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Blaster Master!
« Reply #47 on: August 02, 2011, 10:18:38 am »
Wow, I never thought of doing it that way either :o

I can try and help. Did you want me to post demo code or something?

Code: [Select]
.Removing an element from the list
.Let's say the list element is 8 bytes long and held in L1
.Let's say the amount of entries in list is held in variable A
.Let's say the entry number to be deleted is held in var B
Copy(A*8+L1,B*8+L1,8)
A--

Or something like that...What was your problem exactly?
« Last Edit: August 02, 2011, 10:25:04 am by squidgetx »

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Blaster Master!
« Reply #48 on: August 08, 2011, 04:33:38 pm »
thanks for the offer, squidget. here's a demo program i tried making. as you can see in the screenie, when one bullet passes off the left side of the screen, which is held at the beginning of the list, bullets are also removed from the end of the list. where did i go wrong in the source?
Code: [Select]
:.A
:ClrDraw
:DiagnosticOff
:[E050E00000000000→Pic1
:.SET LENGTH VAR TO 0
:0→C
:.MAIN LOOP
:Repeat getKey(15)
:Pause 500
:.ADD A BULLET
:If getKey(54)
:0→{C*2+L1}
:rand^62→{C*2+L1+1}
:C++
:End
:.LOOP THROUGH/MOVE/DRAW BULLETS AND REMOVE THOSE WHICH PASS OFF SCREEN
:If C
:For(L,0,C-1
:{L*2+L1}+8→{L*2+L1}
:Pt-On({L*2+L1},{L*2+L1+1},Pic1
:If {L*2+L1}>95
:!If L-C-1
:conj(C-1*2+L1,L*2+L1,2
:End
:C--
:!If C
:Goto A
:End
:End
:End:End
:Lbl A
:DispGraphClrDraw
:.DISPLAY LENGTH FOR DEBUGGING
:Text(8,,C►Dec
:End
« Last Edit: August 08, 2011, 04:33:57 pm by shmibs »

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Blaster Master!
« Reply #49 on: August 08, 2011, 11:06:27 pm »
Found an impossible condition:

Code: [Select]
!If L-C-1
Because L will never be greater than C-1, at it's highest possible possibility the equation will be equivalent to:

Code: [Select]
If C-1-C-1 = 0
which is -2. Perhaps you meant to say:

Code: [Select]
!If L-(C-1)
(which would make more sense) Let me know if that works :)
« Last Edit: August 08, 2011, 11:07:18 pm by buttsfredkin »
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Blaster Master!
« Reply #50 on: August 09, 2011, 05:47:10 pm »
/\true, i mistyped a + as a - there. it should have been
!If L-C+1
that doesn't affect the issue i mentioned above, though.

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Blaster Master!
« Reply #51 on: August 12, 2011, 07:23:04 pm »
*bump*
firstly because i want to figure this out, and secondly because i want to let people know that Dionysus, who just signed up, is the person who was helping me with some sprites for this project.

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Blaster Master!
« Reply #52 on: August 12, 2011, 10:58:24 pm »
Why don't you trying using the Butts Fredkin Algorithm?

It goes like this:

1. Write down the problem.
2. Think, really hard.
3. Write down the solution.

It sounds dumb but it has worked for me in the past with problems like these ^

Good Luck :)
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Blaster Master!
« Reply #53 on: August 24, 2011, 11:35:37 am »
Sorry for the long time I took

Your code looks fine. However, I'd try using the {}r->{}r instead of Copy(). Sometimes Axe just doesn't like Copy()

I'll try to look at it again later if I have time. One other thing could be the !If L-C+1 thing; what does that do? also i don't remember how axe deals with the for loop arguments: it could be that changing c within the loop could screw with it somehow
« Last Edit: August 24, 2011, 11:42:10 am by squidgetx »

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55872
  • Rating: +3151/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: Blaster Master!
« Reply #54 on: August 25, 2011, 08:42:39 am »
I'm glad this is alive again. I hope you get the issues sorted out!

Offline Vaxquine

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +0/-0
    • View Profile
Re: Blaster Master!
« Reply #55 on: August 25, 2011, 08:53:28 am »
This looks awesome.

Offline GreenFreak

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 191
  • Rating: +16/-1
    • View Profile
Re: Blaster Master!
« Reply #56 on: August 25, 2011, 08:56:40 am »
A new member! :D
Welcome here at omniamaga ;)

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Blaster Master!
« Reply #57 on: August 25, 2011, 09:33:12 am »
Welcome. And I just noticed this topic...O.o
Looks great XD
Sig wipe!

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55872
  • Rating: +3151/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: Blaster Master!
« Reply #58 on: August 25, 2011, 11:13:37 pm »
Welcome Vaxquine :D

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Blaster Master!
« Reply #59 on: August 26, 2011, 03:21:55 pm »
* Runer112 found the problems!

The first problem is the !If L-C-1 line. The fact that you typoed and actually meant !If L-C+1 is a problem, but not the main problem. The main problem is that you don't want the ! in front of the If.

The second problem is that, if a bullet is removed, the last bullet in the list is then moved into its place. But because the for loop just finished with that position in the bullet array, it moves to the next element, skipping the updating and drawing of the bullet that took the deleted bullet's place. To remedy this, tag on an L-- to go along with the C-- in the bullet removal code.


EDIT: Also, these aren't actually problems, but some of this code is unnecessary and could be simply be omitted. Want me to point out what pieces of code could be removed?
« Last Edit: August 26, 2011, 03:24:57 pm by Runer112 »