Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1057358 Posts in 42956 Topics- by 34890 Members - Latest Member: AgentBlue0

October 25, 2014, 02:47:45 PM
TIGSource ForumsFeedbackDevLogsUndo RL (... or Combinators all the way down)
Pages: [1]
Print
Author Topic: Undo RL (... or Combinators all the way down)  (Read 1894 times)
koiwai
Level 1
*



View Profile
« on: February 03, 2013, 05:05:53 PM »


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.


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 and Forth. The mathematical foundation for this work is mostly taken from this article by Brent Kerby. It is enhanced with LOGO-like turtle movement, and rewriting capabilities as in 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.
« Last Edit: February 03, 2013, 06:02:47 PM by koiwai » Logged

sublinimal
Level 8
***



View Profile
« Reply #1 on: February 03, 2013, 05:34:07 PM »

Ah, okay. This seems unique and mind-bending.
Logged
John Sandoval
TIGTumblr Editor
Global Moderator
Level 10
******


big booty 2d cutie


View Profile WWW
« Reply #2 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?
Logged

BRAINGALE
1% inspiration, 99% desperation
koiwai
Level 1
*



View Profile
« Reply #3 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!
Logged

Pineapple
Level 10
*****


Love, love is a verb Love is a doing word ~♪


View Profile WWW
« Reply #4 on: February 03, 2013, 07:22:41 PM »

want
Logged

gears
Level 0
***


View Profile WWW
« Reply #5 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.
Logged

koiwai
Level 1
*



View Profile
« Reply #6 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

Logged

toipot
Level 0
**


View Profile
« Reply #7 on: February 07, 2013, 05:35:11 PM »

Posting to follow!
Logged
koiwai
Level 1
*



View Profile
« Reply #8 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.


- 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:


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.
Logged

Pineapple
Level 10
*****


Love, love is a verb Love is a doing word ~♪


View Profile WWW
« Reply #9 on: February 11, 2013, 01:37:28 PM »

whoa
Logged

koiwai
Level 1
*



View Profile
« Reply #10 on: February 11, 2013, 07:25:28 PM »

.. yeah, not as uber-powerful as Samus.



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.
Logged

Pineapple
Level 10
*****


Love, love is a verb Love is a doing word ~♪


View Profile WWW
« Reply #11 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.
Logged

koiwai
Level 1
*



View Profile
« Reply #12 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 Roll Eyes
Logged

failrate
Level 0
***



View Profile WWW
« Reply #13 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?  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.
Logged
koiwai
Level 1
*



View Profile
« Reply #14 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?  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. Wink
Logged

koiwai
Level 1
*



View Profile
« Reply #15 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



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.
Logged

koiwai
Level 1
*



View Profile
« Reply #16 on: March 04, 2013, 04:25:22 AM »

concept intrigues me greatly. godspeed  Hand Thumbs Up Right
ty Gentleman
Logged

koiwai
Level 1
*



View Profile
« Reply #17 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. 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 Wink):
- Turing Tarpit
- Why Concatenative Programming Matters
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic