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.


Messages - Builderboy

Pages: 1 ... 24 25 [26] 27 28 ... 375
376
Axe / Re: Axe Physics (Thanks ephan!)
« on: February 29, 2012, 10:26:54 pm »
I modified leafy's code such that it hopefully now works.
*Builderboy runs*

Code: [Select]
:.ACCELL
:44*256→X
:28*256→Y
:0→A→B
:
:Repeat getKey(15)
:Pt-On({°X+1},{°Y+1},[FFFFFFFFFFFFFFFF])
:getKey(3)-getKey(2)*10+A→A
:
:If getKey(54)
:B-32→B
:End
:
:!If getKey(2)
:!If getKey(3)
:A//2→A
:End:End
:
:X+A→X
:B+6→B+Y→Y

:If X>22528
:X-A→X
:0→A
:End
:
:
:If Y>14336
:Y-B→Y
:0→B
:End
:
:DispGraphClrDraw
:End

377
Axe / Re: Axe Physics (Thanks ephan!)
« on: February 29, 2012, 09:41:20 pm »
Actually Quigibo's code is a bit redundant, you can just do

Code: [Select]
Y>56?56→Y
X>88?88→X

But since your code is inflated by 256, you want to multiply each of those constants by 256.  The ? Operator works like this:  Given A?B, B will only be executed if A evaluates to be true.  It's basically a more compact way of saying If A:B

378
Axe / Re: Axe Physics (Thanks ephan!)
« on: February 29, 2012, 08:54:58 pm »
Butts, A is X velocity, you would want to accelerate the Y velocity, so you would use the B variable.  As for going off the screen, did you try Quigibo's code?

379
TI Z80 / Core Wars
« on: February 28, 2012, 11:29:22 pm »
   A few days ago a friend in my math class introduced me to the game Core Wars, and I immediately decided to port it to the calculator!  Core Wars is a two player competitive game, featuring a unique type of gameplay.  The two contestants must each write a program in Redcode, which is the programming language of the Core.  Each program is then inserted into a section of memory called the Core.  If either program stops executing, that player loses.  Of course it is simple to make a program that never terminates when left on its own, the tricky part is that both programs live in the same memory (the Core) and so can influence each other.  The programs must try to find their opposing program and sabotage and destroy it in order to halt it's execution.  It's the greatest battle of a programmers ingenuity, as they pit their own programs to destroy others in The Core!

Redcode:
   The programming language of The Core is called RedCode, and is like a simplified version of assembly.  There are only 18 possible instructions, but many different modifiers that make each instruction powerful.  The instructions are formatted in a very specific way that is consistant for all instructions:

Code: [Select]
NAME A B
NAME is the name of the instruction.  The name also indicates the type of instruction, and what it does.  The A and B field both hold numbers, and in general data passes from the A field into the B field.  The instructions are specifically:

Code: [Select]
DAT: If any process tries to execute a DAT command, that process is killed.  A and B field can be used to hold data.
MOV: Moves data from A into B
ADD: Adds A to B and stores the result into B
SUB: Subtracts A from B and stores the result into B
MUL: Multiplies A and B and stores the result into B
DIV: Divides B by A and stores the result into B
MOD: Divides B by A and stores the remainder into B
JMP: Moves program execution to location A (B is ignored)
JMZ: Jumps to location A if B is zero
JMN: Humps to location A if B is not zero
DJN: Decreases B and jumps to A if B is not zero
SPL: Starts a new process at location A
SEQ: Skips the next instruction if A and B are equal
SNE: Skips the next instruction if A and B are not equal
SLT: Skips the next instruction if A is less than B
NOP: Does nothing, guess you could use this to hold data as well.

There is more than these instructions, and A/B than is just told here, and there are some good tutorials that I will LINK to in order to help keep this post shorter, and to probably help better explain as well. 

One element I do want to cover though is the SPL instruction.  It says that it creates another process at location A, but what does that mean?  Processes in Redcode are handled a very specific way.  If you have two processes, each process will run twice as slow as if you only had one process.  In other words, creating new processes does not give you any more computing power.  If you had 3 processes and your opponent only has 1, then execution might look something like this:

Code: [Select]
Player 1 Process 1
Player 2 Process 1
Player 1 Process 2
Player 2 Process 1
Player 1 Process 3
Player 2 Process 1

As you can see, Player 2 was able to execute 3 instructions in his one process, while each of your processes were only able to execute a single instruction.

Conclusion/Plans:
  Now the game hasn't been completed yet, but I do have the majority of the instructions implemented, as well as an assembler and a working interpreter.  I will be updating the tutorial part of this thread as time goes on, but in the meantime feel free to visit This tutorial as well.  The syntax is slightly different since we don't have access to the same characters as they do, but I will be posting more on syntax in the future.  For now I will leave you with this screenie of what the game screen will look like!  It features the two program's names, as well as showing how many processes they currently have.  The square in the center is a visual representation of the Core, and shows how the programs move through and modify memory.  The two other squares are each programs private memory areas.


380
The Axe Parser Project / Re: Bug Reports
« on: February 28, 2012, 09:58:53 pm »

Not if subroutine uses HL itself like so:
Code: [Select]
Lbl B
->C
Return

381
Portal X / Re: Portal Prelude
« on: February 28, 2012, 12:32:43 pm »
A good amount is finished, but the next release will be a full one, i just haven't been working on this as much recently. 

382
Portal X / Re: Portal Prelude
« on: February 28, 2012, 12:15:07 pm »
Even if you had 100 posts you still wouldn't be able to download it because it was only distributed to about 8 people privately.  There is a very old demo that was posted around a year ago though, do you mean that one?

383
Are you running the newest version on wabbit?  If not, that might be the problem, but if so, try to generate a ROM using the open-source option, maybe it's possible your ROM's somehow got corrupted? o.O

384
TI Z80 / Re: Fullrene
« on: February 25, 2012, 10:31:47 pm »
Hmm ThePenguin probably should work directly with Buckeye to find out why it doesn't work for some people.

385
TI Z80 / Re: Fullrene
« on: February 25, 2012, 10:16:52 pm »
Shouldn't that be the other way around?  If it works on the calculator, it should work on the emulator.  If it doesn't, I would think it would be a feature request for the emulator instead of the program, since the emulator is the one that is not working properly.

386
Gaming Discussion / Re: Adverputt
« on: February 25, 2012, 12:57:24 pm »
We should have an omnimaga microputt :D

387
Gaming Discussion / Re: Adverputt
« on: February 25, 2012, 04:28:18 am »
I need to try again and post my best score ^^ There is also a game version called WonderPutt that is similar

388
TI Z80 / Re: [AXE LIB] YAAM - Yet Another Axe Mapper
« on: February 24, 2012, 01:54:46 pm »
Idea: Add Animated tilemaps (like water in your map)

The whole concept of Runers tilemapper is that it doesn't have to redraw the entire screen every frame, and doesn't even do anything if the screen isn't moving.  If you had animated tiles, you might as well just use a regular tilemapper and redraw the entire screen each frame. 

EDIT" Double Ninja'd D:

389
Math and Science / Re: Why doesn't zero divided by zero work
« on: February 24, 2012, 01:12:44 am »
The interesting thing is when you start working with limits.  Lets say you have two equations that both equal zero at X=1, and lets say we divide one equation by the other.  If we find the ratio at X=1, obviously that is undefined.  But if we get reeeeallly close to X=1 (take the limit as X->1) the ratio can actually approach any number!  Depending on the equation of course, I once devised an equation that was undefined at X=0, but the limit approached 42 :D

390
Math and Science / Re: Why doesn't zero divided by zero work
« on: February 23, 2012, 01:00:57 pm »
Because 0/# should always be zero, but #/0 should always approach infinity.  It's very undefined.

Pages: 1 ... 24 25 [26] 27 28 ... 375