The Dink Network

Reply to Re: New Contest: Plot Twist

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
April 18th 2018, 10:27 AM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
Are you converting some existing C/C++ code or "starting from scratch"?

In terms of code, I'm starting from scratch. But I'm using ideas I got before, of course.

I'll probably stick with Gvim, but I'll be curious about this too.

You are misunderstanding what I'm saying. I'll also keep using vim for editing the scripts. What the preprocessor does is accept a more sane notation. For example, it includes support for while loops, function calls can have arguments, and expressions such as "items = 25 * sp_gold(current_sprite) + 20" don't need to be split over multiple lines. The preprocessor then turns that into DinkC code, with the whitespace as it needs it.

I originally made the preprocessor read code that looks like C (which is what Seth tried to do with DinkC, but failed IMO), but I don't like that language so now it'll look more like Python. For example, this would work for setting the vision based on the story variable; this would be attached to a screen, of course:

global story
def main():
    if story > 10:
        vision = 2


The editor doesn't care whether you write that script with your preferred editor or with its internal select element. Actually, I'm considering not including a select element at all, because it would be messy. And I recommend everyone to use a good editor anyway, which should never be a select element on a web page.