...This prog uses a total amount of 145 bytes and I already cut out the initial screen, as every byte counts!
=> A minimum of
145 bytes (program code)
+ 10 bytes (used memory for variables)
+ 21 bytes (screen memory at 15x11 pixels)
= 166 bytes of shared memory.
Better get going with expanding the RAM!
...
As a revisit of BopMeExtreme's previous work, and the I/O instructions are still not clear, so in order to estimate the variables needed for a 2-player PONG game, I think the minimum require should be :
1.The position of the ball. Since the current screen design require 2-level indicators : pixel group, and pixels position in group, hence we need 2 bytes to store it.
2.The ball movement and speed. A more memory efficient design is to use 2 signed integer dx, dy. if dx/dy is positive it moves right/up, vise versa. And the value of dx, dy can determine the speed. (if not they will always be -1 or 1). The next ball position will be x+dx, y+dy, with some calculations it can be translated into the previous ball position variables. So we need 4 bytes to store x, y, dx, dy. (With a complex if-then-else nests we can use only dx, and dy (2 bytes), but current branch instructions require a lot more memory)
3.Pad positions. 2 plays means 2 positions. (1 on top/right and 1 on bottom/left). if the length of the pad is fixed, we only need 2 bytes, otherwise we need 4 bytes. A good and easy way to do a fixed length pad is to set them as the character width = 4. Also the bat can jump in the increment of 4, instead of 1. In this case we only need to check the 1st byte of ball position and increase the difficulty to hit the ball with the pad.
4.Input buffer. In the case of a separated I/O memory design, with mediate memory buffer support, we can eliminate them. But in the case of shared memory they will require 2 bytes.
5.Player scores. No game can be called a game without the competitions. Hence we need 2 bytes to record the score of each player.
6.Flags. there is always a need to start or stop, or even pause the game. hence at least a 1 byte flag variable is required. (like 0=stop, 1=start, 2=pause, ... etc)
From above, we calculate the minimum requirement is 2+2+2+0+2+1 = 9 bytes, maximum is 2+4+4+2+2+1 = 15 bytes. All within the current limitation. Hence the question remain is how big the program itself will be?
This would be awesome when it excepts java since i could donate my code to play rock, paper scissors or guessing game, or other things. and of course play minecraft in minecraft
Rollback Post to RevisionRollBack
Quote from ThoughtWolf »
Quote from Eion_Kilant_739 »
...that would be a waste of time!
Says the guy making random **** out of square shapes in a computer program designed to waste time while asking for things to do in said program on a related forum board.
Since more and more people asked what this CPU can do, I think it would be great to demonstrate the "first computer program" using the "first minecraft computer"!!!
; The world first program on Babbage's Differential Engine
; Calculate x^2+x+41 to generate 15 prime numbers
LOADi 29 ; 0x29 = 41 the first prime number
ADDi 00 ; add first differential
STOREm 01; write back
OUT 00
LOADm 03 ; load first differential
ADDi 02 ; add second differential
STOREm 03; write back
BRA (0F)
Technically this "program" was not running by a "computer", since Charles Babbage's Differential Engine is more like a calculator. But it contains all the basic elements of a computer program - Algorithmic operations(Mill), Memory storage(Axis and Wheels), and looping(a continuous rolling handle). You may say it's a not so "soft" "software".
Calculating the first 30 values of this program was demonstrated by Babbage in 1822. (That's right nearly 200 years ago!) The results was published on Brewster's Journal of Science, titled "On the Theoretical Principles of the Machinery for Calculating Tables". In order to operate the first prototype, you need to manually turn each wheels to input the initial values, then continuously crank the handle. And the results can be tabulated from the wheels. (Later type can print the result directly using a pressing table with lead)
The total calculate took 2 and a half minutes, hence the calculation speed is 12 operation per minutes, it is 5 seconds per result. And Babbage's never finished Analytical Engine, which in every sense is the world first computer, can calculate a 40 digits addition in 19 seconds. By this standard, its computation power is roughly the same as the first minecraft CPU.
This would be awesome when it excepts java since i could donate my code to play rock, paper scissors or guessing game, or other things. and of course play minecraft in minecraft
You will have to come up with a good random generator if you wanna to make the game Players vs Computers. Otherwise you will need to come up with a better keyboard design (I/O) for Players vs Players. (2 distinguished and separated Input, but a common output)
This would be awesome when it excepts java since i could donate my code to play rock, paper scissors or guessing game, or other things. and of course play minecraft in minecraft
You will have to come up with a good random generator if you wanna to make the game Players vs Computers. Otherwise you will need to come up with a better keyboard design (I/O) for Players vs Players. (2 distinguished and separated Input, but a common output)
Well the code for playing those games I already coded in school to go against the computer in java. the formula is (int)((highNumber-1+1)*Math.random() +1); to have the computer choose a random number with 1 being rock, 2 being scissors, and 3 being paper. But I don't belive I could design a better keyboard but you could by making 3 buttons each player and then have each one press one for that program when you install java on it. Have fun with that :smile.gif: :sad.gif:
edit To add to your computer triva the first computer bug was a dead moth hence the term a bug being bad
Add there's an easier way to build under water then the way you showed i belive, might I suggest building a "Bathtub" then just use at least 2 rows of gravel to empty it usig torches. It's time consuming but could be better then making air pockets
Rollback Post to RevisionRollBack
Quote from ThoughtWolf »
Quote from Eion_Kilant_739 »
...that would be a waste of time!
Says the guy making random **** out of square shapes in a computer program designed to waste time while asking for things to do in said program on a related forum board.
Add there's an easier way to build under water then the way you showed i belive, might I suggest building a "Bathtub" then just use at least 2 rows of gravel to empty it usig torches. It's time consuming but could be better then making air pockets
I built my underwater glass sphere by making it without water, then putting water all over it. I'm not sure that it's the best way though. :tongue.gif:
Well the code for playing those games I already coded in school to go against the computer in java. the formula is (int)((highNumber-1+1)*Math.random() +1); to have the computer choose a random number ...
The problem is always about how to "generate" the random numbers. It's one thing to invoke a function, and another to implement it. In a sense, the truly random generator doesn't exist yet. There is some ideas of using quantum mechanic to generate true random, but mostly theoretical.
The random generator we used now, is more like a sequence generator. If given a different starting numbers (the seed), than it will generate a series of numbers that "appears to be random". if the seed is the same, the sequence will be the same. Using a clever trick, that is setting the seed to be (Current_seconds_from_1970 % rand_base), and by recording a table of previous generated numbers, you will get a sequence that appears to be different every time it's started.
The way of generate such sequences is purely mathematics (Mostly statistics), and often requires a lot of division (mode) and multiplication. And that's not practical in current CPU design (takes too long to calculate). But there are other ways to . It essentially borrows the random generator from your computer to generate sequence for you. But it needs a lot of modifying before it can be integrated into current CPU design.
On the other hand, the problem of I/O is more of a design arrangement problem - How can 2 players interact without interfering each other. They need 2 sets of screen and keyboard? shared 1 screen and 1 keyboard? even the speed of detecting keyboard input needs to be considered. (The speed is measured in seconds instead of milliseconds.)
And although Java program can be small, but it requires VM, that is running a common library which borrows many programming codes that already written in the past 40 years by many. And we have barely started our minecraft programming from the scratch!
Quote from tyler212 »
edit To add to your computer triva the first computer bug was a dead moth hence the term a bug being bad
Although bacons are good, we consider pigs in minecraft are bad :Pig:. They are quite annoying (sheep and cow too). They can truly disrupt the building process, trigger pressure pads, occupying minecarts, causing real problems. Hence mostly I like to build on rocks(with rocks) and surround the building ground with high stone walls.
The way of generate such sequences is purely mathematics (Mostly statistics), and often requires a lot of division (mode) and multiplication. And that's not practical in current CPU design (takes too long to calculate). But there are other ways to . It essentially borrows the random generator from your computer to generate sequence for you. But it needs a lot of modifying before it can be integrated into current CPU design.
I should make one of those and give it a memory address, allowing easy access to random numbers. :tongue.gif:
Quote from counting »
Quote from tyler212 »
edit To add to your computer triva the first computer bug was a dead moth hence the term a bug being bad
Although bacons are good, we consider pigs in minecraft are bad :Pig:. They are quite annoying (sheep and cow too). They can truly disrupt the building process, trigger pressure pads, occupying minecarts, causing real problems. Hence mostly I like to build on rocks(with rocks) and surround the building ground with high stone walls.
Yeah, they're a real pain. most of my CPU doesn't have grass, but there are a couple of ares that do have a bit, and they seem to spawn there constantly and run everywhere. :S
I'm not a computing expert, but I wonder if there is a way to store pragrams on a storage section/facility, then use levers to choose what program to use. There could be a pong program and an adding program and a timer and a countdown program and a program that defents your castle automatically with TNT cannons and pressure plates and lava and a program that.........
I'm not a computing expert, but I wonder if there is a way to store pragrams on a storage section/facility, then use levers to choose what program to use. There could be a pong program and an adding program and a timer and a countdown program and a program that defents your castle automatically with TNT cannons and pressure plates and lava and a program that.........
You mean a filesystem? That's another level of storage, and often requires a OS. (That's part of the reason why OS is needed). But a giant lever ROM memory, can serve that purpose, the problem will be how to reference the memory without actual memory address. I guess the easist way of doing that is using memory PAGE. That is to divide the memory into severl pages, and each one has a certain among of memory size, each one share the same lower-memory address, but choosing different higher-memory address can give you access different PAGEs.
But A practical way of doing that in minecraft slow CPU, is simply using hardware with a multiplex to choose which "Memory Tower" to recieve programs, but the problem will be the delay, since a goup of "Memory Towers" will occupy a great among of space.
But A practical way of doing that in minecraft slow CPU, is simply using hardware with a multiplex to choose which "Memory Tower" to recieve programs, but the problem will be the delay, since a goup of "Memory Towers" will occupy a great among of space.
Yeah, the delay would be too much of a problem I think. It might be possible to save a block of memory with a program in it in MCEdit as a schematic though, so programs could be loaded like that.
Finally!!! And what's going on with the blog?? DNS error?
Yeah, it's taken a while. I'm not sure what's up with the blog. It seems to be a problem with DNS, but I haven't changed anything recently and I'm having trouble tracking down the exact problem. :S
... It seems to be a problem with DNS, but I haven't changed anything recently and I'm having trouble tracking down the exact problem. :S
Checking your DNS registration sponsors. (It's currently sponsored by GoDaddy.com?) Mostly it's their problems, or something to do with the money, but I found the domain name Created 15-Dec-2010, only expired till 15-Dec-2011. And the default DNS lserver NS01.DOMAINCONTROL.COM, NS02.DOMAINCONTROL.COM, reply query refused, it seems like these 2 lookup servers are broken (settings wrong), so if you paid an annual fee, you should definitely calling their customer service. (Although, $1.99 a year, I doubt it will be easy)
... It seems to be a problem with DNS, but I haven't changed anything recently and I'm having trouble tracking down the exact problem. :S
Checking your DNS registration sponsors. (It's currently sponsored by GoDaddy.com?) Mostly it's their problems, or something to do with the money, but I found the domain name Created 15-Dec-2010, only expired till 15-Dec-2011. And the default DNS lserver NS01.DOMAINCONTROL.COM, NS02.DOMAINCONTROL.COM, reply query refused, it seems like these 2 lookup servers are broken (settings wrong), so if you paid an annual fee, you should definitely calling their customer service. (Although, $1.99 a year, I doubt it will be easy)
Thanks, but it seems to be working now. I had emailed their customer support and received some generic responses that didn't help. It's annoying, but I suppose that's what I get for a $2 domain. :tongue.gif:
1.The position of the ball. Since the current screen design require 2-level indicators : pixel group, and pixels position in group, hence we need 2 bytes to store it.
2.The ball movement and speed. A more memory efficient design is to use 2 signed integer dx, dy. if dx/dy is positive it moves right/up, vise versa. And the value of dx, dy can determine the speed. (if not they will always be -1 or 1). The next ball position will be x+dx, y+dy, with some calculations it can be translated into the previous ball position variables. So we need 4 bytes to store x, y, dx, dy. (With a complex if-then-else nests we can use only dx, and dy (2 bytes), but current branch instructions require a lot more memory)
3.Pad positions. 2 plays means 2 positions. (1 on top/right and 1 on bottom/left). if the length of the pad is fixed, we only need 2 bytes, otherwise we need 4 bytes. A good and easy way to do a fixed length pad is to set them as the character width = 4. Also the bat can jump in the increment of 4, instead of 1. In this case we only need to check the 1st byte of ball position and increase the difficulty to hit the ball with the pad.
4.Input buffer. In the case of a separated I/O memory design, with mediate memory buffer support, we can eliminate them. But in the case of shared memory they will require 2 bytes.
5.Player scores. No game can be called a game without the competitions. Hence we need 2 bytes to record the score of each player.
6.Flags. there is always a need to start or stop, or even pause the game. hence at least a 1 byte flag variable is required. (like 0=stop, 1=start, 2=pause, ... etc)
From above, we calculate the minimum requirement is 2+2+2+0+2+1 = 9 bytes, maximum is 2+4+4+2+2+1 = 15 bytes. All within the current limitation. Hence the question remain is how big the program itself will be?
Technically this "program" was not running by a "computer", since Charles Babbage's Differential Engine is more like a calculator. But it contains all the basic elements of a computer program - Algorithmic operations(Mill), Memory storage(Axis and Wheels), and looping(a continuous rolling handle). You may say it's a not so "soft" "software".
Calculating the first 30 values of this program was demonstrated by Babbage in 1822. (That's right nearly 200 years ago!) The results was published on Brewster's Journal of Science, titled "On the Theoretical Principles of the Machinery for Calculating Tables". In order to operate the first prototype, you need to manually turn each wheels to input the initial values, then continuously crank the handle. And the results can be tabulated from the wheels. (Later type can print the result directly using a pressing table with lead)
The total calculate took 2 and a half minutes, hence the calculation speed is 12 operation per minutes, it is 5 seconds per result. And Babbage's never finished Analytical Engine, which in every sense is the world first computer, can calculate a 40 digits addition in 19 seconds. By this standard, its computation power is roughly the same as the first minecraft CPU.
You will have to come up with a good random generator if you wanna to make the game Players vs Computers. Otherwise you will need to come up with a better keyboard design (I/O) for Players vs Players. (2 distinguished and separated Input, but a common output)
Well the code for playing those games I already coded in school to go against the computer in java. the formula is (int)((highNumber-1+1)*Math.random() +1); to have the computer choose a random number with 1 being rock, 2 being scissors, and 3 being paper. But I don't belive I could design a better keyboard but you could by making 3 buttons each player and then have each one press one for that program when you install java on it. Have fun with that :smile.gif: :sad.gif:
edit To add to your computer triva the first computer bug was a dead moth hence the term a bug being bad
Add there's an easier way to build under water then the way you showed i belive, might I suggest building a "Bathtub" then just use at least 2 rows of gravel to empty it usig torches. It's time consuming but could be better then making air pockets
I built my underwater glass sphere by making it without water, then putting water all over it. I'm not sure that it's the best way though. :tongue.gif:
The problem is always about how to "generate" the random numbers. It's one thing to invoke a function, and another to implement it. In a sense, the truly random generator doesn't exist yet. There is some ideas of using quantum mechanic to generate true random, but mostly theoretical.
The random generator we used now, is more like a sequence generator. If given a different starting numbers (the seed), than it will generate a series of numbers that "appears to be random". if the seed is the same, the sequence will be the same. Using a clever trick, that is setting the seed to be (Current_seconds_from_1970 % rand_base), and by recording a table of previous generated numbers, you will get a sequence that appears to be different every time it's started.
The way of generate such sequences is purely mathematics (Mostly statistics), and often requires a lot of division (mode) and multiplication. And that's not practical in current CPU design (takes too long to calculate). But there are other ways to . It essentially borrows the random generator from your computer to generate sequence for you. But it needs a lot of modifying before it can be integrated into current CPU design.
On the other hand, the problem of I/O is more of a design arrangement problem - How can 2 players interact without interfering each other. They need 2 sets of screen and keyboard? shared 1 screen and 1 keyboard? even the speed of detecting keyboard input needs to be considered. (The speed is measured in seconds instead of milliseconds.)
And although Java program can be small, but it requires VM, that is running a common library which borrows many programming codes that already written in the past 40 years by many. And we have barely started our minecraft programming from the scratch!
Although bacons are good, we consider pigs in minecraft are bad :Pig:. They are quite annoying (sheep and cow too). They can truly disrupt the building process, trigger pressure pads, occupying minecarts, causing real problems. Hence mostly I like to build on rocks(with rocks) and surround the building ground with high stone walls.
I should make one of those and give it a memory address, allowing easy access to random numbers. :tongue.gif:
Yeah, they're a real pain. most of my CPU doesn't have grass, but there are a couple of ares that do have a bit, and they seem to spawn there constantly and run everywhere. :S
You mean a filesystem? That's another level of storage, and often requires a OS. (That's part of the reason why OS is needed). But a giant lever ROM memory, can serve that purpose, the problem will be how to reference the memory without actual memory address. I guess the easist way of doing that is using memory PAGE. That is to divide the memory into severl pages, and each one has a certain among of memory size, each one share the same lower-memory address, but choosing different higher-memory address can give you access different PAGEs.
But A practical way of doing that in minecraft slow CPU, is simply using hardware with a multiplex to choose which "Memory Tower" to recieve programs, but the problem will be the delay, since a goup of "Memory Towers" will occupy a great among of space.
Yeah, the delay would be too much of a problem I think. It might be possible to save a block of memory with a program in it in MCEdit as a schematic though, so programs could be loaded like that.
Oh, sorry about that. :tongue.gif:
Finally!!! And what's going on with the blog?? DNS error?
Yeah, it's taken a while. I'm not sure what's up with the blog. It seems to be a problem with DNS, but I haven't changed anything recently and I'm having trouble tracking down the exact problem. :S
Checking your DNS registration sponsors. (It's currently sponsored by GoDaddy.com?) Mostly it's their problems, or something to do with the money, but I found the domain name Created 15-Dec-2010, only expired till 15-Dec-2011. And the default DNS lserver NS01.DOMAINCONTROL.COM, NS02.DOMAINCONTROL.COM, reply query refused, it seems like these 2 lookup servers are broken (settings wrong), so if you paid an annual fee, you should definitely calling their customer service. (Although, $1.99 a year, I doubt it will be easy)
Thanks, but it seems to be working now. I had emailed their customer support and received some generic responses that didn't help. It's annoying, but I suppose that's what I get for a $2 domain. :tongue.gif: