1. Post #281
    Gold Member
    vexx21322's Avatar
    December 2008
    9,847 Posts
    Only when thinking in terms of moving game assets about in the world.
    In terms of rendering x & y are x and y on your screen and z is depth into the screen.
    That said, I personally use map orientated coordinates and just transform them in the renderer but hey, it's Notch.
    Huh, I never thought about it that way.

  2. Post #282
    origamiguy's Avatar
    September 2011
    181 Posts
    Don't get me wrong, I'm very used to the concept of Z being up; Quake engine does this, Source (which is derived from quake) does, as does just about every game I've had the pleasure of reverse-engineering the map files for.

    It was simply the idea that a Minecraft modding platform would use a differing co-ordinate system that messed up my head.
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Agree Agree x 2 (list)

  3. Post #283
    Map in a box's Avatar
    July 2009
    5,794 Posts
    The norm is still X Z Y for OpenGL though IIRC

  4. Post #284
    Gold Member
    LuaStoned's Avatar
    September 2007
    1,300 Posts
    The problem with script enforcement on an open source client is that cheaters can just compile their own version with it disabled.
    You can't compile LuaCraft on your own so we could implement it..

    Anyway, I am back from 5 days of no internet, so prepare for updates! :D
    Reply With Quote Edit / Delete Reply Windows 7 Austria Show Events Winner Winner x 1 (list)

  5. Post #285
    Gold Member
    thomasfn's Avatar
    July 2008
    2,641 Posts
    The norm is still X Z Y for OpenGL though IIRC
    OpenGL's coordinate system is whatever you choose in your projection/view matrices, but I believe the standard is X/Y/-Z - so positive Z is coming out of the screen.

  6. Post #286
    Agile's Avatar
    August 2011
    38 Posts
    This looks epic, bro. Once I get into lua scripting, this will be a great client for me to practice on. I have a great idea for a addon, but im not so good at lua so ill try and practice untill then so I can implement it into LuaCraft. Anyway, great work.
    Reply With Quote Edit / Delete Reply Windows XP Canada Show Events Dumb Dumb x 3 (list)

  7. Post #287
    cvbbot's Avatar
    April 2012
    12 Posts
    hey still ain't got a reply on my super-great awesome suggestion

    Hey here's a suggestion: add a function to check what special effects are currently affecting the player (like poison, swiftness,...) maybe make it return a table of strings or a table of numbers

  8. Post #288
    Gold Member
    LuaStoned's Avatar
    September 2007
    1,300 Posts
    hey still ain't got a reply on my super-great awesome suggestion
    Sorry must have overread that, will look into it!
    Reply With Quote Edit / Delete Reply Windows 7 Austria Show Events Late Late x 1 (list)

  9. Post #289
    origamiguy's Avatar
    September 2011
    181 Posts
    -snip-

  10. Post #290
    Gold Member
    Elspin's Avatar
    December 2006
    2,785 Posts
    Only when thinking in terms of moving game assets about in the world.
    In terms of rendering x & y are x and y on your screen and z is depth into the screen.
    That said, I personally use map orientated coordinates and just transform them in the renderer but hey, it's Notch.
    That doesn't make any sense, using your same logic if I'm looking downwards or upwards the logical choice is XY


    fuck if I'm looking up at a 45 degree angle which co-ordinate system do we use

  11. Post #291
    Gold Member
    Lexic's Avatar
    March 2009
    5,782 Posts
    That doesn't make any sense, using your same logic if I'm looking downwards or upwards the logical choice is XY


    fuck if I'm looking up at a 45 degree angle which co-ordinate system do we use
    What? What does looking have to do with anything?
    Reply With Quote Edit / Delete Reply Mac United Kingdom Show Events Agree Agree x 1 (list)

  12. Post #292
    Map in a box's Avatar
    July 2009
    5,794 Posts
    I've added a simple Script-Enforcer like thing. It's not perfect by far but it gets the job done.

  13. Post #293
    Gold Member
    BlackAwps's Avatar
    July 2011
    768 Posts
    Started adding NPCs.



    Will add a metatable to control them and stuff soon!

    Edited:

    Alight, so I made it so you can control a NPCs AI.

    chatcommand.Add( "npc", function( ply, cmd, args )
    
    	local tr = ply:Trace()
    
    	local npc = ply:GetWorld():Create( "NPC" )
    	npc:SetPos( tr.HitPos )
    	npc:SetName( ply:Nick() )
    	npc:SetAvoidWater( true )
    	npc:AddAITask( 0, "Swim" )
    	npc:AddAITask( 1, "Wander", 0.25 )
    	npc:AddAITask( 2, "WatchClosest", "Player", 6, 0.02 )
    	npc:AddAITask( 2, "Idle" )
    	npc:Spawn()
    
    end )

    This will spawn a dummy version of myself who will try to stay out of water, swim if it has to, wonder around with a speed of 0.25, watch and look at any players in a 6 block radius or idle.
    There's a ton of AI tasks I binded, so here's a giant compilation.

    Code:
    EntityLiving: "ArrowAttack", float, int, int
    EntityLiving: "AttackOnCollideAll", float, boolean
    EntityLiving: "AttackOnCollideClass", float, boolean
    EntityCreature: "AvoidClass", float, float, float	
    EntityWolf: "Beg", float
    EntityLiving: "BreakDoor"
    EntityCreeper: "CreeperSwell"
    EntityIronGolem: "DefendVillage"
    EntityLiving: "EatGrass"
    EntityCreature: "FleeSun"
    EntityVillager: "FollowGolem", 
    EntityTameable: "FollowOwner", float, float, float
    EntityAnimal: "FollowParent", float
    EntityLiving: "HurtByTarget", boolean
    EntityLiving: "LeapAtTarget" , float
    EntityIronGolem: "LookAtVillager"
    EntityLiving: "Idle",
    EntityAnimal: "Mate", float
    EntityCreature: "MoveIndoors"
    EntityCreature: "MoveThroughVillage", float, boolean
    EntityCreature: "MoveTowardsTarget", float, float
    EntityCreature: "MoveTwardsRestriction", float
    EntityLiving: "NearestAttackableTarget", [[String]]: Entity Class, float, int, boolean, boolean
    EntityLiving: "OcelotAttack"
    EntityCreature: "OcelotSit"
    EntityLiving: "OpenDoor", boolean
    EntityTameable: "OwnerHurtByTarget"
    EntityTameable: "OwnerHurtTarget"
    EntityCreature: "Panic", float
    EntityVillager: "Play", float
    EntityCreature: "RestrictOpenDoor"
    EntityCreature: "RestrictSun"
    EntityTameable: "Sit"
    EntityLiving: "Swim"
    EntityTameable: "TargetNonTamed", [[String]]: Entity Class, float, int, boolean
    EntityCreature: "Tempt", float, int, boolean
    EntityCreature: "Wander", float
    EntityLiving: "WatchClosest", [[String]]: Entity Class, float, float
    The EntitySOMETHING: indicates what base class it's meant for, the stuff after is what you would use with AddAITask and AddAITaskTarget like in my example.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Winner Winner x 9Funny Funny x 2 (list)

  14. Post #294
    Gold Member
    Elspin's Avatar
    December 2006
    2,785 Posts
    What? What does looking have to do with anything?
    The backwards logic you were using is that you can decide which co-ordinate system by how x and y would match up to your screen, but in a 3d game mapped to a 2d surface, the co-ordinates along the screen would be different based on your view. You can't say that x being left and right and y being up and down fits to the screen right, because when you look in a different direction the co-ordinate along the screen will be different.

    More related: the AI looks awesome.
    Reply With Quote Edit / Delete Reply Windows 7 Canada Show Events Disagree Disagree x 1 (list)

  15. Post #295
    Gold Member
    Lexic's Avatar
    March 2009
    5,782 Posts
    The backwards logic you were using is that you can decide which co-ordinate system by how x and y would match up to your screen, but in a 3d game mapped to a 2d surface, the co-ordinates along the screen would be different based on your view. You can't say that x being left and right and y being up and down fits to the screen right, because when you look in a different direction the co-ordinate along the screen will be different.

    More related: the AI looks awesome.
    It's not backwards logic, that's how it works. OpenGL and DirectX both use that coordinate system, so it's not just some retarded theory I pulled out of my ass.
    Everything is rendered from a static camera in screenspace, with -1,-1,-1 being the top left corner of your screen and 1,1,1 being the bottom right of your screen and as far "in" as your screen goes.
    World Geometry has to be translated and scaled into screenspace in order to be rendered, and for the lazy programmer it's easier if you don't have to change coordinate systems while doing this.
    Which way you're "looking" has absolutely no bearing on the coordinate system, because looking is just another series of translations and rotations that need to be applied to the geometry.
    Reply With Quote Edit / Delete Reply Mac United Kingdom Show Events Dumb Dumb x 1Informative Informative x 1 (list)

  16. Post #296
    Gold Member
    Elspin's Avatar
    December 2006
    2,785 Posts
    It's not backwards logic, that's how it works. OpenGL and DirectX both use that coordinate system, so it's not just some retarded theory I pulled out of my ass.
    Everything is rendered from a static camera in screenspace, with -1,-1,-1 being the top left corner of your screen and 1,1,1 being the bottom right of your screen and as far "in" as your screen goes.
    World Geometry has to be translated and scaled into screenspace in order to be rendered, and for the lazy programmer it's easier if you don't have to change coordinate systems while doing this.
    Which way you're "looking" has absolutely no bearing on the coordinate system, because looking is just another series of translations and rotations that need to be applied to the geometry.
    You're still not getting it - I'm fully aware of the co-ordinates used in OpenGL and DirectX (I am in fact a programmer), and I see the mistake you're making when you're reading my posts, but I can't seem to convey to you what's wrong with your logic. I'll try it this way:

    In terms of rendering x & y are x and y on your screen and z is depth into the screen.
    Look at what you're saying here - that the x and y on your screen match up to the co-ordinate system. But say your game is an RTS, or a simple top-down game - the co-ordinates will not match up. Now, believe me, I'm fully aware you can translate things based on your camera's view point, but what I'm saying is it doesn't make sense to claim that one co-ordinate system makes more sense than an other based on what is essentially different for each game.

    The real decision when you're choosing a co-ordinate system is not which direction is up, but rather to use the left handed or right handed co-ordinate system, which will actually impact the math you use. DirectX and OpenGL actually use opposite co-ordinate systems in this respect. I was taught using the left-handed co-ordinate system, so that makes more sense to me - but your game engine determines what is up and down, not your rendering engine. IE, the source engine having up and down being Z despite being based on DirectX or OpenGL.

  17. Post #297
    Gold Member
    Lexic's Avatar
    March 2009
    5,782 Posts
    I never said one was better than the other, I briefly outlined why Y was up in minecraft:
    That's how it is by default in OpenGL and Notch is lazy.
    I was certainly not preaching the wonders of using screenspace coordinates for your assets, because as you say, that would be fucking stupid.

  18. Post #298
    Map in a box's Avatar
    July 2009
    5,794 Posts
    So much which ways up

  19. Post #299
    T3hGamerDK's Avatar
    January 2011
    2,551 Posts
    So much which ways up
    I think we need a new standard!

  20. Post #300
    Map in a box's Avatar
    July 2009
    5,794 Posts
    I think we need a new standard!
    WELL SINCE IN SPACE THERE IS NO UP how about every direction possible?

  21. Post #301
    cvbbot's Avatar
    April 2012
    12 Posts
    let me end this discussion with an ultra-simple drawing explaining the coordinate system


    EDIT: Well FUCK, i said end the discussion, not the whole goddamn thread
    Reply With Quote Edit / Delete Reply Windows 7 Belgium Show Events Funny Funny x 4Informative Informative x 3Optimistic Optimistic x 1 (list)

  22. Post #302
    I'm cool because I have a title period
    Fleskhjerta's Avatar
    May 2009
    392 Posts
    Why dying thread ?
    Reply With Quote Edit / Delete Reply Windows 7 France Show Events Agree Agree x 3 (list)

  23. Post #303
    cvbbot's Avatar
    April 2012
    12 Posts
    Why dying thread ?
    looks like ending that coordinate system discussion also killed the thread... or LuaStoned is lua-stoned
    Reply With Quote Edit / Delete Reply Windows 7 Belgium Show Events Funny Funny x 2 (list)

  24. Post #304
    my portfolio
    Matt-'s Avatar
    April 2012
    1,378 Posts
    Project development should regain speed soon enough, finals are finally over for some of the development team.

  25. Post #305
    Gold Member
    Ducky3426's Avatar
    May 2012
    78 Posts
    This is THE shit! :D

  26. Post #306
    Goldest Member
    TylerB's Avatar
    October 2011
    532 Posts
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Funny Funny x 8Winner Winner x 1 (list)

  27. Post #307
    Map in a box's Avatar
    July 2009
    5,794 Posts
    While Garry's Mod is down I might start working on this again. I've just been out of the mood for playing Minecraft lately.

  28. Post #308
    my portfolio
    Matt-'s Avatar
    April 2012
    1,378 Posts
    While Garry's Mod is down I might start working on this again. I've just been out of the mood for playing Minecraft lately.
    I've just set up my development environment.. :grin:

  29. Post #309
    Gold Member
    BlackAwps's Avatar
    July 2011
    768 Posts
    I posted this on our forums since it was requested there, but figured I would add some content here also.

    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Winner Winner x 2 (list)

  30. Post #310
    Self-Boosting Retard
    Weiss's Avatar
    February 2010
    1,076 Posts
    I'd like to say get on the documentation before you go adding more stuff.

    Without good addons LuaCraft isn't going to go anywhere, and without good documentation people unfamiliar with Gmod aren't going to make the switch. I'd love to get started, but I'm pretty sick of having to read code for documentation of late.
    And once it's up to date, keeping it updated only requires someone with time to read changelogs
    Reply With Quote Edit / Delete Reply Windows 7 Australia Show Events Agree Agree x 7 (list)

  31. Post #311
    IliekBoxes's Avatar
    February 2010
    4,573 Posts
    This is pretty awesome. Great job guys

  32. Post #312
    Map in a box's Avatar
    July 2009
    5,794 Posts
    The wiki has documentation though.
    Reply With Quote Edit / Delete Reply Windows XP United States Show Events Late Late x 1Optimistic Optimistic x 1 (list)

  33. Post #313
    PENISCORP DIRECTOR
    Gran PC's Avatar
    August 2007
    2,604 Posts
    It's out of date.
    Reply With Quote Edit / Delete Reply Windows 7 Spain Show Events Agree Agree x 3 (list)

  34. Post #314
    Goldest Member
    TylerB's Avatar
    October 2011
    532 Posts
    It's also wrong on many topics, for example, there are serverside only hooks on the clientside only list.

    There are also functions with wrong arguments and there are functions missing entirely.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Agree Agree x 2 (list)

  35. Post #315
    Markuzsz's Avatar
    June 2011
    36 Posts
    will this ever work on mac ?
    Reply With Quote Edit / Delete Reply Mac Sweden Show Events Dumb Dumb x 4 (list)

  36. Post #316
    Map in a box's Avatar
    July 2009
    5,794 Posts
    People can edit the wiki :V

  37. Post #317
    PENISCORP DIRECTOR
    Gran PC's Avatar
    August 2007
    2,604 Posts
    So wait, you expect US to go looking around LuaCraft's decompiled source code just so we can fill out a tiny bit of documentation?
    Reply With Quote Edit / Delete Reply Windows 7 Spain Show Events Zing Zing x 3Winner Winner x 1Friendly Friendly x 1 (list)

  38. Post #318
    jrj996's Avatar
    July 2009
    1,571 Posts
    Seriously we need some proper documentation, I'm starting a StickRPG type thing for minecraft and having the GUI functions would help.

    NPC's don't work clientside?

  39. Post #319
    Map in a box's Avatar
    July 2009
    5,794 Posts
    So wait, you expect US to go looking around LuaCraft's decompiled source code just so we can fill out a tiny bit of documentation?
    No, you can fix any obvious errors.. Why would I expect you to do that?

    Edited:

    LuaCraft has an auto wiki exporter though. I might try getting it to work later

  40. Post #320
    Goldest Member
    TylerB's Avatar
    October 2011
    532 Posts
    Why doesn't this work?

    hook.Add("fire.spread","test",function(a)  
    	Block(a):SetID(1)
    end)