Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Calin Leafshade

#81
Any art assets made by CJ are likely to be considered public domain. He's never expressed any kind of enforcement over them which would essentially reduce his copyright claim to nil.

The only potential sticking point is the default font which is copyrighted by sierra but again, lack of enforcement means their claim is also likely to be nil.

If you're really anal about licensing and stuff then the actual answer is that both are unlicensed and thus proprietary by default and shouldn't be used.
#82
Does it matter if it's uncommon for users?

All users care about is if the numbers go upwards. We don't make formal releases for dev releases anyway so most users will just use the stable version.

#83
Nope, no graphics lib required and lua is included with the lua plugin.

The API is basically the same as ags script.

It would look something like this:

Code: lua


function skipPal(numberOfSlotsToSkip, spriteNum)

    local sprite = ags.DynamicSprite.CreateFromExistingSprite(spriteNum)
    local ds = sprite:GetDrawingSurface()

    for x=0, sprite.Width - 1 do
        for y=0, sprite.Height - 1 do
            local color = ds:GetPixel(x,y)
            -- lookup the color from our palette using a lookup table
            local palIndex = pal.lookup[color]
            -- set the drawing color to the palette number plus the slots to skip
            ds.DrawingColor = pal[palIndex + numberOfSlotsToSkip]
            ds:DrawPixel(x,y)
        end
    end

    ds:Release()

    return sprite
end

#84
If you want to do that then its perfectly possible but you'd need to do some processing and stuff.

You'd have to store your own palette or build one from a sample image and then step through every time you wanted to step it. I reckon that would be easily fast enough in lua.
#85
Well Lua can't *do* anything that the main engine can't do really. It's just much faster so you can do things that are prohibitively slow in the main engine.

So if the api exposes the functions (I dont know anything about 8bit stuff) then it would be faster in lua.
#86
A vectorised list is not an array.

maybe:

Code: c++

typedef std::vector<bool>     BoolList:
#87
Ahhhh that pixelformer code is rubbbbbiiisssshhhh. I really need to make a new version.

But yea, what you need to do is broadly called Euler Integration. Which is basically addition.

Instead of adding all the vy at once you step it by a reasonable degree. So if you're falling at a rate of 5 px per frame you step it one at at a time and calculate the collisions for each step.

Pixelformer used a bitmask (region) for the collision map which is about the most complicated form of collisions to handle but broadly it goes like this:

1 - Integrate acceleration and velocity to compute the desired difference in position (how far you move that frame)
2 - Step each axis separately, a pixel at a time, starting with the one with the largest absolute difference.
3 - For the horizontal movement, offset the player hitbox by 3 pixels to the top, so he can climb slopes.
4 - Scan ahead, by checking against all valid obstacles and the bitmask itself, to determine how many pixels it is able to move before hitting an obstacle. Move to this new position.
5 - If this was horizontal movement, move as many pixels up as necessary (which should be up to 3) to make up for slope.
6 - If, at the end of the movement, any pixel of the character is overlaping with any obstacle, undo the movement on this axis.
7 - Regardless of result of last condition, proceed to do the same for the other axis.

Hope that helps.
#88
Editor Development / Re: .NET version
Mon 15/09/2014 15:49:08
Thats partially why I suggested .NET 3.5

I've been working on factoring out the native libraries and it's very troublesome so waiting for that is not viable.
#89
Editor Development / Re: .NET version
Mon 15/09/2014 13:53:09
It's worth noting, pursuant to Radiant's concern in the linked thread, that it's not a large migration. It's simply a change of a configuration variable.

Of course, if new code is written which takes advantage of new features (linq really) then the process is not reversible.

It is purely something to make development easier rather than a change for the user base
#90
A few comments on the lua thingy:

The proper way to iterate a table is to use an iterator like this:

Code: lua


for k,v in ipairs(snowflakes) do
    --k is the index and v is the object
    v.x = v.x + 1
end



ipairs works by stepping through a table from 1 upwards until it hits null so it wont get properties like myTable.x but will work for tables like { 3, 5, 6, 8 } which are similar to arrays.

If you want to iterate through named items like x, y and so forth you can use pairs instead.

Also, when initializing objects you can do this:

Code: lua

local snowflake = { x = 1, y = 2 }


So to rewrite your code with a bit better Lua form:

Code: lua

snspr = love.graphics.newImage("SPR/snow.png")
flake_array = {}
 
function spawn_flakes()
    for i = 1, 100 do -- lua tables start at 1. Don't force it to start at 0 or weird things will happen with iterators and stuff
        table.insert(flake_array, { x = math.random(800), y = math.random(600) })
    end
end
 
function flake_update(dt)
    for index, flake in ipairs(flake_array) do
        flake.x = flake.x + math.random(-50, 50) * dt
        flake.y = flake.y + 1
        if flake.y >= 600 then
            flake.y = 0
        end
    end
end
 
function flake_draw()
    for index, flake = ipairs(flake_array) do
        love.graphics.draw(snspr, flake.x, flake.y)
    end
end


#91
Editor Development / .NET version
Sun 14/09/2014 18:19:29
I know this has come up before but can we discuss moving the AGS Editor to a higher version of the .net framework?

.NET 2.0 was released nearly 10 years ago.

I suggest we move to .NET 3.5 mainly to take advantage of LINQ which is supported in Mono.
3.5 has very high usage and is supported right back to windows 2000

It doesn't require any source migration, just a flag change in the csproj file.

Thoughts?
#92
There is significantly more.

The AGS-Lua link is purely manual. If you want to trigger AGS events in lua then you need to wire that up yourself.

You need a fairly good grasp of programming before you'll be able to understand how this is done.
#93
I'll make a test case to see if i can reproduce it more reliably.
#94
Hey guys!

I've just updated the first post with some new screenshots.
#95
I just got this error:

---------------------------
Illegal exception
---------------------------
An exception 0xC0000094 occurred in ACWIN.EXE at EIP = 0x0046FC3C ; program pointer is +1004, ACI version 3.3.1.1167 CR, gtags (132,511)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.

in "GlobalScript.asc", line 216


Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------

It occurs when drawing a transparent sprite with alpha onto another 32bit sprite at very specific transparency values. 50 works fine but 58 crashes it. 80 also crashes it.

Any ideas?
#96
General Discussion / Re: We are not bemused
Mon 25/08/2014 19:32:08
In that sense it's used as a replacement for "simply" really. He's saying "Then you can just do X, that's all you have to do, there's nothign else."
#98
Editor Development / Re: AGSEditor using mono
Tue 19/08/2014 17:28:15
I'm making progress, damnit!

Scintilla has been stripped out now and the replacement is about 80% complete.

All the drawing and CLib functions in native will be easy to convert which just leaves the compiler which is beyond my skill level i'm afraid.
#99
I assume the preprocessor runs before the compilation to the IL so I dont think you can use it like that since mono runs precompiled binaries.
#100
I really like the idea of pseudonyms.

Each panel member could be assigned an adventure game related pseudonym like Guybrush or Green Tentacle or whatever and then you could understand the broader context of the rating. Some panelistas are harsher than others and being able to see who rated it in relation to all the other ratings would be great.
SMF spam blocked by CleanTalk