-
Posts
541 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Everything posted by DudeAwesome
-
ahh dammit. but good to know there will be no other way to change the map I guess thx rick!
-
hey rick. in the same time I wrote also a mapload script. The Mapload works nice when I call the mapload from the App:Start() or the App:Loop() my Idea was to use another lua script to Push that mapload but it will not work when mycollisiontrigger will push the mapload. There is a error msg like: attempt to index global 'Script' (a nil value) this is my app.lua --This function will be called once when the program starts function App:Start() --screensettings self.screenWidth = 600 --x self.screenHeight= 400 --y self.contextMsaa = 0 --msaa --mapsettings self.startMap = "level_01.map" -- map which will be loaded first self.currentMap = "" -- currentmap which is loaded --Create a window self.window=Window:Create("MyTestArea", 0, 0, App:getScreenWidth(), App:getScreenHeight(), Window.Titlebar) self.window:HideMouse() --Create the graphics context self.context=Context:Create(self.window, App:getContextMsaa()) if self.context==nil then return false end --Create a world self.world=World:Create() -- load startmap App:LoadMap(self.startMap) return true end --This is our main program loop and will be called continuously until the program ends function App:Loop() --If window has been closed, end the program if self.window:Closed() or self.window:KeyDown(Key.Escape) then return false end --mapchangetest if self.window:KeyDown(Key.H) then App:LoadMap("level_02.map") end --Update the app timing Time:Update() --Update the world self.world:Update() --Render the world self.world:Render() --Render statistics self.context:SetBlendMode(Blend.Alpha) if DEBUG then self.context:SetColor(1,0,0,1) self.context:DrawText("DEBUG MODE",2,2) self.context:SetColor(1,1,1,1) self.context:DrawText("Map: "..App:getCurrentMap(),2,22) self.context:DrawText(App:getScreenWidth() .." x " .. App:getScreenHeight() .. " - msaa: " ..App:getContextMsaa(),2,42) self.context:DrawText("Memory usage: "..System:GetMemoryUsage(),2,62) self.context:SetColor(1,1,1,1) self.context:DrawStats(2,102) self.context:SetBlendMode(Blend.Solid) else self.context:SetColor(1,1,1,1) self.context:DrawText("FPS: "..Math:Round(Time:UPS()),2,2) end --Refresh the screen self.context:Sync(false) --Returning true tells the main program to keep looping return true end --this function will load a mapfile located in the Maps folder function App:LoadMap(_mapfile) --loading msg self.context:SetBlendMode(Blend.Alpha) self.context:SetColor(1,1,1,1) self.context:DrawText("Loading...",App:getScreenWidth()/2, App:getScreenHeight()/2) self.context:Sync(false) self.world:Release() self.world=World:Create() --Load map local mapfile = System:GetProperty("map","Maps/".. _mapfile) if Map:Load(mapfile)==false then Debug:Error("cant find or load mapfile: Maps/".. _mapfile) return false else System:Print(_mapfile .. " successful loaded!") App:setCurrentMap(_mapfile) return true end end --Getter/Setter functions function App:getScreenWidth() return self.screenWidth end function App:getScreenHeight() return self.screenHeight end function App:getCurrentMap() return self.currentMap end function App:setCurrentMap(_mapfile) self.currentMap = _mapfile end function App:getContextMsaa() return self.contextMsaa end this is my trigger --[[ This script will make any entity act as a collision trigger. It works best when you set the entity's collision type to "Trigger". This will continuously detect collisions without causing any physical reaction. ]]-- Script.nextMap = "" --path "next Map" "Map (*.map):map|Maps" function Script:Start() self.enabled=true end function Script:Collision(entity, position, normal, speed) if self.enabled then self.component:CallOutputs("Collision") end System:Print("MAPLOAD PUSH") App:LoadMap(Script.nextMap) end function Script:Enable()--in if self.enabled==false then self.enabled=true self:CallOutputs("Enable") end end function Script:Disable()--in if self.enabled then self.enabled=false self:CallOutputs("Disable") end end is this not possible cause I call it in the level? I dont like that "always checking to change level option"
-
is there somewhere a lua tutorial for mapchanges? I think its a bug or something it loads everytime the map I´ve opened in the editor. it just ignore my code. confusing.
-
Supidupi btw add it to the tutorial summary,please
-
How to "speak" with models from the Editor?
DudeAwesome replied to DudeAwesome's topic in Programming
thx Aggror! -
When I create models in Code it will be something like: cube = new Cube(3) it will create for e.g. a cube with n=3 and I can use cube.setSomething() to use a private function of the Object Cube() but how I can access models (like a door) that Ive created in the editor? its a little bit confusing. when I create something in the editor, I have no code from it. When I create a cube with some lines of code. I see it in the GameRun but not in the Editor.
-
Question regarding importing assets / size of the resulting game
DudeAwesome replied to Mordred's topic in General Discussion
Everything what is into your project folder will be compiled I guess. When you dont need some assets in your game than you should not integrate them. I think an engine couldnt know which assets the software will be using @runtime when the code will be compiled. When I have a game and there is a choosePlayerModel() function (like male/female) than you need 2 models but only 1 is really used. The engine doesnt know which model you need at runtime so it have to compile the worst case -> compile everything. -
also nice library: http://www.libsdl.org/
-
well for the time until c++ support is available: in Half Life 2 there was no loading screen also. just a note "LOADING" and the game was stuck until map was loaded loading screen is just a fancy part of the game. you can implement it later. or do it like HL2 btw: I would seperated the whole GUI/Game Logic stuff in threads. It should be no reason to use just one for everything so that the game is waiting and wasting cpu time by drawing something like Ammo/Health text/textures on the screen when the ticks should needed somewhere else. Sure its harder to handle more than 1 thread because you may produce data races or tearing effects but its still a kind of performance optimizing when your code is executed asynchron in that case.
-
I would just use threads later when LE3 with c++ support is available. c++ is close to hardware. thats not a good choice to use lua for that IMO
-
[Steam] Strange visual effect
DudeAwesome replied to YouGroove's topic in Leadwerks Engine Bug Reports
just wait and update drivers. have the same problem but I believe next drivers will fix this soon. greetz -
Is there a Chance that leadwerks will Autoselect shaders ? Like diffuse-normal-spec textures are set leadwerks set automaticly the correct default shader. (Maybe defaults editable from settings) and default shadow shader.
-
Any suggestions/tips towards my LUA learning path?
DudeAwesome replied to Patrick's topic in Programming
when you can code with python you should understand lua also. lua is a little bit annoying with the if else statements (I hate the THEN and ENDs like in Pascal) just read some lua code and try to code some hello world stuff and play with tables. the rest is not that hard -
yep. there is a view desktop-view link in the footer
-
yep but not everything has commands
-
I really would like to use some shortkeys like F5 -> run programm or ALT + X -> opens Script Editor would increase workflow a lot
-
[ScaleBug] FUSE to LE 3 Materials Problem
DudeAwesome replied to DudeAwesome's topic in General Discussion
yeah its a little bit confusing. Is there a rule of thumb about how many polygons for chars or items are ok? just wanted to create something and see how it works and how to import. I tried Blender but the Interface is really confusing. I dont like to buy models -> too expansive for my student moneybag but I´m looking for a software that has a good balance between handling, productivity and quality. Silo 2 looks nice I should give it a try. want to make everything by myself for the first time to learn btw: thx for help guys you are awesome! -
[ScaleBug] FUSE to LE 3 Materials Problem
DudeAwesome replied to DudeAwesome's topic in General Discussion
mhmm when i rescale it ( with indie edition 3.1) its still wrong so I think its a Bug in 3.1? -
Materials Bug in Appearance Tab
DudeAwesome replied to DudeAwesome's topic in Leadwerks Engine Bug Reports
thx dude very helpful -
[ScaleBug] FUSE to LE 3 Materials Problem
DudeAwesome replied to DudeAwesome's topic in General Discussion
ahhh dammit, thats tricky i cant rescale models with FUSE is that a kind of Bug in LE3 or is that just a problem between the texture size and model scaling? So Fuse is kind of useless for me just was looking for a fast model creator and fuse looked pretty nice yeah looks like Edding MakeUp -
[ScaleBug] FUSE to LE 3 Materials Problem
DudeAwesome replied to DudeAwesome's topic in General Discussion
ok this is strange: when I drag and drop the Materials in the 3D perspective view from the world editor it looks bad. When I drag and drop it into the model Editor it looks how it should. But it just looks nice in Model Editor in Worldview its still failed edit: screenshot http://www.dropbox.com/s/h5e3mf5rbjymbyg/Screenshot%202014-01-11%2023.08.17.png -
[ScaleBug] FUSE to LE 3 Materials Problem
DudeAwesome replied to DudeAwesome's topic in General Discussion
I drag and drop the material onto the mesh in the perspective view -
[ScaleBug] FUSE to LE 3 Materials Problem
DudeAwesome replied to DudeAwesome's topic in General Discussion
thx for your answer shadmar but this will not work this is my model i created https://www.dropbox.com/s/arywlhruxjgoso1/CHAR.tex.zip if you import it resize it to (0.01, 0.01, 0.01) its really tall @tjheldna I created a material for each part (Skin, Pants, Shirt, Hair) and included my textures for diffuse normal specular in the Texture Section + I included the Shaders from leadwerks in the Shader section Shadow: shadow.shader (from shaders/model/shadow) Shader: diffuse+normal+specular.shader (from shaders/model) when I just import the model and it has no materials the shadow is correct. when I drop my Materials on it the shadows look wrong like in my picture