Jump to content

smashthewindow

Members
  • Posts

    136
  • Joined

  • Last visited

Everything posted by smashthewindow

  1. MouseHit() returns true or false based on if Mouse was pressed since the last hit function was called. (From wiki, "Holding the tested button down does not return true, as it is only true if the button has been released and pressed again.".) You'll be injecting every frame, so I think you should use MouseDown().
  2. Thank you. Very happy to hear that. That's what I was initially going to do but the collision callback doesn't seem to be called when the entity isn't in motion, I cannot check if the ball isn't moving at all. I'll look into this more. I tried renewing the counter (i use simple boolean to check) at matrix callback, but that gives me some true-negatives (?) (returns false every 3rd frame... of course when on ground) EDIIT: Found the problem. If the geometry was created off 3DWS, then it's static geometry and doesn't call callback function continuously. Damn that's a disappointment.
  3. http://www.cegui.org.uk/docs/current/input_tutorial.html
  4. Thanks. and terrible. First I wasted some time trying to debug and event handling linking error, found out that I was linking release mode libraries in debug mode. Second the texts keep coming cracked up, but found a quick patch to this. Also I couldn't get the CEGUI animations system working, so I had to hard-code my own. I'll move to this when it's complete. I'll be moving to mobile as soon as Leadwerks engine 3 is released. (And also after considering the performance of the device...) I'm adding an option for the rate of bloom, so people can adjust as they want. No, but my parents are willing to pay for my flight and stay over there during school break. (I sent you an email before about this... got no reply though.) And also, one more question, how does ControllerAirborne() function work? I need something similar for my ball (which is a model) with collision detection, but it's not working that well. My last option is to create a controller and move it along with the ball every frame, but that's like the ugliest solution possible. In the video it shows raycast, but currently I'm trying collision detection (since I don't have any "mesh only" entities). Raycast seems to show problems of getting stuck in walls at certain angles. Basically, you set up a long enough cylinder body from the ball to the ideal camera position pivot and check your collision callback to find where your camera should be.
  5. Thank you! Since I just fail at drawing concept art, the level design is basically just a 3D design of my room (I'll upload a photo later ).
  6. Thanks. also, a few questions: 1. From the wiki, "Raycast radii are not supported at this time.". Is this going to be fixed soon or should I just wait for Leadwerks 3? 2. Does Leadwerks co. take "internships"? I'm not a professional developer or wanting to be paid, but I guess it's something I could put in my college admission essay.
  7. Rename VS redistrib package, OpenAL, game's exe to 1.exe, 2.exe, 3.exe accordingly zip & distribute in readme we can tell them to click 1,2,3 in order.
  8. Ok, I can give that a try. Thanks for the reply.
  9. It's a game that I've been working on for the past three months. I'm basically a hobby-game designer, and high school schedule is a little tight on me, so it takes more time for me to finish stuff. I am still working on gameplay (I need better collision detection for the camera) but I'm pretty happy with what I have so far. Coded in C++ & Lua, Using libraries Leadwerks, TinyXML, CEGUI, Boost, Using softwares Blender, 3D World Studio, GIMP, 3DS Max. (Oh yeah, no traps or obstacles set in the video... yet Still working on programming)
  10. https://developer.valvesoftware.com/wiki/Demo_file https://developer.valvesoftware.com/wiki/Demo_Recording_Tools It's mainly used to create high-quality game recordings (export to picture frame by frame, edit by something like virtualdub). I need something like this.
  11. Does anyone know how the demo recording system in Source engine is done? I would like to implement something similar in my game, but I am absolutely clueless on how to do this. My initial thought is to save the absolute positions of every entity per frame into an XML file and then move every entity accordingly during demo replay. But my current solution would probably end up with giant XML files and game crashing when trying to load the XML file. (I currently use TinyXML as my XML library.). Thanks.
  12. I found a bomberjack example at the demos section, good for anyone looking into the topic.
  13. So I'm almost finished coding for my game, the only problem is that I need to create a in-game gui and a loading system. However, I just can't think of the appropriate way to do this. Can anyone tell me how my main loop should look like? I don't need specific code, just the concepts, but sourcecode example would be good.
  14. Thank you, now I can see this while I'm on the move!
  15. Here they are. Thanks for replying. EDIT: Nevermind, stupid mistake in texturing... file.zip
  16. It shows up find on 3DS World Studio, but like that in Leadwerks Editor and the game. (The black lines...) Does anyone know why?
  17. oh **** lol Could you elaborate more on 128x128x128 box size? how do I see the size of a box? EDIT: HAPPY
  18. I've been messing around with blender and 3DS World Studio. How do I set the grid size in the 3DS World Studio so that one grid would match the size of 1 unit in Leadwerks Engine? Also how do I use the ConvertModel tool? What type of models does it convert? I selected the folder that has a .obj and .gmf it still doesn't work...
  19. I thought max value was 1? P.S: it still goes through walls when it gets fast enough.
  20. Hi, I'm trying to code something like the Bouncy Ball in GMod. (Here's a video: )Basically, I'm trying to create a mesh that bounces without losing any velocity at collisions. I've tried this by setting the velocity constantly at update callback functions(the one that gets called every frame, UpdateEntityCallback), but I've realized that sometimes the ball goes through the walls. Any suggestions for a better implementation?
  21. Thanks for all your help, Mumble and Rick. I still havent figured out my problem, but I've tested the following code on a sample project, Get/SetUserData seems to be working fine. Maybe it's just time for me to rewrite some stuff. Fixed the problem: This is my class layout: Object->Ball->Controller I have a virtual function in Ball & Controller (its called GetBallType(), returns int ) I removed the virtual function, everything's working perfect and all. (I were thinking somethinking like pointer alignment because the address I got from GetUserData was always 4 bits off from the original place - maybe the vtable pointers got messed up.) Can I ask why it maybe causing problems like that?
  22. void Scene::LoadMap( string mapname ) { _mapname = mapname; _scene = LoadScene(mapname.c_str()); _camera = GetLayerCamera( GetFrameworkLayer(0) ); PositionEntity( _camera, Vec3(0,0,-2) ); ProcessMapInfo(); ProcessMap(); } void Scene::ProcessMapInfo() { } void Scene::ProcessMap() { if(!_scene)return; TEntity e=NULL; int i=0; int done=0; int childs=0; string tp=""; string en=""; string em=""; string ct=""; // collision type, used for collision with static objects while(!done) { done=1; childs = CountChildren(_scene); for(i=1;i<=childs;i++) { e=GetChild(_scene,i); tp=GetEntityKey(e,"Type"); en=GetEntityKey(e,"Name"); em=GetEntityKey(e,"Mass",""); ct=GetEntityKey(e,"CollisionType",""); if( tp == "info_ball_node" ) { Controller newcont(e); //newcont.SetCamera(_camera); done=0; break; } } } } shouldn't be a problem as there is break; before the closing braket of if (this is how gamelib does it.) gives the same results even if I use the global instances.
  23. Controller( TEntity entity_ = NULL ) { Ball::Ball(entity_); //set mesh of the ball SetMesh("abstract::ball_ball1.gmf"); _campivot = CreatePivot(); _camposition = CreatePivot(_campivot); PositionEntity( _camposition, Vec3(0,0,-5) ); //control variables camrotation=Vec3(0); cam2rotation=Vec3(0); mx=0; my=0; move=0; strafe=0; jump=20; SetEntityCallback( _entity, (byte*)UpdateControllerCallback, ENTITYCALLBACK_UPDATE ); } That's my constructor. Object->Ball->Controller, this is the class inheritance structure. Everything else I've implemented is working except for the accessing userdata part. Object* obj1 = new Controller(); ?? and no. I loop through entities in a map and search for the entity with key "ball_controller". From there I call Controller my_awesome_controller_instance(found_map_entity); basically a while() & for() loop like they do it in GameLib. Thank you for replying anyways.
  24. Okay, I need some help in C++... I'm just a hobby programmer so I'm not that good. I've a basic class called "Object", and every class I made inherits from that object: class Object { public: TEntity _entity; TVec3 _abspos; Object( TEntity entity_ = NULL ) { if( entity_ != NULL ) { _abspos = EntityPosition( entity_, 1 ); FreeEntity(entity_); } _entity = CreatePivot(); SetEntityUserData( _entity, (byte*)this ); //take notice in this part... HideEntity(_entity); } }; and of the callback function: void _stdcall UpdateControllerCallback( TEntity entity ) { Controller* e = (Controller*)GetEntityUserData(entity); e->UpdateBall(); } void Controller::UpdateBall() { PositionEntity( _campivot, EntityPosition(_ballmesh,1) ); } Of course, controller inherits from Object class and yes, Object's constructor is called. But that PositionEntity() throws an exception if I run it at VS2010 (_campivot is a bad pointer...) I know this is noob question, but I can't figure it out after hours of searching. Can anyone help me? EDIT: Basically, I'm asking if anyone knows what the hell is wrong with UserData setting/retrieving... The pointer I get from GetUserData() func seems to be +4 bits from the original location. I'm using Leadwerks 2.5 by the way, straight from the Updator.
×
×
  • Create New...