thegrb93 / StarfallEx

Starfall, but with active development and more features. Write Garry's mod chips similar to E2, but in lua
https://discord.gg/yFBU8PU
Other
199 stars 111 forks source link

Stuff to add #12

Closed thegrb93 closed 8 years ago

thegrb93 commented 8 years ago
suunr commented 8 years ago

much cooler list

Orzlar commented 8 years ago

and I trust Team Functions include teamColor() :+1:

thegrb93 commented 8 years ago

Team is done. Tested it a little, but not fully so let me know if there are any mistakes.

thegrb93 commented 8 years ago

Finished attachment stuff

thegrb93 commented 8 years ago

The Bone one will take a very long time and I might need some help since it has so many functions. Idk I might do it, but I'm getting pretty tired for today. I'll finish npc tho.

thegrb93 commented 8 years ago

Finished npc.

suunr commented 8 years ago

Something like e2's egpMaterialFromScreen would be also useful. Also some callback if you load a texture from an URL would be good.

Also some way to catch every error, even quota errors. Maybe by delaying (3 seconds?) the call of the errorfunction, so it doesnt get abused. Would be great for sandboxing

thegrb93 commented 8 years ago

Let me look up what egpMaterialFromScreen actually does and I'll add a texture load callback for urls. You can catch errors with the try() function, but the quota error is specifically designed to be uncatchable. I'm not sure if allowing quota error to be caught but running the catch function after a delay is good design. I think it would be better design to put cpu monitors on the heavy loops to prevent it from going over quota.

suunr commented 8 years ago

If you want to sandbox some lua, you can't control it's quota

thegrb93 commented 8 years ago

I guess it can call the catch function next frame so that the quota has time to go down a bit. I will experiment with it.

suunr commented 8 years ago

render.getScreenInfo() always returns nil if you connect the chip to a HUD.

suunr commented 8 years ago

Some way to connect a chip to a screen with a function like entities.self():linkTo( screen )

suunr commented 8 years ago

You can't select the model of the component with the UI

suunr commented 8 years ago

A preprocessor to let a chip only run serverside or clientside

thegrb93 commented 8 years ago

I'm going to be studying for my physics ph.d qualifier exams which are next tuesday and wednesday so I have to postpone this until afterwards. Once that's finished I'll be able to add these suggestions.

suunr commented 8 years ago

hook.runRemote doesn't work; already fixed in inpstarfall

suunr commented 8 years ago

Errors get set into everyone's clipboard

suunr commented 8 years ago

getFFT for bass

suunr commented 8 years ago

something like Player:isTyping()

thegrb93 commented 8 years ago

Returns true if the player has their chat window open?

suunr commented 8 years ago

yes

thegrb93 commented 8 years ago

I think you can use the renderTarget functions for egpMaterialFromScreen. I'm not sure what you want from that, but let me know.

thegrb93 commented 8 years ago

render.getScreenInfo() returns information about the screen prop itself, such as offsets or the projector and stuff. That's why it returns nil if a hud is used. I'll update the doc for that.

thegrb93 commented 8 years ago

I'll add a way to get the screen resolution

suunr commented 8 years ago

Multiply metamethod for colors

suunr commented 8 years ago

Stop the bass sounds automatically when the starfall errors

thegrb93 commented 8 years ago

Also need to make vector maths invariant to the side the scalar is on.

thegrb93 commented 8 years ago

I don't think I like errors getting put into my clipboard. How about I make the starfall tool copy the chip's error to clipboard when pressing r while aiming at the chip?

suunr commented 8 years ago

That's how its supposed to work (except you need to press e)

thegrb93 commented 8 years ago

Okay, I'll fix that. I'm almost done modifying the helper so examples show in it.

suunr commented 8 years ago

Let constraint library have more check types.

thegrb93 commented 8 years ago

The checktype system is stupid. I'm thinking about just making starfall functions protected call so that they can correctly report garrysmod's own typechecking errors.

suunr commented 8 years ago

It's not stupid. It shows the error fast and displays the line. Some starfall users dont even know glua and dont know what to do with gmod typechecking errors.

thegrb93 commented 8 years ago

I can map the glua error to a user readable sf error

thegrb93 commented 8 years ago

Egh I don't know, I need to think about it more. The redundant type checking is really unhealthy for performance. I'll get around to adding more of it to the constraint library.

suunr commented 8 years ago

Change the function to get the chip from self to something like chip, processor. self is commonly used and dont think it's good to have it globally

thegrb93 commented 8 years ago

Yeah I completely forgot about that. Thanks.

suunr commented 8 years ago

Trails

suunr commented 8 years ago

You can use the file library on every client and on the server. You can abuse it by making many many files with much data.

suunr commented 8 years ago
addons/starfallex/lua/starfall/libs_cl/render.lua:743: attempt to compare number with nil
stack traceback:
    addons/starfallex/lua/starfall/libs_cl/render.lua:743: in function 'createRenderTarget'
    SF:DrawImage.txt:14: in function 'func'
    addons/starfallex/lua/starfall/instance.lua:38: in function <addons/starfallex/lua/starfall/instance.lua:37>
    [C]: in function 'xpcall'
    addons/starfallex/lua/starfall/instance.lua:71: in function 'runWithOps'
    addons/starfallex/lua/starfall/instance.lua:133: in function 'initialize'
    addons/starfallex/lua/entities/starfall_processor/cl_init.lua:54: in function 'CodeSent'
    addons/starfallex/lua/entities/starfall_processor/cl_init.lua:74: in function 'func'
    lua/includes/extensions/net.lua:32: in function <lua/includes/extensions/net.lua:17>

when trying to create a rendertarget with render.createRenderTarget

suunr commented 8 years ago

Add to von library starfall types.

Orzlar commented 8 years ago

entity:setVar, entity:getVar, maybe limit these per chip, and have entity:getGVar for global sharing.

I understand this can be created as a library using starfall already, but as its native in glua, could be handy to have it built in.

suunr commented 8 years ago

You can just use rawset and rawget on entities.

thegrb93 commented 8 years ago

Don't know why they thought unlimited filesaving to the server was a good idea. I fixed the permission that was allowing it on other clients. Fixed rendertarget. I'll see how von is implemented and fix that.

suunr commented 8 years ago

1024x1024 screens

McDunkinY commented 8 years ago

Honestly, I've used 3D2D cameras a lot and I haven't noticed a drop in performance if the resolution of the camera is increased. The only issue is with fonts because they can only get so big. By allowing for bigger resolution / scale, fonts and everything else become sharper. I use 0.1 scale on the screens and multiply the size of everything by that scale, including font sizes.

So yes, even if it's not fixed to 1024, at least a scale multiplier set in code as a pre-processor or just completely change 512 as the default

thegrb93 commented 8 years ago

All of the drawing is done on a rendertarget which is handled by wirelib and all the resolutions are locked at 512x512. I'll need to pr a function that can change the resolution of the rendertarget, or I'll need to give the screen it's own rendering code. I'll make scrW() and scrH() return the resolution of screen theyre attached to.

suunr commented 8 years ago

Can't move the starfall editor out of the garrys mod window (into invisible area). Annoying if you play in window mode and with low resolution.

thegrb93 commented 8 years ago

I think I remember that reported in garrysmod-issues.

suunr commented 8 years ago

Do a syntax check of the program before sending it to the client. 2 Errors of the same syntax error is useless.