Hi all
Don't know if I should be asking this question (robots are for professional use ) but just for fun, has anyone ever tried programing a game using KAREL...? something small like blackjack or snake etc.. Is it even possible...? i´v been messing around with some programs in KAREL but have never got quite the hang of it, after all, everything I know about KAREL I learned from reading the KAREL reference manual (witch I found quite hard to grasp) Is their even a way of generating random numbers for example?
Anyway I´v already tried loading some small JavaScript games onto the TP and that worked, problem is that it was very limited, It runs quite slow and only supports old JavaScript versions...
I think it would be quite interesting to see what people with creativity could do using KAREL programing
KAREL gaming
-
regaleira -
September 6, 2012 at 7:37 PM -
Thread is marked as Resolved.
-
-
uh oh, don't let my colleague see this..
-
Would you be looking to play the game on the controller with a GUI where the snake/cards are represented by pixels on the screen, or with an actual deck of cards/snake board (however you would make that) in front of the robot for it to manipulate with the actual arm?
I don't have much experience with KAREL either. I looked at it and it seems far too complicated for the functionality you can get from it. That makes me think that it couldn't do much in the way of graphics processing, but that's only a guess. You could probably make the game with ASCII characters pretty easily, but it wouldn't be pretty.
Interacting with a physical game (ie. cards) could probably be done just in a TP program. There would need to be a ton of logic and registers used, but doable for sure.
On kind of a side note, I've wanted to make a chess game for a while where the robot monitors piece positions, has a gripper, and actually plays against a person. I was going to use an external PC for logic instead of KAREL just for simplicity/processing time.
-
To do any type of game in TP programing would be impossible because its got very basic instructions.
My idea is to make a game using only KAREL and run it on the console (no robot movement involved). for a card game it would be difficult to make the graphics but not impossible, easy would be to represent cards like As (ace of spades) or 10c (ten of clubs) etc... snake could use "000000" for the body for example.
Ive already loaded a game on to the console in javascript, the game was "minesweaper" and it ran rather well.
KAREL is quite hard to learn, its allot like PASCAL but ive already done some simple and interesting programs with it. With TP its just limited... -
I wrote space invaders. I got the invaders working back and forth and the buttons to move the guy back and forth on the bottom row. I quit about half way through programming the shooting and bomb dropping. I was working on learning screen manipulation and string handling. It is pretty cool to watch it run, I have not messed with it for 10 years or more do not know how fast it would go on a new faster cpu robot. The TP runs at a low priority so the response was not like a nintendo DS but it was pretty cool
I was going to creaqte some forms and do a high score etc but I had to get back to a project so alas it was never finished.
-
You should finish it, I think it would be interesting to see
I lately made a sort of TP blackjack program on my free time at work, lol Of course their were no graphics evolved but it turned out quite well, it works with registers, I managed to make a routine that generates random numbers (from 1-13). You start with 100 points and also the "cpu" starts with 100 points. you press cycle start button to "HIT" and press reset button to "STAY" you play against the "cpu". It wont repeat the same card (number value) more than 4 times (for each suit) if you lose it subtracts 10 points and adds 5 to the winner, it busts over 21 and in case of draw, nobody wins or loses points. In case of getting an ace that is worth 1 or 11 it will auto choose 1 if your total value is over 10 and 1 if it is under. if u reach 0 points the screen will write "U LOSE" if the cpu reaches 0 points the screen will Write "U WIN" It will give u a bonus of 10 points if u make Blackjack...
LOL, that's pretty much it. It was fun making -
somebody've source code game on TP XDDD lol