Jump to content

ParaToxic

Members
  • Posts

    425
  • Joined

  • Last visited

Everything posted by ParaToxic

  1. Yes you can but I think not in the editor.You can make selections in your modelling program for a single mesh and attach materials to that.
  2. Well it is very bad code but it works , for my lua knowledge Yes I could store it as keys, your right require("scripts/class") local class=CreateClass(...) function class:InitDialog(grid) end function class:CreateObject(model) local object = self.super:CreateObject(model) local object=self.super:CreateObject(model) SetWorld(fw.transparency.world) object.cube=CreateCube() object.cube:SetScale(Vec3(4,4,4)) object.cube:Paint(LoadMaterial("abstract::collider.mat")) object.axis1 = 0 object.axis2 = 0 object.axis3 = 0 object.scalex = 1 object.scaley = 1 object.scalez = 1 object.setall = 0 SetWorld(fw.main.world) function object:Update() self.cube:SetPosition(self.model:GetPosition()) if self.axis1 == 0 and self.axis2 == 0 and self.axis3 == 0 then self.cube:SetScale(Vec3(self.scalex,self.scaley,MouseX()/100)) if MouseHit(1) == 1 then self.scalez = MouseX()/100 self.axis2 = 1 self.axis1 = 1 end end if self.axis1 == 1 and self.axis2 == 1 and self.axis3 == 0 then self.cube:SetScale(Vec3(MouseX()/100,self.scaley,self.scalez)) if MouseHit(1) == 1 then self.scalex = MouseX()/100 self.axis3 = 1 end end if self.axis1 == 1 and self.axis2 == 1 and self.axis3 == 1 then self.cube:SetScale(Vec3(self.scalex,MouseX()/100,self.scalez)) if MouseHit(1) == 1 then self.scaley = MouseX()/100 self.axis1 = 0 self.userdata = self.cube end end end function object:Free() if self.cube~=nil then self.cube:Free() self.cube=nil end self.super:Free()--Don't forget this!! end end
  3. Well its just a first idea with 3 mouse clicks and the MouseX component for each scale axis.It also saves the cube in the userdata so you can load it if already exists. http://www.youtube.com/watch?v=Y4TSJDs57Tk&feature=youtu.be
  4. Hello guys, I'm very bad in lua so I have a question about some collider box stuff. I would like to create a entity which you can place in the editor and create a 3D box with 3 mouse clicks. When you place it you click on the ground once and from this point a box starts to follow your mouse ( just a 2D square maybe). When you click a second time the box has then a fixed size and you can now control the height of the box with the mouse.When you have your height you click a third time and you have your own, perfect sized collider box. But how I can make that with mouseclicks and soone as a object, you can just place in the Editor ?? Thanks
  5. Hey so nice soundtrack !! reminds me of seriouse sam
  6. You can use boost::serialization. It is very fast and has a very good syntax
  7. First thanks for the positive feedback for the menu And yes there is no game so far, when you click on continue the game look for existing profiles and then change the state.A new loading video shows up and then I Reset the framework, so the 2 images in the buffers are just fliped very frame---> 1 mio. mouse pointers
  8. Okey thanks for that Now I can continue working on the game
  9. So....well I think the release data is far away-very far away It would be nice if somebody could test the second Version
  10. Okey thanks for the feedback Will fix it
  11. Hey guys, I was programming some stuff today and opened the menu part of my game I'm making. Now I want to look if my video and audio manager classes works well, so it would be cool when somebody could test it. Thanks
  12. Hello guys, I had a little idea for a data loader and saver.Normal functions uses void pointers or just void to write/read data from a binary fstream object. But why don't you use templates for that ?? So I used them, but it doesn't work actually ( I'm not the pro with templates...so...) Maybe someone can help me.. I get a linker error when I want to call the write function. #ifndef ISERIALIZER_H_ #define ISERIALIZER_H_ #include <iostream> #include <fstream> #include "GlobalDefine.h" class ISerializer { public: ISerializer() : fileloaded(false) { } ~ISerializer() { } std::fstream filestream; bool fileloaded; IResult Load(std::string filename); IResult Save(); template<typename T> void Read(T* out); template<typename T> void Write(T in); }; #endif #include "ISerializer.h" IResult ISerializer::Load(std::string filename) { filestream.open(filename.c_str(),std::ios::in | std::ios::binary); if(!filestream.bad()) { return IRESULT_OK; } else { return IRESULT_ERROR; } } IResult ISerializer::Save() { filestream.close(); fileloaded = false; return IRESULT_OK; } template<typename T> void ISerializer::Read(T* out) { if(fileloaded) { filestream.read(&out,sizeof(T)); } } template<typename T> void ISerializer::Write(T in) { if(fileloaded) { filestream.write(in,sizeof(T)); } } Thanks
  13. Hey ya, I'm making some draws for all manager and systems I need for the gameplay-state and now think about the Progresssystem. Lets say I have a map with only 2 rooms.You start at room 1 and when you open the door between them, the NPCs behind the door starts to attack you. Now I need to save this actions in a file with all event keys and targets for the events.For example I would create a trigger box before the door and link the collision event to the opening of the door. Then an other trigger box follows behind the door with the activating of the NPCs as the target. But I need to save this progress as a progress file ( my idea was it to create a profile and the loader for that and each profile has progress files you can load ). So my question is what do you think how such a manager/system for recording,saving and loading could look like ? Thanks for advance
  14. Hei Roland, the stuff you have posted is exactly the way I do it in my class. But.. You have MyFunc outside a class ,so it works fine but when you want to use a function of an object it doesn't work. That was the problem but I fixed it without a function pointer. Thanks
  15. Well thanks for the suggestion but I have a event system already done, but this command don't use the events/signals for that. Maybe somebody can tell me the correct C++ way of entering a class own function to this function pointer.
  16. Hei ya, I wan't to add a function SetButtonFunction to my MenuSystem to call a given function when the button is pressed. In my button class I have a void pointer -> void (*_func)(void); I just have to call SetButtonFunction(IMenuButton* b, void (*_func)(void)); and add the function. But when I enter a class owned function it doesn't work.For example I have in my class the function Test() --> (IMenuSystem::Test()) and enter that to the function it doesn't work.I become a error....something with a argumentlist.... but when I just create a custom function in the source file void Test() { MessageBoxA(0,"Hey",0,0); } it works fine. Have someone a idea how to manage that ?
  17. Why you don't use FindChild ?? You get the world of the Framework( index 0 ) and call FindChild, place your entityname and get the entity back
  18. Well thanks for the comments. I made a short testscene and I think it should have a atmosphere like that. The idea is that you break out from the underground ( yes I have a game story for that ) and the earth is very hot and near to the sun, so I need this kind of set. What do you think about that: I really like this washed out look , but I don't know if it looks okey without a skybox ( I mean when the sun is so bright you don't see any clouds ). Thanks
  19. Hey ya, I would like to make a scene or an environment with a kind of apocalyptical atmosphere.I saw a very cool scene:() in that game and would like to make a similar one. This should look like a very hot scene ( you see that in the pic ) with this dark yellow ambient. Maybe you can give me some suggestions for that. I also search for a website with free sky maps ( cubemaps ) for that kind of scene. Looking forward to read some comments
  20. Does Applog not only disable the log file which the engine creates ?
  21. I don't think there is a way to do that, but you can build your project as a win32 application ( you need some special files for it) and create your own console. This is very easy, you just create a Window with a listbox and add your debug informations there. Here is my solution.On the left is the debug box and on the right you see the variables and the values.You can insert references to each type of variable in the manager ( you see it doesn't work very well, because the listbox sometimes get one entry twice)
  22. Thank you for the comments.Have somebody suggestions for improvement ?
×
×
  • Create New...