-
Posts
422 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Scott Richmond
-
-
To be honest I don't know. I'm not even sure that the code you pasted there does. I'm only just getting into LUA. Any explanations would be greatly appreciated.
-
There are a great number of ways to do it. Oblivion/Fallout3 uses a 'Cell' system similar to your concept Eternal Crisis, with the exception that it loads the 8 cells around you procedurally and you can therefore roam between the cells without a loading screen. The problem it had, and this is most evident in-game, is that if you get to a position to view several cells ahead (a distant mountain) then it can look quite bad as it is little more than a tiled texture and terrain.
-
Thanks for the replies guys. I do agree and I'm trying to improve it but I'm still having issues. The current script I have is:
--Include the base script for all classes dofile("Scripts/base.lua") --This function builds the interface for the properties editor function InitDialog(grid) --Add the base interface for all classes base_InitDialog(grid) --Now we can add our own custom properties end --Spawn function for creating new instances function Spawn(model) entity=base_Spawn(model) SetKey(entity, "State", "IDLE") end --Update function, called during every UpdateWorld() function Update(world) currentState = GetKey(entity, "State", "NONE") -- Animation frames: Idle 0-69 Walk 70-130 Run 131-171 if currentState == "IDLE" then endframe = 69 startframe = 0 blend = 1.0 frame = (AppTime()/100.0) % (endframe-startframe) + startframe entity.model:Animate(frame,blend,0,1) end end function SetKey(model,key,value) return base_SetKey(model,key,value) end function GetKey(model,key,value) return base_GetKey(model,key,value) end
Engine.log doesn't report any problems, yet the model doesn't animate which suggests Get/Setkey isn't working as expected. My guess is that I'm not doing those correctly. I'll admit I'm not sure I get the entity and model objects. I'm still confused as to why I have to define the Get/Setkey functions in the first place, aren't they already defined in base.lua? Or are those functions local only?
-
I guess it really comes down to the paradigm you want to build your game in. Its pretty obvious to me that game engines aren't a one-stop shop. You have to the pick the one that ticks the most boxes for you.
For me, I picked LE because this is my first foray into C++ and game development, so having an easy to understand and modern OO engine is very important to me. Everything else is just a bonus.
-
Umm, LoadScene does everything for me...lights, models, etc. It basically runs the Lua script for every entity it loads...
Aye its fine now. I believe it couldn't find the scripts folder.
-
Will be interesting to see how LE and the other engines compare to iD Software's iD Tech 6 engine - It plans to abolish texture restrictions entirely. It looks amazing.
- 1
- 1
-
I'd check out a few photoshop tutorials if I were you. They are generally deceptively easy to make: http://www.photoshopessentials.com/photo-effects/starry-sky/
Thats just a random one I grabbed, just google 'photoshop stars tutorial'.
-
Thanks for your input Rick, but I worked it out a few minutes ago. The reason was that the Update function didn't seem to have access to the entity/model globals (if they are globals?). Either way I took a page out of the Windmill.lua book and its all working fine now. FYI - Simple script to do animation based on an entities 'State' key:
--Include the base script for all classes dofile("Scripts/base.lua") --This function builds the interface for the properties editor function InitDialog(grid) --Add the base interface for all classes base_InitDialog(grid) --Now we can add our own custom properties end --Spawn function for creating new instances function Spawn(model) local entity=base_Spawn(model) entity.model:SetKey("State", "IDLE") --An update function for one instance. Declaring the function as part of the entity table allows us to use "self" for the table function entity:Update() currentState = entity.model:GetKey("State") -- Animation frames: Idle 0-69 Walk 70-130 Run 131-171 if currentState == "IDLE" then endframe = 69 startframe = 0 blend = 1.0 frame = (AppTime()/100.0) % (endframe-startframe) + startframe entity.model:Animate(frame,blend,0,1) end end end --Update function, called during every UpdateWorld() function Update(world) if world==world_main then local model,entity for model,entity in pairs(entitytable) do if model.world==world then entity:Update() end end end end
-
Still having some through setting and getting keys. Heres my simple code for an animated model:
--Include the base script for all classes dofile("Scripts/base.lua") --This function builds the interface for the properties editor function InitDialog(grid) --Add the base interface for all classes base_InitDialog(grid) --Now we can add our own custom properties end --Spawn function for creating new instances function Spawn(model) local entity=base_Spawn(model) entity:SetKey("State", "IDLE") end --Update function, called during every UpdateWorld() function Update(world) currentState = entity:GetKey("State") frame = (AppTime()/100.0) % (endframe-startframe) + startframe if currentState == "IDLE" then endframe = 100 startframe = 1 frame = (AppTime()/100.0) % (endframe-startframe) + startframe entity.model:Animate(frame,blend,0,1) end end
engine.log says:
Lua error: ...nd keeper/data/models/characters/crawler/crawler.lua:18: attempt to call method 'SetKey' (a nil value)What am I doing wrong here?
-
Well to get the most out of it engines generally need to specifically have an option for it. Otherwise you SHOULD be able to just turn it on via the nVidia control panel. Though I hear you can have mixed results.
FYI - Im not sure if this pertains to the nVidia 3D glasses or monitor.
-
Ah fantastic work TylerH! Thanks mate, I'll give it a crack tonight.
(May as well start using this rep system. +1 rep for you )
-
Would have thought someone would have brought this up but apparently not (I gave it a good search). How does one animation models via LUA?
- 1
- 1
-
Wow, that is an incredibly pretty TODO list. Seriously.
-
You can use whatever editor you wish. Only catch is that you'll need to setup Dev C++ on your own, while the LE wizard generates the required project files for VS automagically.
-
The thing about games, is when you're playing them you aren't making them. So there'll be no games on this machine, until I make at least one on it.
Its a fair enough point I guess. I like to call playing games 'research' though haha.
-
You might want to take a look at the DoF video Josh made on his blog/the wiki.
-
I'm all for the throwing away of CD burners. But DVD drives? How can you exist without one? All games and applications come on them. A top of the line DVD/CD combo burner costs like $90AUD tops. Its like the most bang-for-buck component in a new PC hah.
-
Unfortunately Josh has yet to implement volume triggers in LE, otherwise it'd be as simple as creating a LUA script attached to a volume trigger.
-
Thanks for your help everyone. I was a bit worried that I had fried it for a while, because the bios didn't kick over on the first few starts - I didn't bother buying a CD burner, so I had to put the install disk on a USB stick and plug it in before it would go. Anyhow its all working now and I'll be installing Leadwerks later tonight when I can hook it up to the net.
...wait...what? You don't have a CD/DVD reader in any shape or form?
-
I believe the old stuff works fine, you just have to integrate it yourself.
Do a search on the forum - I swear someone asked about this already.
-
The lights or buttons won't fry, so slot away. Worst that can happen is that it won't work or the lights will be on when they're meant to be off, etc.
-
Ah, two birds with one stone Macklebee, impressive (Or just average as compared to my stupidity ).
Thanks a lot.
-
Ah fantastic! Thanks for your efforts Josh, I'm sure this'll be an invaluable resource for many of us.
-
While C++ can, by nature, do everything under the sun, GUIs aren't the easiest things to code up from scratch. I'd strongly recommend one of the many free widget libraries for whatever programming language you choose. For example I've had great success with wxWidgets. Its very well documented so you should find out pretty quickly how to do what you want.
- 1
- 1
Intel's Larrabee Cancelled
in General Discussion
Posted
That bit-tech story is deceiving. Larrabee isn't canceled at all - Intel have a working prototype and according to 'on paper' tests its damn good. But it just isn't as good as the AMD or Nvidia solutions yet, not to mention consumer drivers, etc. So they have decided not to release it. I think many really expected this - Intel are the biggest and best CPU makers in the world, but its going to take them a few goes to think about reaching for the GPU crown, and I think thats where they over-estimated themselves.
We'll see Larrabee, don't you worry about that. Just expect a few fails first. Good to see Intel had the sense not to release their fail this time around.