Results 1 to 4 of 4

Thread: Brainstorming: Simplified game making language and IDE

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Oh, i didn't intend for it to render from many threads at the time. The above thing should work just fine, as there is only 1 rendering thread.

    I don't think this can have support for low level stuff, directly in the code. But you can do that stuff to package functions. They are just almost ordinary pascal units (.pas) and you can do whatever you want in them. However, intention is not that every game would need to make its own helper packages.

    Then also what i think is that many people who are not that familiar with programming at all, would be able to make something with it. And... maybe the language/IDE would fit to more than just games. Thinking about it, its actually not a scripting language, but its not a real programming language either... What is it? The language that is used to make the final source code is irrelevant, it could even be C++, Java or Python. Although limiting factor is mathematical calculations and used symbols. If i'd have to parse them all, then yes something else than FPC could be used. But if i don't touch the math code and let write "A+B div C", then it's directly only compatible with FPC.

  2. #2
    This reminds me a bit of my proof-of-concept project called fpBASCON which is a BASIC to Pascal translator. Using the SDL based game engine I wrote one can do something like this (simple mandelbrot):
    Code:
    IMPORT egslengine
    
    DIM  x, y, c, pow,time1,time2 AS integer
    DIM a, b, z, a2, b2, x2, y2, przesx, przesy, przelx, przely AS real
    MAIN
    openwindow (800,600,32,"Mandelbrot")
    backcolour (0,0,0)
    drawtext (0, 20, "MANDELBROT SET")
    drawtext (0, 40, "Press any key to start.")
    redraw
    inkey
    clearscreen
    time1=timerticks()
    pow = 1
    przesx = 0
    przesy = 0
    przelx = 3 / (800 * pow)
    przely = 2 / (600 * pow)
    FOR x = 0 TO 799 
        FOR y = 0 TO 599
                a = 0
                b = 0
                c = 0
                x2 = (przelx * (x + (przesx * pow))) - 2
                y2 = (przely * (y + (przesy * pow))) - 1
                WHILE c < 255
                    a2 = a * a - b * b
                    b2 = 2 * a * b
                    a = a2 + x2
                    b = b2 + y2
                    z = a * a + b * b
                    IF z >= 4 THEN
                        BREAK
                    END IF
                    c = c + 1
                WEND
                IF c = 50 THEN
                    colour (0, 0, 0)
                ELSE
                    colour (255 - c, 255 - c, 255 - c)
                END IF
                dot (x, y)
            NEXT
        redraw
    NEXT    
    time2=timerticks()
    colour (0,0,0)
    drawtext (0,0,STR$(time2-time1)+" ms")
    
    redraw
    inkey
    closewindow
    With the keyword IMPORT one can include all fpc units. All keywords are in uppercase, procedures and functions from the used units are in lowercase.
    Best regards,
    Cybermonkey

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •