|
Title: Undo RL (... or Combinators all the way down) Post by: koiwai on February 03, 2013, 05:05:53 PM (http://i.imgur.com/AQD2XD8.png) The setting After a devastating cataclysm, the human society is on the brink of annihilation. Genetically manipulated beasts, mutants, human-like chimeras, and who knows what else, escaped from secret scientific labs. Or, maybe, someone helped them-- In any case, people were not ready, as always ) You travel in urban areas of previously populated cities, trying to hide from stronger creatures and kill the weaker ones. To survive one more day is a challenge, but what else can you do now? The hero For now, the protagonist is a girl called Cathy Schroedinger (.. tell me if the reference is not clear here). Fortunately, she is smart enough to use and program robots. (http://i.imgur.com/ZxTCmYM.gif) Robots There is going to be a few different types of robots that vary in speed, perception ability, CPU, etc. What's important is that they all can be programmed using the same language. The language For all programming purposes, you can use a stack- and combinator-based functional language similar to Joy (http://www.kevinalbrecht.com/code/joy-mirror/j01tut.html) and Forth. The mathematical foundation for this work is mostly taken from this article (http://tunes.org/~iepos/joy.html) by Brent Kerby. It is enhanced with LOGO-like turtle movement, and rewriting capabilities as in L-systems (https://en.wikipedia.org/wiki/L-systems). There is also a simple API for robot's sensors. More details on all this come later. If you don't like programming in obscure language, there will be discs found in the game that you can load and run in robots without writing any code at all. Stack-based languages tend to be criptic, but with use of good high-level functions, hopefully, it will be realatively clear what is going on. Current state of development As a proof of concept, I implemented a simple bot program in the robots' language. It is used to launch a robot in the screenshot/video above. Mobs were stupid randomly moving creatures, so don't expect too much from them ) Also, some work has been done on city and building generation code. I don't expect a lot of text in the game, but later, I will need a native English speeker to help me with writing. Well, at least the story, tutorial, and programming manual must be well written. Title: Re: Undo RL (... or Combinators all the way down) Post by: sublinimal on February 03, 2013, 05:34:07 PM Ah, okay. This seems unique and mind-bending.
Title: Re: Undo RL (... or Combinators all the way down) Post by: ink.inc on February 03, 2013, 05:41:53 PM The name "Catie" looks kind of weird to me. Maybe something more orthodox, like Catherine, or Cathy?
Title: Re: Undo RL (... or Combinators all the way down) Post by: koiwai on February 03, 2013, 05:58:23 PM Ah, okay. This seems unique and mind-bending. Most of the cools stuff is still to be implemented .. Thanks! The name "Catie" looks kind of weird to me. Maybe something more orthodox, like Catherine, or Cathy? I can change to Cathy, I think. Thank you! Title: Re: Undo RL (... or Combinators all the way down) Post by: Pineapple on February 03, 2013, 07:22:41 PM want
Title: Re: Undo RL (... or Combinators all the way down) Post by: gears on February 07, 2013, 06:05:39 AM Interesting premise! Do you plan to have a more extensive means of input than the prompt, such as a text editor or some visualization of the program structure, like a tree or blocks?
What about feedback? I could imagine a display of the stack actually getting executed, although it may need to be slowed down. This could be a great learning tool. Title: Re: Undo RL (... or Combinators all the way down) Post by: koiwai on February 07, 2013, 03:44:53 PM Interesting premise! Do you plan to have a more extensive means of input than the prompt, such as a text editor or some visualization of the program structure, like a tree or blocks? What about feedback? I could imagine a display of the stack actually getting executed, although it may need to be slowed down. This could be a great learning tool. I really appreciate your interest in this project! User Interface: Most importantly, the prompt will be accepting special commands that start with a colon symbol: Code: := name value Code: :load "my-library-file" The first is a name binding command. It adds a pair <name, value> to your current environment. The interpreter evaluates name by replacing it with its value. In the screenshot, "botc" is such name. Names can contain themselves, so we get intuitive recursion. Even though you might think that such simple syntactic substitution is not enough to do real code, it is not the case, because functions don't need explicit arguments, they take them from the stack.The second command simply loads a sequence of commands from a file. Primarily, it is supposed to load name-binding commands. Player is free to use their favorite text editor to write such library file. There must be :save and :forget commands too, I guess ) I try to make UI very simple, not a real IDE. Though, it is possible to build a dependency tree for functions, for example.. Interpreter Feedback: Feedback from the interpreter is a good thing and must be there. For now, there is a command preview only: it just shows what the robot will do if you run the currently entered command. It does not show what is wrong in the code, and does not show the stack. Maybe, I can output the evaluation preview and the stack above the prompt line.. Yeah, I will add it :gentleman: I don't really think that there is a need to slow down evaluation in preview: It just shows where the robot will go, and it is good to have it as is. On the other hand, I can make a different feature that displays the stack and the program of an existing robot. So you can see how it runs the program step by step. I don't know for sure, I will consider both options. What's next: I still need some time, before I can show good code examples. This is because first I have to write a good set of library functions that are easy to use and convenient for players. Ultimately, it is related to making a tutorial that introduces features properly... I don't want to rush this. But in the meantime, I will post some small examples with loops and rewriting. Maybe, by the weekend. :gomez: (http://i.imgur.com/PBRieIb.png) Title: Re: Undo RL (... or Combinators all the way down) Post by: toipot on February 07, 2013, 05:35:11 PM Posting to follow!
Title: Re: Undo RL (... or Combinators all the way down) Post by: koiwai on February 11, 2013, 12:29:32 PM Spent the weekend programming map generation. It was tiring, but I'm very happy with the results. :gomez: The algorithm has two components: City layout on the high level, and building layout on the lower level. The building layout generation is rather complex: First, the algorithm breaks the building into sections and connects them with hallways. Then, it makes rooms in the remaining parts of the building. Roughly, it is supposed to simulate apartment or office buildings. (http://i.imgur.com/09lxn4D.png) - hallways are dark blue - rooms are blue - three kinds of walls are in shades of light grey and white - doors are red Each "apartment" is guaranteed to have at least one entrance door to the hallway. Large "apartments" have several entrance doors. Inside each "apartment", things are a little messy: There is too many doors and rooms right now. It may look unrealistic, and maybe I have to change it. However, it can be interesting to play in such crazy environment. I'm not sure at this point. A bigger portion of the city: (http://i.imgur.com/iNCEg2P.png) In general, the city map will be broken into regions like this one above or smaller. The buildings will become multi-story eventually. There is a minor error that produces disconnected buildings in some cases, it is not very frequent, but on the positive side, the algorithm is fast and never backtrack. Divide and conquer kind of thing most of the time. Title: Re: Undo RL (... or Combinators all the way down) Post by: Pineapple on February 11, 2013, 01:37:28 PM whoa
Title: Re: Undo RL (... or Combinators all the way down) Post by: koiwai on February 11, 2013, 07:25:28 PM .. yeah, not as uber-powerful as Samus.
(http://i.imgur.com/6FsytgF.png) Even though I may redraw it later, this picture conveys the character, I think. Though, I accept your suggestions, if the face does not look right. Later, I am going to make a thread in the Art-Workshop to hopefully improve the tileset and overall aesthetics. Title: Re: Undo RL (... or Combinators all the way down) Post by: Pineapple on February 11, 2013, 09:34:16 PM She needs eyebrows. And more detailed shading. Also, a less zombified skin tone. She doesn't appear to have any distinct earlobe. And I think her left cheek (my right) could stand to be rounder.
Title: Re: Undo RL (... or Combinators all the way down) Post by: koiwai on February 11, 2013, 10:20:19 PM She needs eyebrows. And more detailed shading. Also, a less zombified skin tone. She doesn't appear to have any distinct earlobe. And I think her left cheek (my right) could stand to be rounder. Yeah, you are right. I think, I will do some practice drawing first, and then redo this. I will try to make portraits in the game, so drawing faces is a required skill ::) Title: Re: Undo RL (... or Combinators all the way down) Post by: failrate on February 11, 2013, 11:41:45 PM I love this concept. Have you taken a look at the recent Newgrounds game Cathode Raybots http://www.newgrounds.com/portal/view/610807 (http://www.newgrounds.com/portal/view/610807)? It has an interesting idea of letting players create robots for other players to fight in an arena. I think it would be fun for people to submit programs that could be used for enemy AI.
Title: Re: Undo RL (... or Combinators all the way down) Post by: koiwai on February 12, 2013, 11:29:00 AM I love this concept. Have you taken a look at the recent Newgrounds game Cathode Raybots http://www.newgrounds.com/portal/view/610807 (http://www.newgrounds.com/portal/view/610807)? It has an interesting idea of letting players create robots for other players to fight in an arena. I think it would be fun for people to submit programs that could be used for enemy AI. Thanks for the link to the raybots game) About the programs submission, we will see. I primarily considered hard-coded enemy AI, simply because it is computationaly efficient, but in principle, your idea is an interesting alternative. I think, if the game become big enough to have a community around it, this will be a really fun addition! I will keep it in mind. ;) Title: Re: Undo RL (... or Combinators all the way down) Post by: koiwai on March 04, 2013, 04:04:32 AM Hi guys, some updates here:
- The game is relatively playable now. - City generation is integrated into the main game. - Minimap. - Some new graphics. - Screenshotts :gomez: (http://i.imgur.com/5PKYTbM.gif) I will start making early public releases as soon as the combat mechanics is ready. It is going to be open sourced btw, not sure about the license though. Most likely MIT or BSD, but maybe GPL. Title: Re: Undo RL (... or Combinators all the way down) Post by: koiwai on March 04, 2013, 04:25:22 AM concept intrigues me greatly. godspeed :handthumbsupR: ty :gentleman:Title: Re: Undo RL (... or Combinators all the way down) Post by: koiwai on May 26, 2013, 07:32:57 PM The spring semester is over, and I hope to have more time now, yeah!! I could not keep up with the forums, this is my fault :facepalm: But I could develop some new fun stuff.
There is a small RTS/Action in the feedback section: Action/RTS for Linux (http://forums.tigsource.com/index.php?topic=33736.0). It needs a name, btw. Also, I am developing an economical strategy similar to Tropico, but with simple 2D graphics and original building construction mechanics. Of course, there will be new updates about Undo RL. Some fun links for your enjoyment (somewhat related to Undo ;)): - Turing Tarpit (https://en.wikipedia.org/wiki/Turing_tarpit) - Why Concatenative Programming Matters (http://evincarofautumn.blogspot.mx/2012/02/why-concatenative-programming-matters.html) |