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.


Topics - leafy

Pages: 1 [2] 3 4 5
16
TI Z80 / LightsOff
« on: November 03, 2011, 12:11:47 am »
So I saw that Xeda was working on the same thing, so I thought I'd post my version :P



It's far from done but still fairly impressive in my opinion ^^

17
Art / Amorphous Blob
« on: September 26, 2011, 09:21:09 pm »
Hi guys! I need help. Being the horrible artist that I am, I need someone to sprite a looping series of 8x8 blobs that can loop for any power of 2 number of frames. The blob should kinda undulate and rotate and loop perfectly.

Example:


18
TI Z80 / The Countdown
« on: September 09, 2011, 02:26:51 am »
Fool your friends! :P

Press up to quit, then turn up the contrast to fix.


19
Miscellaneous / Short Leave
« on: August 06, 2011, 02:30:54 pm »
I have a 1 week orchestra with no net so yeah. I'll be back ^^

20
Art / Sprite Resizing
« on: July 29, 2011, 08:39:29 pm »
Can someone help me resize this sprite sheet to 16x16 for each view of the character? 4-shade greyscale would be good.
Thanks in advance!


21
Axe / Particular Explosion Tutorial
« on: July 29, 2011, 02:14:08 pm »
So some of you might be wondering - how do I make those awesome particle explosions I've seen in games like Stick Ninja, Tag, and Graviter? Although it might seem a bit daunting, they're actually really simple to create.



First of all, let’s start out with some pseudocode so it’s easier to understand what we’re about to do. We’re going to want to store each particle as part of a larger array, and loop through the array to update and draw these particles. The particles will be affected by gravity and collisions with other pixels.

This method is similar, but not exactly like cellular automata. First of all, we’re not going to want any of our particles to interact with each other, because they’ll end up colliding where we don’t want them to and that could be painful.

Let’s start out with some container code:

Code: [Select]
Repeat getKey(15)

End

Awesome. We just finished the most important part - a way to get out of the program. Give yourself a pat on the back!

But we’re not done yet - we still have to make that particle code. In this tutorial we’ll be using L1, which is 714 bytes. You can use other sections of free ram or even appvars, but we’re not going to be going there.

Let’s first list out all the attributes of each particle:
x-position: 2 bytes (inflated by 256)
y-position: 2 bytes (inflated by 256)
x-velocity: 2 bytes (signed)
y-velocity: 2 bytes (signed)

So each particle will take up 8 bytes. The maximum number of particles L1 can support will then be 714/8=89, but we’ll go with 80 just to be safe. If you want your explosion to be faster, you can decrease the number of particles or use Full.

NOTES: {r} is the superscript r, located in Angle (2nd+Apps)

Code: [Select]
Repeat getKey(15) //Our container code. Keeps repeating until user hits Clear
For(r1,0,79) //Loops through all 80 particles
r1*8+L1->r6 //Stores a pointer to the position of the particle in the array to r6
{r6}{r}+{r6+4}{r}->{r6}{r} //Increments the x-position by the x-velocity
{r6+6}{r}+4->{r6+6}{r} //Increments the y-velocity due to gravity. I find 4 to be a nice number.
{r6+2}{r}+{r6+6}{r}->{r6+2}{r} //Increments the y-position by the y-velocity
Pxl-On({r6}{r}/256,{r6+2}{r}/256) //Draws the pixel
End
DispGraphClrDraw //Displays the screen when all the pixels have been drawn and clears the screen so that the next set of updated particles can be drawn.
End

Awesome. Now we have code that can update and draw pixels. But there’s one problem - we haven’t set the inital values for these particles!

Code: [Select]
For(r1,0,79)
r1*8+L1->r6
12288->{r6}{r} //Sets the initial x-position of the particles to 48 (inflated by 256)
12288->{r6+2}{r} //Sets the initial y-pos to 48
rand^300-150->{r6+4}{r} //Sets the x-velocity to a random number between -150 and 150 (no bias)
rand^300-325->{r6+6}{r} //Sets the y-velocity to a random number between-325 and -25 (biased upwards)
End

To put it all together,

Code: [Select]
For(r1,0,79)
r1*8+L1->r6
12288->{r6}{r}
12288->{r6+2}{r}rand^300-150->{r6+4}{r}
rand^300-325->{r6+6}{r}
End
Repeat getKey(15)
For(r1,0,79)
r1*8+L1->r6
{r6}{r}+{r6+4}{r}->{r6}{r}
{r6+6}{r}+4->{r6+6}{r}
{r6+2}{r}+{r6+6}{r}->{r6+2}{r}
Pxl-On({r6}{r}/256,{r6+2}{r}/256)
End
DispGraphClrDraw
End

Just type that all in and you’re all ready to go! Keep in mind that this code can be adapted for a wide variety of purposes. For example, by adding a z-position and z-velocity as well as collision checks, you can make a 3d-looking explosion:



So the possibilities are endless ^^


Minor Optimizations:
Code: [Select]
For(r1,0,79)
12288->{r1*8+L1->r6}{r}
12288->{r6+2}{r}
rand^300-150->{r6+4}{r}
rand^300-325->{r6+6}{r}
End
Repeat getKey(15)
For(r1,0,79)
{r1*8+L1->r6+6}{r}+4->{r6+6}{r}
Pxl-On({r6}{r}+{r6+4}{r}->{r6}{r}
/256,{r6+2}{r}+{r6+6}{r}->{r6+2}{r}/256)
End
DispGraphClrDraw
End


22
Other Calculators / Tag
« on: July 24, 2011, 08:41:22 pm »
Tag



http://www.omnimaga.org/index.php?action=downloads;sa=view;down=708

Tag is a 2D puzzle platformer based off of the famous game Tag: The Power of Paint for the TI-83 series of calculators. It features 24 original levels with a fully-functional physics-based environment, along with creative and challenging gameplay. This game was written for the Omnimaga Axe parser contest.
----------------------------------------------------------------------------
Build 1.0.0 - 07/14/11

23
TI Z80 / Nyan Cat
« on: July 24, 2011, 01:49:15 am »


How long can you nyan? Massive thanks to runer112!

24
Art / My Pics
« on: July 22, 2011, 12:41:58 am »
I do photoshop/photography work from time to time so I thought why not, I'll stick my stuff here.

Spoiler For An LED from my lab:


Spoiler For A picture taken from Mission Peak:


Spoiler For The same picture, but modified >:):


25
Graviter / Source Code
« on: June 28, 2011, 07:46:25 pm »
I realized that some of the code is not really mine to keep, so in the interest of helping out the community I'm going to start releasing snippets of code as I finish them.

If I have time I'll comment it out.

Menu code (Thanks runer!):
Code: (Menu code) [Select]
:..
:ref(0,,-1,)
:{T}→C
:3-43-10
:While 1
:+43+10→B
:1-85-12
:While 1
:+85+12→A
:Pt-Change(,B,C-1→C//32768*8+8+Pic00M)
:!If C//32768
:Text({ºB-1}{^r}+A+2)
:DrawF {55*12+{L6}}{^r}+1→{55*12+{L6}}{^r}+1►Dec
:End
:End!If A-85
:End!If B-43
:→A→B→D
:conj({L6},{L1},55*12)
:16896→C
:{-}960→E
:26→M

:Lbl LM
:conj(GDB01M,{L3},768)
:While 1
:conj(GDB00M,{L6},768)
:getKey→K
:!If -1
:If M-44
:+44+9→M
:End
:End
:!If +1-4
:If M-26
:+26-9→M
:End
:End
:sub(MSR)
:!If K-54
:Goto MS
:End
:!If +54-9
:.Menu selected
:Lbl MS
:!If M-26
:Goto NW
:End
:!If -9
:Goto LD
:End
:Goto QT
:End
:!If +9-15
:Goto QT
:End
:sub(DL1)
:sub(MSR)
:End
:Lbl NW
:While 1
:getKey
:!If -1
:If B-4
:+4+1→B
:-256
:End
:End
:!If +1-2
:If A
:-1→A
:-256
:End
:End
:!If +2-3
:If A-7
:+7+1→A
:-256
:End
:End
:!If +3-4
:If B
:-1→B
:-256
:End
:End
:!If +4-54
:Goto LS
:End
:!If +54-9
:Lbl LS
:If {T}>(B*8+A→F)
:!If GetCalc(Str01M)
:GetCalc(Str01M,1)
:End
:→S
:F+1→{S}
:Goto LL
:End
:End
:!If +9-15
:Goto LM
:End
:sub(DL2)
:End
:Lbl LD
:!If GetCalc(Str01M)→S
:sub(MS,Str02M)
:While 1
:sub(DGR)
:EndIf getKey
:Goto LM
:Else
:Goto LL
:End

:.Display levels 1
:Lbl DL1
:Lbl DL1
:!If E+960
:Goto DGR
:End
:C-E→C
:E-32→E
:Goto DL
:
:.Display levels 2
:Lbl DL2
:If E
:+32→E
:+C→C
:End
:
:.Display levels
:Lbl DL
:If +960
:conj({L1},{ºC+1}{^r}*12→F-24+{L6},66*12-F)
:End
:Text({ºC+1}{^r}-9+{E}0300)
:DrawF Str03M
:sub(DRI,A*12,B*10real(ºA+1)+Creal(ºA-1),11,-1)
:sub(DGR)
:Goto DRI
:
:.Menu selection rectangle
:Lbl MSR
:sub(DRI,5,M,30,10)
:Return

26
Axe / Object-Based Physics Platformer Guide
« on: June 14, 2011, 02:23:02 am »
Object Based Physics Platformer Tutorial
Hey guys, it occurred to me to write a tutorial about how to make an object-based system with real physics, to be used in platformers. This tutorial will cover objects, tilemapping, moving a player character, and forces interacting with objects.

NOTE: IT'S HIGHLY LIKELY I FARKED SOMETHING UP. PLEASE TELL ME IF I DID.

Part 0: Thinking
Before you dive right in, think. What is your platformer going to feature? How is it going to be unique? What makes it stand out? Nobody wants another crap platformer claiming to be the best thing since sliced bread. Great places to start are flash games - some can be really unique and give you great ideas.

Next, start planning. Greyscale or not? How are you going to allocate your variables? Simple things like these will make a huge difference in the long run. Making sure you plan properly will save you a lot of rewrites in the future.

Part 1: The Real World
So what exactly happens in the real world? Things in the real world have three important attributes to determine their position: Their position, their velocity, and their acceleration. Acceleration is a constant value that changes the velocity by a set amount for a given amount of time. On Earth, this value is 9.8 meters per second squared. This means that for every second that passes, your velocity (in free fall) increases by 9.8 meters per second. Your velocity then increases your position, by an increasing amount each time.

Position   Velocity   Time
0      0      0
9.8      9.8      1
29.4      19.6      2
58.8      29.4      3
…      …      …

That’s good and all, but how do we apply this to a platformer?

Part 2: Inflation (The Good Kind)
Axe has a problem - that is, it doesn’t calculate decimals. So if we try to use whole-pixel acceleration values, stuff will fall way to fast for the player’s reflexes to kick in. How do we prevent this? We inflate all the position values by 256 (or some other large number, but 256 is the most optimized for Axe. I think.) What does this mean? Basically, if a position value is, say, the 56th pixel on the screen, we inflate the position value to 56*256, then divide out 256 later on. This allows us to calculate non-integral acceleration values, which is very useful in Axe.

Part 3: Object Systems
First of all, the code below will not be optimized for tutorial purposes to make it easier to understand. For more optimized code on arrays check out Deep Thought’s tutorial:
http://clrhome.co.cc/tutorials/arrays/

So let’s start! We first need a routine to set the number of objects to zero.

Code: (INITIALIZE) [Select]
Lbl IN
0→O
Return

This is vital because if you don’t do this, you might end up with a For( loop that will last for a while. And you don’t want to have to pull your batteries. Next, we need a routine that will add objects.
All objects have a certain number of attributes. It’s always good to plan out what attributes your object will have before actually creating this routine. In this case, our objects will have 5 attributes: x position, y position, x velocity, y velocity, and size. You can add others as you see fit; in Graviter, I added attributes for gravity direction, gravity lock, and whether or not the object is held or independent. Tag had just a held attribute. Since this is just a basic tutorial, we’ll go with the basics.
In regards to size, we’re going to assume all objects are square boxes. You might have to get creative with spriting, but it saves us space and coding in the long run. You can make the height and length different in the future, but this tutorial won’t cover that.

Code: (ADD OBJECT) [Select]
Lbl AO
O+1→O*10-10+L₁→r6 //This line helps us not have to keep writing O*10-10+L₁ over and over again.
r1*256→{r6}r //The r after {r6} is the superscript r, located under angle (2nd+Apps).
r2*256→{r6+2}r
0→{r6+4}r
0→{r6+6}r
r3*256→{r6+8}r
Return

Notes: r1 is initial x position, r2 is initial y position, and r3 is size.
We use the superscript r to write to two bytes. This lets us go up to 65536 instead of 256 for just one byte. If you don’t get that, don’t worry.


Optimized using Deep Thought’s method, it would look like:

Code: (ADD OBJECT) [Select]
Lbl AO
r3*256→{0→{0→{r2*256→{r1*256→{O+1→O*5-5+L₁}r+1}r+1}r+1}r+1}r
Return

So. We have a routine to add objects. Now, we’re going to update them, in a glorious shower of awesomeness. Before we start, however, there’s something I should point out. There are a lot of ways to do hit detection. Depending on how your game is going to be run, you’ll want to choose one to suit your needs. If you want some tiles to be solid graphically but not detectable to the object, you’ll want to go with pointer or byte-masking detection. One of the fastest and easiest ways, however, is pixel detection. That’s what I’m going to demonstrate in this tutorial, and I’ll attach some additional code explaining the other methods.

Pixel detection does have some drawbacks, however. For example, it is difficult (though not impossible) to have tiles that are graphically solid.

We will now create the subroutine that will cause all the objects to become affected downwards by gravity.

Code: (UPDATE OBJECT) [Select]
Lbl UO
For(r5,1,O)
r5*10+L₁→r6
{r6+6}r+1→{r6+6}r //Increments the velocity by 1 for every frame. Inflated by 256, +1 for the velocity is kinda slow. I’d go with 4 or 5.
{r6+2}r+{r6+6}r→{r6+2}r //Adds the velocity to the positional value
End
Return

Alrightttt! Wasn’t that simple. If you run this code (Which I don’t recommend) it won’t look like it’s doing anything. Which is because we still need the main program, which will call all the subroutines in the order we want them.

We’re going to want something in the following order: Generate a map, initialize values, then have the code where the game is running. Something like:

Code: (PSEUDOCODE LAYOUT) [Select]
sub(MAP)
sub(IN)
While 1
//Run game code, e.g. sub(UO),etc
End

27
Axe / Fake Ram Clear Placement
« on: June 04, 2011, 12:51:40 pm »
Hey guys, does anybody know the relative placements and sizes of text for the ram clear screen on 2.55MP? Thanks in advance ^^

28
Art / Paint Splatters
« on: June 01, 2011, 01:22:31 am »
Can anyone here sprite some 8x8 paint splatters for me? A variety would be nice. Thanks in advance!

29
TI Z80 / Tag
« on: May 25, 2011, 06:13:34 pm »
Tag
You have a paint gun. When you shoot paint, it hits blocks. The blocks then change attributes. Each attribute will contribute in some way to finishing puzzles.

This game is part of the Spring Coding Competition, and is written in 15MHz Axe.

Controls
Fire paint: Directions determined by keys forming a circle around the XT0n key
Move: Arrow keys
Switch paint color: +/-
Pick up/put down objects: Enter
Quit: Clear

Screenshots


Bounce paint demo


Demo puzzle involving speed and bounce paints


Demonstrating objects, switches, and doors interacting with paints.

And...more difficult puzzles! Solution to this one is very cool, but I don't show it to avoid spoilers. Demonstrates new blood splatter and non-paintable tiles. (The goal is at the top left.)



Demonstrating movable walls.


A veja du menu appears.


Launchers. Clearly they are nothing like aerial faith plates.

30
TI Z80 / Bipolar
« on: May 18, 2011, 05:46:37 pm »
Hey guys, due to time constraints I decided that making vortex wasnt going to be a viable option. So I came up with another concept that worked out quite nicely. It will still involve physics based puzzles (not as much as graviter, perhaps), but still enough to keep people thinking.

I'll hash out the details on here later as well as a screenshot, but I need to go soon, so yeah.

Pages: 1 [2] 3 4 5