I've participated in it before, but I'm not very good at making games. Making the engine and game mechanics and coming up with a concept is fun, but my artistic ability and level design skills are severely lacking. I could make a game with procedural generated levels though...
However, programming in this kind of language is really hard for me if I can't test my programs out. so I think I'll wait until the computer too is released.
That's too bad. Oh well, I'd love to see it when you do finish it after the release of the computer.
Here's some bugs I've found with the help of beta testers on Skype:
1: Leaving out a semicolon on the last function before a close parenthesis " } ", it will not compile the line as usual, however it does not complain, simply ignoring the instruction entirely.
2: attempting to upload faulty code causes the uploader to not reset properly and jam, requiring a restart of the compiler program. It seems this is quite a recent bug because this didn't occur previously. Probably because of the new GUI.
3: a couple of spelling errors in the compiler's error messages.
Anyone else found any problems or mistakes in the manual or compiler?
-snip-
I've participated in it before, but I'm not very good at making games. Making the engine and game mechanics and coming up with a concept is fun, but my artistic ability and level design skills are severely lacking. I could make a game with procedural generated levels though...
-snip-
(sry for double post, the new UIsucks
edit / update:
i hope you didn't miss understand me, i meant the MC forums UI sucks not yours!
on topic please help me with this java code (if your nice enoufe and have time)
(sry for double post, the new UIsucks
edit / update:
i hope you didn't miss understand me, i meant the MC forums UI sucks not yours! on topic please help me with this java code (if your nice enoufe and have time)
my problem is that i cant get it to scroll horizontly
This is far from on topic, this topic is about a redstone computer and you're posting about your Java problems and ludum dare. I suggest you go to stack overflow for help, I'm not good at debugging code I didn't write myself.
Not trying to be mean or anything, but surely this should go to a thread in the "off topic" section?
I presume you allocate a few registers to a variable that would be called "value" in the compiler for example, but how do you make sure it wont become a number that its not able to handle?
For example, say you allocate register A1000 the the variable "value", and a register is able to hold a 8 bit number, so a max of 255, how do you get around the limit that is there?
Well, all registers are actually RAM addresses and therefore all have 32 bits, not just to the program but physically as well. All variables are stored in scoreboards which is 32 bit signed integers. Each RAM adress is a player in the scoreboard (e.g. a player named "3" stores the value of address 3). The hardware accesses registers by simply reading/writing to that player's score.
Should a value not be a valid 32 bit integer at compilation, Java's built in "Integer.parseInt()" function will be throwing an exception. Unfortunately, it won't give any sort of nice "error at line X: invalid number" type error, but it will refuse to compile. If a value exceeds the limit during runtime, it overflows as usual. This is handled by Minecraft however, and could change in the future. For example, it could decide that 2,147,483,647 + 1 is still 2,147,483,647 in some update.
Sorry for being offtopic (i thought you might want to try my game and i thougt fixing the line wrap was easy). but to get back on topic:
I decompiled your compiler and tested out the code for the KeyBoard class.(the robot thingy). if you remember a while back i posted how some code java.awt.robot code that did not work properly in MC. So heres the end resualt of test YOUR code:
Even though your code worked better then mine, your code still messed up on my PC. Every now and then it skipped a few characters.
I used this to test it:
I guess this is because my PC lags every now and then.
O and btw... a wile back you said that minecraft read key strokes every tick / update. welll if ever you write an app with LWJGL (the library that MC uses) you will see that the KeyBoard input class is only updated every time you call the main classe's update method (basically what you said was true).
Update:
i played around with the delays a bit and got about 88% accuracy. i afraid the compiler will be not be user-freaindly
decompiled your compiler and tested out the code for the KeyBoard class.(the robot thingy). if you remember a while back i posted how some code java.awt.robot code that did not work properly in MC. So heres the end resualt of test YOUR code:
Update:
i played around with the delays a bit and got about 88% accuracy. i afraid the compiler will be not be user-freaindly
Hold on, you decompiled my program, ripped out the command injecting class and threw it into your own program? Don't you think that's a little unethical? On top of that, you complain about the code you stole...
Now don't worry, I'm planning to make this open source eventually anyway, but I'm sure other people wouldn't take it as lightly.
anyway, from your description it seems you got the 88% accuracy rating from your own compiler using my code. My code actually contained 3 different methods for text output, with only 1 being used. It's possible the compiler removed one or both unused methods for optimization, but you could possibly be using one of the older, not well working methods.
Can anyone confirm this with the official beta compiler? Just try uploading a program to an empty minecraft world or something and see if it misses any lines. it should basically output ROMA, ROMB, and ROMC set commands per instruction line. You should see the pattern, if it breaks anywhere it's not working.
Additionally, I'd like some system information from you, c4ooo_redstone. Your version of windows, Java version and your average minecraft FPS will be important.
i did not "rip it out and insert it into my program" , i wanted to know if it did any better then mine.
ime not trying to complain,ime saying facts
once again ime not complaining ime saying it wont be user friendly.
i still have no real use from your very unorginized code. (how can you tell the diferance beatwean typetocmb1() and typetoxmb2()? i suggest you read on this and who is lexer?.)
i see no *major* difference between my code and your except the difference in dealayes, and me using KeyEvent.VK_watever and you using confusing integers values.
this numberd list is messed up, i have no time to switch to markup mode and fix it
i plan on using .dat file editing and not pushing inconvenience on the user. (althoug its good if you know how to use it)
it keeps gettong worse PLEASE SWITCH TO THE OLD MC FORUMS!!!
I am calm, I'm just pointing out that it's not a good idea. Also, your point #4 (complaining about my code organisation) is a direct contradiction to point #2 (you saying you're not complaining). All I'm trying to do is get useful debugging information, That's the purpose of beta testing, after all.
You complain about me using confusing integer values. I can guarantee that I use the VK constants in my original source code. This is something called optimization. If you snoop or decompile someone's source code, it's guaranteed to not look like the original because the compiler will rename and edit the program to make it faster, smaller and generally run better. Complaining about my code style is pointless, for what you are looking at is not my code, but the compiler's. Finally, for "who is lexer", please see: http://en.wikipedia.org/wiki/Lexical_analysis
All I need is the following:
Did the bug occur on the standard, unmodified compiler program?
What version of Windows do you have? (I've noticed 8.1 acts quite differently)
What version of Java do you have?
What FPS are you getting on Minecraft? (This is important because it seems the speed at which minecraft reads keys seems to depend on the framerate)
it works!!! but HOW?!?!?!??!
Update:
OK i see why did not know there was such a big difference between tcomText(String s) and type(String s).
and realy i meant no offence by decompiling your program. if it was not for you i would not be so fascinated by redstone CPUs and much less have attempted to build one myself. And looking back i might not have learned java if a have not bean fascinated by computers and such :)/
Fixed all known bugs in compiler, which is 4 in total. I'm working on making a few more demo programs for a trailer video, including fractals like the Sierpinski triangle and possibly the Mandelbrot set! Though the latter will take ages to compute and won't be finished on release. Also, because this computer is recursion capable, Ackermann's function! Though not very useful with a max stack depth of 10 and with computing speeds this slow... It's still kinda cool.
And yea, pretty slow development because of school, and me slowly loosing interest in the project. Don't worry, I'll force myself to finish it, it's way too close for me to stop now!
It's finally publically available! It's still missing array functionality in the compiler and the peripheral protocol is still unfinished, but it's done.
And I'm releasing the source code for my compiler for those interested!
I'm quite happy with my first "real" compiler, though there's a lot of design choices I now regret and would do differently on a newer project. The code's also pretty bad at the moment, with ugly hacks, bad exception handling (first time I'm using exceptions for something useful in Java) and tons of random unnecessary code, half of which was originally used before I ended up making an alternative function and sort of sits there doing nothing, and the other half sitting there for a very similar purpose, but with 1 or 2 lines of code depending on it for a dirty hack it needs to work.
The point I'm trying to make is, don't judge my code! I'm self taught, and follow all sorts of bad practices.
Finally, this code is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
It's rather strange. I was making a trailer video for this computer and decided I was going to release it when the trailer was done, however I decided the trailer was going to take too long and released it without the trailer.
However, just as I did that, I gained the urge to finish it. I spent my entire day finishing the trailer I thought would take at least another week. Very strange indeed.
Anyways, watch the cool trailer I made for the computer here:
Alright, it's not *that* cool, I kinda suck at editing. But I tried my best, and that's what counts, right?
In other news, I should probably ask the mods to move this to the "redstone creations" section, seeing as it's now finished.
EDIT: That was fast. It's been moved already!
I just read through this entire topic and all videos and I must say, top job!
Now i realise it a bare bones computer with no os except what the compiler provides.
You could add some "hardware" os features. Precompiled programs that are easely accesible for the main program.
Kinda the amiga idea where the mainboard had basic preloaded on it with all kind of features to use(internal clock, circle drawing, fill, clear)
Best. Feature id love to see added is animation storage where you can store a frame on a variable spot( basically copying the frame to a coordinate which is stored in memory and can be repainted/reloaded in buffer step 3 when needed without the need of recomputing). Almost sounds like a pointer ;-)
Heh, this is amazing. Working on a Conway's game of life script atm, up to creating a random starting screen. Will post when (or if 0.o) i get it to work
Best. Feature id love to see added is animation storage where you can store a frame on a variable spot( basically copying the frame to a coordinate which is stored in memory and can be repainted/reloaded in buffer step 3 when needed without the need of recomputing). Almost sounds like a pointer ;-)
This functionality already exists, actually. It's the save() and load() functions, on page 13 of the SDK manual. It seems I forgot to mention it anywhere else in the manual, so I understand if you didn't notice it.
Basically it stores the state of the frame currently being rendered and allows you to restore it later. It's pretty much exactly what you described. Right now, though, it only has 1 of these general purpose buffers, but it is used in some programs and for collision detection, which again, I only mentioned on page 14 in the flags list.
Heh, this is amazing. Working on a Conway's game of life script atm, up to creating a random starting screen. Will post when (or if 0.o) i get it to work
Good luck! It's probably going to be pretty hard to do without arrays and with only a single general purpose framebuffer (I think a design using two framebuffers would work, though run very slowly). If you already found a way to do it, I'd love to know! Oh, perhaps you could avoid the framebuffer limitation by using different colors...hmm....
But yes, if anyone finds bugs or makes a cool program, I'd love to hear about it! I'll be making a tutorial series soon, so that should make things even easier!
the sim in minecraft, multitasking in minecraft...
now we need "local save" "local load" "global save" "global load"
local = in-app only reading
global = any-level reading
are you referring to file I/O? Because this computer doesn't have a physical hard drive.
Also, multitasking only works if your processor is fast enough. Since these computers are free (unlike real life computers), it's easier to just copy paste the thing. Though this computer doesn't support having multiple copies of itself due to the usage of scoreboards...
There's a "soft stack", if you are referring to continue and break, and running multiple loops inside each other is perfectly possible. This is just an illusion created by the high level compiler though, and don't actually exist in the compiled code.
However, if you are referring to initializing variables inside a loop, then no, sorry. Just initialize the variables so they're in the scope of the loop (global if it's in the main function, or as a local variable if the loop's in a user function)
Just as I made a Brainf*ck interpreter in minecraft when I see this. Wow. I have to try this out tho.
Haha, awesome! You should post it! I can't find it in your post history, so I assume you haven't posted it yet.
When this supports arrays, this computer could also run a brainf*ck interpreter. I plan to try and make one eventually, though it won't have ASCII input and output like it's supposed to.
I've recently found a very serious issue in my optimizer thanks to someone who had problems getting his program to work. An example is as follows:
a=5;
b=a;
a=3;
b=a;
Now, of course, the end value of b should be 3. However, it will end up being 5. Why? the optimizer sees the last "b=a" and thinks "oh, b is already equal to a, so there's no need for this line" and removes it. I have no idea how I overlooked something this serious, but this won't be easy to fix. I'm going to need to monitor the parent value (a) through all the code between the 2 times b was set, which is simple in this example, but more complicated in real code scenarios.
EDIT: just had an "AHA!" moment and fixed the issue by taking advantage of my code design. Thank the gods of Object Oriented programming, because this would've been a very complicated fix without objects! I'll release a new version with this fix later.
I've participated in it before, but I'm not very good at making games. Making the engine and game mechanics and coming up with a concept is fun, but my artistic ability and level design skills are severely lacking. I could make a game with procedural generated levels though...
That's too bad. Oh well, I'd love to see it when you do finish it after the release of the computer.
Here's some bugs I've found with the help of beta testers on Skype:
1: Leaving out a semicolon on the last function before a close parenthesis " } ", it will not compile the line as usual, however it does not complain, simply ignoring the instruction entirely.
2: attempting to upload faulty code causes the uploader to not reset properly and jam, requiring a restart of the compiler program. It seems this is quite a recent bug because this didn't occur previously. Probably because of the new GUI.
3: a couple of spelling errors in the compiler's error messages.
Anyone else found any problems or mistakes in the manual or compiler?
THE MICRO$OFT APOCALYPSE IS ON!!!
32 bit redstone computer with 64*64 pixel 16 color gpu:
http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/2116999-computer-command-block-computer-now-running-with
(giant banner removed out of modesty).
http://www.ludumdare.com/compo/minild-53/?action=preview&uid=38420
(sry for double post, the new UIsucks
edit / update:
i hope you didn't miss understand me, i meant the MC forums UI sucks not yours!
on topic please help me with this java code (if your nice enoufe and have time)
THE MICRO$OFT APOCALYPSE IS ON!!!
32 bit redstone computer with 64*64 pixel 16 color gpu:
http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/2116999-computer-command-block-computer-now-running-with
(giant banner removed out of modesty).
This is far from on topic, this topic is about a redstone computer and you're posting about your Java problems and ludum dare. I suggest you go to stack overflow for help, I'm not good at debugging code I didn't write myself.
Not trying to be mean or anything, but surely this should go to a thread in the "off topic" section?
Well, all registers are actually RAM addresses and therefore all have 32 bits, not just to the program but physically as well. All variables are stored in scoreboards which is 32 bit signed integers. Each RAM adress is a player in the scoreboard (e.g. a player named "3" stores the value of address 3). The hardware accesses registers by simply reading/writing to that player's score.
Should a value not be a valid 32 bit integer at compilation, Java's built in "Integer.parseInt()" function will be throwing an exception. Unfortunately, it won't give any sort of nice "error at line X: invalid number" type error, but it will refuse to compile. If a value exceeds the limit during runtime, it overflows as usual. This is handled by Minecraft however, and could change in the future. For example, it could decide that 2,147,483,647 + 1 is still 2,147,483,647 in some update.
I decompiled your compiler and tested out the code for the KeyBoard class.(the robot thingy). if you remember a while back i posted how some code java.awt.robot code that did not work properly in MC. So heres the end resualt of test YOUR code:
Even though your code worked better then mine, your code still messed up on my PC. Every now and then it skipped a few characters.
I used this to test it:
O and btw... a wile back you said that minecraft read key strokes every tick / update. welll if ever you write an app with LWJGL (the library that MC uses) you will see that the KeyBoard input class is only updated every time you call the main classe's update method (basically what you said was true).
Update:
i played around with the delays a bit and got about 88% accuracy. i afraid the compiler will be not be user-freaindly
THE MICRO$OFT APOCALYPSE IS ON!!!
32 bit redstone computer with 64*64 pixel 16 color gpu:
http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/2116999-computer-command-block-computer-now-running-with
(giant banner removed out of modesty).
Hold on, you decompiled my program, ripped out the command injecting class and threw it into your own program? Don't you think that's a little unethical? On top of that, you complain about the code you stole...
Now don't worry, I'm planning to make this open source eventually anyway, but I'm sure other people wouldn't take it as lightly.
anyway, from your description it seems you got the 88% accuracy rating from your own compiler using my code. My code actually contained 3 different methods for text output, with only 1 being used. It's possible the compiler removed one or both unused methods for optimization, but you could possibly be using one of the older, not well working methods.
Can anyone confirm this with the official beta compiler? Just try uploading a program to an empty minecraft world or something and see if it misses any lines. it should basically output ROMA, ROMB, and ROMC set commands per instruction line. You should see the pattern, if it breaks anywhere it's not working.
Additionally, I'd like some system information from you, c4ooo_redstone. Your version of windows, Java version and your average minecraft FPS will be important.
i see no *major* difference between my code and your except the difference in dealayes, and me using KeyEvent.VK_watever and you using confusing integers values.
this numberd list is messed up, i have no time to switch to markup mode and fix it
- i plan on using .dat file editing and not pushing inconvenience on the user. (althoug its good if you know how to use it)
Ok now you calm?
it keeps gettong worse PLEASE SWITCH TO THE OLD MC FORUMS!!!
THE MICRO$OFT APOCALYPSE IS ON!!!
32 bit redstone computer with 64*64 pixel 16 color gpu:
http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/2116999-computer-command-block-computer-now-running-with
(giant banner removed out of modesty).
You complain about me using confusing integer values. I can guarantee that I use the VK constants in my original source code. This is something called optimization. If you snoop or decompile someone's source code, it's guaranteed to not look like the original because the compiler will rename and edit the program to make it faster, smaller and generally run better. Complaining about my code style is pointless, for what you are looking at is not my code, but the compiler's. Finally, for "who is lexer", please see: http://en.wikipedia.org/wiki/Lexical_analysis
All I need is the following:
Update:
OK i see why did not know there was such a big difference between tcomText(String s) and type(String s).
and realy i meant no offence by decompiling your program. if it was not for you i would not be so fascinated by redstone CPUs and much less have attempted to build one myself. And looking back i might not have learned java if a have not bean fascinated by computers and such :)/
THE MICRO$OFT APOCALYPSE IS ON!!!
32 bit redstone computer with 64*64 pixel 16 color gpu:
http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/2116999-computer-command-block-computer-now-running-with
(giant banner removed out of modesty).
And yea, pretty slow development because of school, and me slowly loosing interest in the project. Don't worry, I'll force myself to finish it, it's way too close for me to stop now!
And I'm releasing the source code for my compiler for those interested!
I'm quite happy with my first "real" compiler, though there's a lot of design choices I now regret and would do differently on a newer project. The code's also pretty bad at the moment, with ugly hacks, bad exception handling (first time I'm using exceptions for something useful in Java) and tons of random unnecessary code, half of which was originally used before I ended up making an alternative function and sort of sits there doing nothing, and the other half sitting there for a very similar purpose, but with 1 or 2 lines of code depending on it for a dirty hack it needs to work.
The point I'm trying to make is, don't judge my code! I'm self taught, and follow all sorts of bad practices.
Finally, this code is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
https://dl.dropboxusercontent.com/u/43744321/Lexer.zip Have fun!
However, just as I did that, I gained the urge to finish it. I spent my entire day finishing the trailer I thought would take at least another week. Very strange indeed.
Anyways, watch the cool trailer I made for the computer here:
Alright, it's not *that* cool, I kinda suck at editing. But I tried my best, and that's what counts, right?
In other news, I should probably ask the mods to move this to the "redstone creations" section, seeing as it's now finished.EDIT: That was fast. It's been moved already!
Now i realise it a bare bones computer with no os except what the compiler provides.
You could add some "hardware" os features. Precompiled programs that are easely accesible for the main program.
Kinda the amiga idea where the mainboard had basic preloaded on it with all kind of features to use(internal clock, circle drawing, fill, clear)
Best. Feature id love to see added is animation storage where you can store a frame on a variable spot( basically copying the frame to a coordinate which is stored in memory and can be repainted/reloaded in buffer step 3 when needed without the need of recomputing). Almost sounds like a pointer ;-)
This functionality already exists, actually. It's the save() and load() functions, on page 13 of the SDK manual. It seems I forgot to mention it anywhere else in the manual, so I understand if you didn't notice it.
Basically it stores the state of the frame currently being rendered and allows you to restore it later. It's pretty much exactly what you described. Right now, though, it only has 1 of these general purpose buffers, but it is used in some programs and for collision detection, which again, I only mentioned on page 14 in the flags list.
Good luck! It's probably going to be pretty hard to do without arrays and with only a single general purpose framebuffer (I think a design using two framebuffers would work, though run very slowly). If you already found a way to do it, I'd love to know! Oh, perhaps you could avoid the framebuffer limitation by using different colors...hmm....
But yes, if anyone finds bugs or makes a cool program, I'd love to hear about it! I'll be making a tutorial series soon, so that should make things even easier!
the sim in minecraft, multitasking in minecraft...
now we need "local save" "local load" "global save" "global load"
local = in-app only reading
global = any-level reading
Jeb_, what's on your mind now?
are you referring to file I/O? Because this computer doesn't have a physical hard drive.
Also, multitasking only works if your processor is fast enough. Since these computers are free (unlike real life computers), it's easier to just copy paste the thing. Though this computer doesn't support having multiple copies of itself due to the usage of scoreboards...
There's a "soft stack", if you are referring to continue and break, and running multiple loops inside each other is perfectly possible. This is just an illusion created by the high level compiler though, and don't actually exist in the compiled code.
However, if you are referring to initializing variables inside a loop, then no, sorry. Just initialize the variables so they're in the scope of the loop (global if it's in the main function, or as a local variable if the loop's in a user function)
Haha, awesome! You should post it! I can't find it in your post history, so I assume you haven't posted it yet.
When this supports arrays, this computer could also run a brainf*ck interpreter. I plan to try and make one eventually, though it won't have ASCII input and output like it's supposed to.
Now, of course, the end value of b should be 3. However, it will end up being 5. Why? the optimizer sees the last "b=a" and thinks "oh, b is already equal to a, so there's no need for this line" and removes it. I have no idea how I overlooked something this serious,
but this won't be easy to fix. I'm going to need to monitor the parent value (a) through all the code between the 2 times b was set, which is simple in this example, but more complicated in real code scenarios.EDIT: just had an "AHA!" moment and fixed the issue by taking advantage of my code design. Thank the gods of Object Oriented programming, because this would've been a very complicated fix without objects! I'll release a new version with this fix later.