Maup

I've been wanting to learn Godot for a while since I'd like to use it to make VR games. I decided to force myself to learn it in under 48 hours for the 10th Alakajam. Maup is the result. It started out rough, but it worked out in the end. Pygame is significantly faster to develop 2D games with because of my framework, so I'm not even tempted to use Godot for 2D projects right now.



Check it out here.
114 views

Lynez

I only was able to put in about 7 hours, but I completed my game Lynez for the 9th Alakajam.



Check it out here.
1.3K views

New Project

I haven't mentioned it here because I wasn't certain I'd stick with it, but I've been working on a new project.



It started off as two projects in one. It was meant to be a test of my ability to make a visually appealing environment while developing a base framework for future games. This environmental showcase prototype I'm working on was also something I was planning on turning into a game if it turned out well. More details may come in the coming months.

For the time being, I'm logging my progress in this YouTube series.
1.8K views

I've updated the website to support code in blog posts!

I'll be able to post some code snippets in a useful way now.
# this is embedded code
for i in range(10):
    print('Hello world!')
I'm considering writing out a text version of my YouTube tutorials in the future, so I thought I'd implement this.

For the fun of it, I've added the code for my markup script below:
import keyword
built_in_list = ['abs''delattr''hash''memoryview''set''all''dict''help''min''setattr''any''dir''hex''next''slice''ascii''divmod''id''object''sorted''bin''enumerate''input''oct''staticmethod''bool''eval''int''open''str''breakpoint''exec''isinstance''ord''sum''bytearray''filter''issubclass''pow''super''bytes''float''iter''print''tuple''callable''format''len''property''type''chr''frozenset''list''range''vars''classmethod''getattr''locals''repr''zip''compile''globals''map''reversed''__import__''complex''hasattr''max''round']
keyword_list = keyword.kwlist

keyword_begin = '<span class="code-keyword">'
built_in_begin = '<span class="code-built-in">'
all_end = '</span>'

var_chars = ['a''b''c''d''e''f''g''h''i''j''k''l''m''n''o''p''q''r''s''t''u''v''w''x''y''z''0''1''2''3''4''5''6''7''8''9''_']

def parse_code(code, encoding):
    parse_index = {
        'python': parse_python_code,
    }
    if encoding in parse_index:
        return parse_index[encoding](code)
    else:
        return parse_basic_code(code)

def parse_basic_code(code):
    output = ''
    for line in code.split('\n'):
        line = line.replace('&''&amp;')
        line = line.replace('<''&lt;')
        line = line.replace('>''&gt;')
        line = line.replace(' ''&nbsp;')
        line += '<br>'
        output += line
    return output

def parse_python_code(code):
    output = ''
    for line in code.split('\n'):
        line = line.replace('&''&amp;')
        line = line.replace('<''&lt;')
        line = line.replace('>''&gt;')
        line = line.replace(' ''&nbsp;')
        line += '<br>'
        in_comment = False
        in_string = False
        current_word = ''
        escape = False
        for char in line:
            char_pre = ''
            char_post = ''
            if char.lower() in var_chars:
                current_word += char
            else:   
                word_highlight_begin = ''
                word_highlight_end = ''
                if (not in_comment) and (not in_string):
                    if current_word in keyword_list:
                        word_highlight_begin = keyword_begin
                        word_highlight_end = all_end
                    if current_word in built_in_list:
                        word_highlight_begin = built_in_begin
                        word_highlight_end = all_end
                if char in ['\'''"']:
                    if not in_comment:
                        if not in_string:
                            in_string = char
                            char_pre = '<span class="code-string">'
                        elif not escape:
                            if char == in_string:
                                in_string = False
                                char_post = '</span>'
                if char == '#':
                    if not in_string:
                        in_comment = True
                        char_pre = '<span class="code-comment">'
                output += word_highlight_begin + current_word + word_highlight_end + char_pre + char + char_post
                current_word = ''
            escape = False
            if char == '\\':
                escape = True
        if (in_comment) or (in_string):
            output = output[:-4] + '</span>' + output[-4:]
        
    return output
2.3K views