About Monkey 2 › Forums › Monkey 2 Projects › i_editor
This topic contains 7 replies, has 3 voices, and was last updated by cocon 1 year, 5 months ago.
Viewing 8 posts - 1 through 8 (of 8 total)
-
Author
Posts
-
Participant
Hi,
I’m rewriting (with mx2) a little game I made with pico-8: i_editor.
I have done some tests previously with another game: vct. So I have a class that translates some pico-8 behaviors in the monkey world. I’m looking for contacts with developpers for sharing experiments, tips and tricks.
Kind regards,
jihemParticipantLooks like an interesting concept, have you written an interpreter for this?
ParticipantYes
This was the most interesting part.KeymasterVery cool!
ParticipantThanks
This game (i_editor) is used by children to discover some basic programming concepts : sequences, variables, stacks, loops, … They use a pad (or 6 keys) to do all the job. They can see what they do in real time. Fractals and harder things are puzzles to solve for the elders. I played TIS-100 and had the idea to do this (free) game.ParticipantI want to write an interpreter too for educational purposes.
I have put on some study in it a few weeks now (first time ever) and I have completed the required knowledge about the tokenizer and the semantic model. The most tricky part is how to convert the token list to the semantic model… All of the implementations available use recursive function calls, which I dislike. Otherwise I will fall back to the most classic approach, peeking and checking…
ParticipantThe semantic tree is a tree… You have to use tree or stack objects to store it. You must use recursive functions only to use the language (monkey, c++) native call stack to build the tree. If you manage your own ‘call stack’ (as a stack object) you can use non-recursive functions. Sometime the semantic is so big that you can’t use recursive functions (stack overflow) so you have to manage your own stack. The source of my (pico8) cartridge is available on lexaloffle.com (search ‘jihem’, then select ‘i editor’). When displayed press the ‘code’ button.
ParticipantHi, the code seems very simple but it is very minified, seems hard to examine. Perhaps I could use a lua IDE and start to rename the variables a bit just to clear things out. However it is impressive.
-
Author
Posts
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.