Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Everything posted by Rick

  1. Was just thinking that since the game player in LE is sandbox mode (I believe) and you can't use file i/o in sandbox mode, I was wondering if there is a way we can tell we are running from the gameplayer in our scripts? Might be nice to know this so we can skip calling i/o functions to avoid errors instead of needing different scripts of the game to run in the game player vs not using the game player.
  2. @Fire Side note: if you start using file system stuff I don't believe the game will work in the LE player as it's sandbox mode and i/o doesn't work in sandbox mode. Just something to consider if you wish to use the player for demo reasons as well. You'll want to create a means to skip file io when ran from it.
  3. You can make your variables part of App and you'll be good and they will have some "namespace" to them and not just floating globals. App.runes= 0 App.boneCharms = 0 -- etc... SpecialItem.lua Script.name = "" --string "Special Item Name" function Script:Use() App[self.name] = App[self.name] + 1 end Then give your special name setting the same name as your App variabels like "runes", "boneCharms" on the entity/model they are attached to.
  4. I think asking for money too early is where the mistake is. Just putting it out there in screenshots/video and some kind of playable demo I think doesn't hurt much. People knowing the name of your game isn't a bad thing. Getting people to know the name is the hardest part. There are so many games out there.
  5. I've read in some places that talk about where you should make a video with yourself talking to the camera/people for your crowd funding. They are giving money to YOU as much or more than they are your game. It's about trusting you and that you can deliver. This is why the most people who are successful on these have past reputation in the game industry (a secret that you don't hear that much). You have to really put yourself out there for this stuff. Note that your age probably isn't going to help you any sadly, so you'll have to work extra hard to get that money.
  6. It's probably best to set all of these in App.lua Start() so you know where they all are. It's best to write down on paper what responses you want first can it can get complicated quickly. Also note these are global flags. So not sure why you would set 30 and prop to trigger in 2 different places. You only have to do it once and it'll be global response.
  7. Look at the AnimationManager.lua file that comes with all projects. It gives an idea of how you can "simulate" classes in Lua.
  8. Isn't local and global positions for standalone objects the same? So they could still be showing local positions in the editor but they would have the same values so we wouldn't know the difference. My understanding of this is that global positions are to the world and local positions are to their parents. Non parented objects would have the world as the parent by default so it's local and global position are the same. I don't think this is an "issue". I think it's by design. If you have children and scale the parent the local positioning will be affected, but you can always get the global positioning if you want. The point of the local positioning is to be affected by it's parent. So it's not really an issue/bug.
  9. print out to the console some of those positions using Sytem:Print(). That'll tell you what the values are and if they make sense.
  10. Oh, nevermind I see what he's doing now. So you made 3 pivots and make them children of your character. So in the editor those pivots are far enough apart and their y location is at ground level?
  11. I'm confused about that script. Are you attaching that to the character? Why are the pivots built into the character? That seems a little odd to me. You'd be better off taking pivots as parameters to the script (as a basic way of handling it). That way scaling of your model has nothing to do with the waypoints (as I'd argue they shouldn't have anything to do with each other).
  12. If you have prefabs with child objects I seem to recall selecting the object in the 3d perspective always selects the entire prefab. Scene graph is how you can select only child object of the prefab as far as I've seen.
  13. Yeah Josh is anti-sticky for some reason. I'm not exactly sure why.
  14. What about making hit boxes on those limbs? Doing this visually is ideal. Would be cool to add this to the model editor and have it saved with the mdl file really.
  15. This is very cool. I think a more interesting GUI would make this top notch though. If you think about this you are really building a marketplace here. Look at mobile/console marketplaces and see how they have things structured to get ideas. Categories, searches, more fluid/interesting scrolls. Developer Recommendations etc. You can really turn this into little sub-steam honestly.
  16. Can you show us your callback code for ForEachEntityInAABBDo
  17. Rick

    2D UI masking

    This is brilliant Shadmar! Thank you.
  18. Rick

    2D UI masking

    I need help lol So you can do a 2D shader that allows masking? I guess I always thought shaders were for 3D stuff or post effects on the entire final image. I think ideally it would be like a real 2D masking system. Draw the background image, draw the mask on top and it eliminates pixels from the last underlying 2D image drawn on the masked part. The mask would be black and white image where white is shown and black is the mask or something like that. That's how I vision using something like this in my head I guess. I suppose you'd have to do all of this on a separate buffer and then draw that buffer (the final result) to the screen. Or I suppose if this can be done in a shader you give the actual texture in 1 slot, the mask in another and when you are drawing the actual texture you do lookups pixel by pixel on the mask and only draw the actual texture pixel if it's white in the mask pixel. If it's black you discard the pixel.
  19. Rick

    2D UI masking

    Imagine you have a hallow circle. Behind that is drawn a red rectangle, however all you see is a red circle. You are able to move that red rectangle down when drawing it and it'll look like the health is dropping. The reason is needs to be a red rectangle? Well because the circle could be any shape you want. It could be a very complex shape but you only want the red to show where the shape is and the rest of the red rectangle won't show. http://www.html5rocks.com/en/tutorials/masking/adobe/
  20. Rick

    2D UI masking

    I seem to recall someone had this working once and I never could but can't find the post. Think of how diablo has their bubbles for health or mana where it has this overlay container and under it is the red image. The overlay container has transparent areas but the underlying red image doesn't but the only thing that's drawn for the red background is whatever is visible in the top container. It's almost like the transparent parts of the overlay also take effect to the underlying red rectangle image. Does this make sense? Anyone know how to do this? Some sort of masking I would imagine.
  21. Lua is case sensitive. It's SetPosition() not setPosition()
  22. Have you imported any of these in LE? I assume LE doesn't treat them as separate entities? What was the framerate like?
  23. I didn't make it just found it and thought I'd share
  24. Yeah. To explain the below on how it's used. You have some lua table (music in this case) that can have whatever you want in it. You then create the tween object (which you need to hang onto because you need to call it's update function each frame) passing in how long you want the entire tween to take (10 in this case(note this isn't seconds but it's a value that will always be the same depending on what you pass into the update function for timing)), then pass in the lua table that it's going to modify (music in this case), and then pass in a table that has the same property name as the table has that you want modified (volume in this case) and the end value (5 in this case). -- increase the volume of music from 0 to 5 in 10 seconds local music = { volume = 0, path = "path/to/file.mp3" } local musicTween = tween.new(10, music, {volume = 5}) ... musicTween:update(dt) So it knows to adjust the volume setting in the music table to a max value of 5 over time 10 duration.
  25. You check for mouse clicks over the image position on screen. This is a simple point in rect. function MouseOverArea(mpos, area) if mpos.x < area.x then return false if mpos.y < area.y then return false if mpos.x > area.x + area.width then return false if mpos.y > area.y + area.height then return false return true end local mousePos = App.window:GetMousePosition() -- the second argument is a table that holds the button dimensions if MouseOverArea(mousePos, { x = 0, y = 0, width = 100, height = 50}) then -- the mouse is over the rectangle area of our button end
×
×
  • Create New...