Jump to content

Braqoon

Members
  • Posts

    69
  • Joined

  • Last visited

Posts posted by Braqoon

  1. Hi, This might be trivial but not sure how to solve this. I have crated a simple model in Blender with texture and exported it to .fbx. Imported that to Leadwerks without issue, set collision mesh and placed in 3D space (see attached pic). This is my character in the game ,  Roomba like cleaning robot. So when i start the game , robot gets flipped 90 degrees. What gives ? When i create a simple cylinder, size of of my object and attach my player script all is fine, cylinder does not flip, and works just fine. Not sure what's going on, any help apprecieated. Player script below.

    function Script:Start()
        --Create a camera
        world:SetAmbientLight(0,0,0)
        self.camera = Camera:Create()
        --Update the camera
        self:UpdateCamera()
        --Initial Vars
        self.entity:SetMass(1)
        self.entity:SetPhysicsMode(Entity.CharacterPhysics)
        self.pos = 0
        self.minimal_speed = -3
        self.max_speed = 3
        self.lives = 3
        self.speed = 0
        self.tilt = 0
        energy=100.0    
        energy_max=100.0
        energy_min=0
        self.energy_depletion = 0
        self.lastTime = Time:Millisecs();
        self.torch = PointLight:Create() 
    end
    --Adjust the camera orientation relative to the ball
    function Script:UpdateCamera()
        self.camera:SetPosition(self.entity:GetPosition())
        self.camera:SetRotation(45,0,0)
        self.camera:Move(0,4,-7)
    end
    
    function Script:UpdatePhysics()
        --Get the game window
        local window = Window:GetCurrent()
    end
    
    function Script:UpdateWorld()
        --Update the camera each frame
        if energy > 0 then
            -- move if you got energy
            local move = ((window:KeyDown(Key.Up) and 1 or 0) - (window:KeyDown(Key.Down) and 1 or 0))*3
            local strafe = ((window:KeyDown(Key.Right)and 1 or 0) - (window:KeyDown(Key.Left) and 1 or 0))*3
            if window:KeyDown(Key.Up) or window:KeyDown(Key.Down) or window:KeyDown(Key.Left) or window:KeyDown(Key.Right) then
                if energy > 0 then
                    if (Time:Millisecs() > self.lastTime + 80) then
                        self.lastTime = Time:Millisecs();
                        energy = energy -1
                    end
                end
            end
            self.entity:SetInput(0,move,strafe)
        else 
            -- out of energy, can't move
            move = 0
            strafe = 0
            self.entity:SetInput(0,move,strafe)
        end    
        -- Light
        --light = SpotLight:Create() 
        self.torch:SetPosition(self.entity:GetPosition())
        self.torch:SetRange(0.2,1.5)
        self.torch:Move(0,1,0)
        --self.torch:
        self:UpdateCamera()
        
    end
    
    function Script:PostRender(context)
        context:SetBlendMode(Blend.Alpha)
        context:DrawText(energy,context:GetWidth()-30,4)
    end

     

    leadwerks.jpg

  2. Yes it, does. I would suggest in future builds to have full screen/windowed mode toggle.

    Linux version of LE game launcher is no longer supported (check bugs section of the forum). Launcher still works hence I was able to check your game.

     

    Otherwise game was playable so not a massive problem.

  3. The Linux interface was introduced in a hurry for the release of SteamOS. It's not very good, and SteamOS hasn't taken off.

     

    Is that means that you not going to fix it cos SteamOS not destroyed Windows ?

    I don't need super pretty, usable will be great. Can you please at least change window to be resizeable ?

     

    SpEcIeS - in KDE win key have no use if used as standalone. Resize will not work if window have not have right mode on.

    • Upvote 1
  4. Yes, I understand that, basics are simple. I'm wandering how should I approach where collision is a trigger to do other things.

     

    Take for example a shooter game (which I got it working), so if ship collides with something that it's not an entity I have no way of telling what it was, and I have to apply one rule for all on such collision. That makes me think that if I want this ship of mine to eg. bounce of the side walls, those walls needs at least a name that collision function of my ship can detect. Otherwise any wall will just trigger collision in the same way and here I might don't want that.

  5. Hi,

     

    Game Launcher window when started is maximised and goes off screen. There is no way to adjust the size of the window, and buttons at the bottom are almost off the screen. This not really looking good and will put off users from using it.

     

    I'm using KDE (which is available in Ubuntu if somebody wants to be picky about supported distro)

     

     

    IMO trying going to full screen is pointless especially if launcher have such a basic design.

     

    Attached screen is not cut off, this is how it looks with hidden task bar, whole desktop area and to already answer potential question. I had to hide my task bar in order to start the game (button click), otherwise buttons are not visible.

    post-14775-0-73221700-1456793569_thumb.jpg

  6. Hi,

     

    So on collision if object we are colliding with has a script attached to it it will be an entity with eg. name

     

    function Script:Collision(entity, position, normal, speed)
    if(entity:GetKeyValue("name") == "wall") then
    --Do Something
    end
    end
    

     

     

    Now I guess that in order to code specifically certain behaviours based on what object I'm colliding with, that object should be an entity which equals to have a script attached to it, right ? regardless is that a primitive or a prefab model. Even if that object is doing nothing apart from being just an obstacle. Is that correct ?

     

    Is that approach is one that everybody is using or should be used or is there another, simple, go to method of finding about an object player have just collided with ?

  7. I'm no expert but looking at your script, you don't control over real speed of the ball.

     

    I personally would not use :

    self.entity:Move((dirX * ballSpeed),0 , (dirZ * ballSpeed),true)
    

    Why you are multiplying ? This makes you ball to accelerate very quickly.

     

    In your pad movement you are using

    self.entity:Move(0,0,padSpeed,true)
    

    which makes more sense as you moving your object by a constant speed , here padSpeed. Have you tried applied same schema to ball movement ?

  8. Bugs are not distro specific, I'm running into same problems on Slackware. Engine works but there is still lot's of to do ...

    Maybe creator can focus more on fixing Linux bugs and bring Linux version more in line with Windows one, just saying.

    • Upvote 2
  9. I think some short tutorials on specific subjects will be great. Marble game tutorial is very good, but for example is missing how music is playing. I know there is a pivot with noise script, but I have found it by looking for it and guessing. Also why it's nested in pivot is not explained. If it's expected in LE to look into API and Forums on how to do specific but commonly needed things in game then you guys creating a barriers of any new user. Don't expect users are experienced game developers. LE allows to create FPS games with almost no need for coding which is amazing but try to do something extra and hurdle is present. Create tutorials for complete noobs, 12yr olds or users who never tried to do anything in gamedev, then your userbase will grow even more and LE will become more popular. Unity, game maker and alike are so popular due to community, and as harsh it might sound we are still way to small.

     

    Don't add new features and add more tutorials about simple things. I can give you few eg.

     

    How to detect what is colliding with the player

    How to share vars between maps ( I know it's simple but for noobs it's not)

    How to do a title screen (probably a tutorial no.1)

    Text positioning

     

    List is long, but think about what complete green person will need.

  10. first RTFM as they say, but truth to be told:

     

    "Window::FullScreen: the window will take up the entire screen, and the screen resolution will be changed to match the window size."

     

    That does not do what it says at least on the Linux version. It just removes window borders and will not resize to the fullscreen. So you need to readjust screen resolution (I currently don't know can LE probe for current resolution of the display), then apply new resolution and change to Fulscreen to remove border decoration.

  11. As you probably seen my posts in programming section of the forum, I'm try to create something as well. This is my first go at 3D engine but it's going OK minus my little frustrations self-inflicted or otherwise. I'm doing an simple Shm'up and I hope to provide one playable level. Will share some screenshots soon. Based on feedback it might grow to something bigger.

    • Upvote 1
×
×
  • Create New...