Author Topic: xy  (Read 19451 times)

0 Members and 1 Guest are viewing this topic.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: xy
« Reply #45 on: May 01, 2011, 04:04:16 pm »
It's the keyboard hardware. Reference the table here: http://wikiti.brandonw.net/index.php?title=83Plus:Ports:01
If three keys are three corners of a rectangle, the hardware will also report the fourth corner as pressed.
So you'll have to be careful with key combos :/
Also, I'm going to read the topic now and comment on it :)
"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 Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: xy
« Reply #46 on: May 01, 2011, 04:06:54 pm »
That is weird.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: xy
« Reply #47 on: May 01, 2011, 05:12:26 pm »
Yeah, the calc has issues registering different keys. i remember in my old version of Graviter the enter key corresponded to down arrow somehow :P It's also why I can never be good at geowars
In-progress: Graviter (...)

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: xy
« Reply #48 on: May 02, 2011, 07:45:38 pm »
I HAVE A COLLISION ENGINE!
Ok. The ball size has changed (diameter is now 1 instead of 8 ) (the ball has a train behind so you can see it, don't worry)
Hold down * to leave a trail behind (which it bounces off of) hold down - to leave dots behind (which it also bounces off of) press / to clear remove all the dots and lines on your screen.
I think I've worked all all the bugs in the collision detection except one:
It falls through things when it stops moving.
I can't figure out why it's still doing this, so any help on working out this last kink will be the thing that finally gets xy off the ground.

GO! Download it now!
http://ourl.ca/10519/205534
« Last Edit: May 06, 2011, 12:29:04 am by Freyaday »
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline ralphdspam

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 841
  • Rating: +38/-1
  • My name is actually Matt.
    • View Profile
Re: xy
« Reply #49 on: May 02, 2011, 09:36:12 pm »
Wow!  This engine looks nice.  :)

It still freezes in DCS if you run the nostub version of the program.  If I compile it for Mirage, it works fine in DCS, though.
« Last Edit: May 02, 2011, 09:40:44 pm by ralphdspam »
ld a, 0
ld a, a

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: xy
« Reply #50 on: May 02, 2011, 09:38:12 pm »
Meh, Shells.
* Freyaday only likes the pasta version.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: xy
« Reply #51 on: May 05, 2011, 10:49:24 am »
I've got the physics engine down, and am now working on gameplay.
Just so y'all don't get bored, here's the intro letter to xy.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: xy
« Reply #52 on: May 06, 2011, 12:28:04 am »
I've finally gotten access to a computer with TI-Connect, so here y'all go: The latest edition of xy.
xy now starts off with a 2 pixel (state) boarder; It has trouble with single pixel ones.
Hold Window to show the odometer
Hold Trace to generate some random Inverse rectangles. I've made some pretty awesome mazes with it.
Math shows the current direction of movement
5 now does nothing.
Zeroing out gravity is now mapped to 0
hold down ^ to not display the first tail
Hold down + to lengthen the tail
Hold Zoom to pause things and grey out the ball and its tail. xy resumes when you release the button.
If anyone can figure out why it's still falling into things and can come up with a fix for it, please share. Please!
If the ball falls into something, start pressing some of the gravity-directing buttons
If you've tried all eight directions and the ball hasn't fallen out yet, press / to clear all filled states or hold Zoom long enough that it empties the states the ball is trapped in.
Let me know what you think, Please!

EDIT: New Line check algorithm! Let me know what you think of it!
EDIT 2:
+ now makes it faster
the buttons from STO to x2 control the length of the tail
Press ( to make a circle with diameter proportionate to speed
Press cos to make the same thing, but centered differently
Press STAT to leave behind a trail of these kinds of circles
- does something interesting
* now copies all things currently produced by the ball
The locater is different: the ball is now the only thing that is black
APPS Inverts which states are filled and which aren't
DEL warps the ball to a random location

EDIT 3:
The arrow keys now cancel out gravity in the perpendicular direction. Hold VARS TAN to stop them from doing so
I changed the way - works

EDIT 4:
I fixed a typo in Edit three; It's the TAN key, not the VARS key. orz
I changed what COS does
I've made the code smaller (Finally!)
I changed the ending screen, as I now plan to distribute the thing around school to give people a taste of what'll be coming in the future (And impress math teachers. They seem to like this stuff for some reason)

It's crunch time people, get your suggestions/complaints/optimizations in now or forever hold your peace, because once I'm done with the engine, I'm moving on to enemies, and I ain't looking back
EDIT 5:
I fixed a bug
I added a frame counter. Press X,T,theta,n to show the current frame count in the top right corner. Let me know what you think of it, because I'm kinda meh on it. Note that the frame counter is only 16-bit, unlike the odometer. I worked it out, and if you see the thing roll over, put the calc down and detox; you've been playing on a calculator for over half an hour :P
EDIT 6:
I fixed two bugs
I added a frames-in-motion counter (SIN)
I removed the inverse rectangles
It's smaller
The frame is smaller
EDIT 7:
New line drawing options--VARS and MODE
) sends an invisible shockwave from the center to the ball
The full tails are now one longer (Includes the circle train)
Ignore the comments at the beginning, they're old I updated them.
The train lengthener now goes down to ON
EDIT 8:
I forget what all I've changed, but it's new. Download it now!
« Last Edit: June 14, 2011, 02:44:18 pm by Freyaday »
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: xy
« Reply #53 on: May 06, 2011, 07:27:36 am »
In WabbitEmu [ZOOM] just makes a bunch of inverting rectangles randomly all over the screen...
There's something about Tuesday...


Pushpins 'n' stuff...


Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: xy
« Reply #54 on: May 06, 2011, 09:26:35 am »
That's what it's supposed to do. Hold it down long enough and you get a mess that makes a pretty good maze.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: xy
« Reply #55 on: May 06, 2011, 09:27:07 am »
Ah, I see. Well...when I did it it ended up drawing over the ball, so nothing was there to move at all :\
There's something about Tuesday...


Pushpins 'n' stuff...


Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: xy
« Reply #56 on: May 06, 2011, 09:28:31 am »
Then hold it down longer so it undraws over the ball or press /
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: xy
« Reply #57 on: May 09, 2011, 01:18:28 am »
I think you wanted a line-checking algorithm?

This isn't probably the fastest one around, but it works.
I used a variant of algorithm in one of my games, Light (which is dormant) to check for pixel collisions along a line.  You should probably tweak this to suit your needs, especially when it returns the coordinates, which I didn't fill out.

It's untested, but should work?  If it doesn't, I have another variant of this in the Routines thread (except it draws lines, instead of returning coordinates): http://ourl.ca/4129/138496
I know THAT one works :)

Code: [Select]
.LINE
ClrDraw
50->A->B
2->L

Repeat getKey(15)
  If getKey
    getKey(3)-getKey(2)+A->A
    getKey(1)-getKey(4)+B->B
    getKey(10)-getKey(11)+L->L
    L=0+L->L
    sub(LIN,30,30,A,B,L)    //r1 and r2 are the x and y coordinates of the starting point - it radiates out to (r3,r4).
  End
  DispGraph
End
Return

Lbl LIN
  If abs(r4-r2)>abs(r3-r1)
    Exch(°r1,°r2,2)
    Exch(°r3,°r2,2)
  End
  r1>r3->K
  abs(r3-r1)->S/2->V
  abs(r4-r2)->T
  r2->Y<r4*2-1->W
  For(Z,0,abs(r3-r1))
    Z->X
    If K
      -X->X
    End
    If U
      If Pxl-Test(Y,X+r1)
        Return // Coordinates
      End
    Else
      If Pxl-Test(X+r1,Y)
        Return // Coordinates
      End
    End
    1->I
    While I
      I-1->I
      If V-T->V>99
        Y+W->Y
        V+S->V
      End
    End
    DispGraph  //DispGraph and Pause are added to show how the line radiates outwards
    Pause 50
  End
Return
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 Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: xy
« Reply #58 on: May 09, 2011, 07:24:03 am »
First of all, I'm always so surprised at Michael Lee's code, so organized and perfectly indented, really great.

Concerning the updates, @Freyaday: Looking great, any predictions on enemies yet?

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: xy
« Reply #59 on: May 09, 2011, 08:44:50 am »
Scout: not yet. I'd like to perfect the engine before I put anything new in it.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!