Jump to content

Road Kill Kenny

Members
  • Posts

    667
  • Joined

  • Last visited

Posts posted by Road Kill Kenny

  1. This is more than great; very useful; elegant; clean.

     

    Thanks ;)

     

    Check this out guys. I've been trying to get semi-realistic acceleration of a car with gears in my game. Using my graph I was able to get a good acceleration curve going. It still needs a lot of tweaking but its starting to take the general shape that an acceleration curve should. XD anyway heres a screen dump of the graph. This is accelerating on the flat in a straight line to max speed and then letting go of the accelerator: (You should be able to see where the gear changes are its pretty obvious XD)

     

    AccelerationCurveGears-1.png

     

    PS..... Yes its a beetle that goes from 0-100 km/h in 6 secons :o.. as I said, my vehicle still needs tweeking

  2. - Currently it can only draw 1 graph, however, before I release it you will be able to make multiple in a single instance. (you don't need more than one instance)

    -Yes you will be able to stack more than 1 line in the first release. I th

    -In release version 1.0 you will only be able to have 1 big primary graph and 2-3 secondary graphs. However, in later versions you will be able to make as many as you want.

     

    -In even later versions I plan to make them window-able so that you can drag them around expand them just like a window.... However, I can't spend so much time on that right now. I need to put some work into my actual game once I get VariGraph 1.0 outheheheh. XD

     

    BTW Glad you like it :) thanks

     

    Edit: Oh I almost forgot. This is how easy it is to make and instance and use it

     

    //These are only called once
    #include "VariGraph.h"
    VariGraph Graph();   //Create an instance of VariGraph
    Graph.CreateDebugGraph(Title, x-label, y-label, x-exageration, y-exageration); //Call this once for each graph you want to craete
    
    //These 2 can be called every frame. The class itself will ensure that it is actually not updated every frame but rather 20times per second. It is important that a graph be created before these are called. Each additional graph will need a new update and draw call depending on its Graph Number... i.e. 1st graph Graph number=0, 2nd graph Graph number = 1 etc.
    UpdateGraph(GraphNumber, YVariable, 0) ;//Updates a graph with the YVariable. This gets called every frame but only executes 20 times a second
    DrawGraph(GraphNumber); //Draws the speciffied graph. Called every frame or your graph wont't draw
    

     

    So yeh as you can see it is very easy to implement... And you should also do something like this.

     

    #define DEBUG_BUILD //at the beggining of ur document.

     

    and

     

    #ifdef DEBUG BUILD

    //calls go here

    #endif

     

    That way you can just comment out #define DEBUG_BUILD in your release and not worry about removing the graphs when it comes to the release version

  3. Hi all,

     

    I've been working on creating a a runtime, debugging graph generator for the physics in my game. However, the graph class that I have created is very flexible and can be used in any Leadwerks application and it is very easy to use. I plan on releasing it as soon as I'm finished with it and hopefully it will come in handy for debugging things like physics interactions etc. in your games.

     

    Some of you saw my first video but I have improved it a lot since then. Take a look at the new video. Enjoy

    >>>

    <<<
  4. since you can use any openGL draw functions, even VBO and Vertex/textcoord array drawings, you can really write or port allmost any 2d openGL gui over to LE without any big trouble.

    Drawing arrays with like 100 quads/tris will not rly steal you FPS.(wich should be more than enough for a good concepted gui system including windows, buttons,texts and stuff)

     

    I just tested it with more then 10.000 quads drawn from some arrays with GLdrawarrays() and lost like 1 fps.

     

    I agree. If its going to be simple you may as well just use OpenGl draw functions or the LE draw functions to draw lines and load images. It's pretty darn easy :).

  5. Obviously the best why is to hire out a sounds studio. However, if this is not possible or too expensive then your next bet is to buy a some recording equipment and get something like pro-tools for home use.

     

    Sound is tricky I think because, unlike graphics and art where one person at home with Blender can make someting amazing, it becomes a bit more technology and environment dependant which can be expensive.

  6. That sounds like a good method Naughty Alien.

     

    Below is a rough guide as to how I would go about it.

     

    1. Convert gun pointing foreward local vector (0,0,1) to global coordinates using TFormVector( TVec3 Vec3(0,0,1), TEntity Gun, 0) http://www.leadwerks.com/wiki/index.php?title=Entities#TFormVector

     

    2. Create a cube or quad and use AlignToVector() command to align it to the vector that we determined in step one.

     

    3. Scale the cube or quad along the vector.. you will also have to shift it along the vector as well so that it starts at the gun and is not centered on the gun. You may have to use raycasting to determine how much scale and shifting you need though it would be a semi long explanation so I'll let you figure that out. :)

     

    4. Apply material and make a shader (personally dunno how myself) to make the glow effect.

     

    Anyway thats something how I would approach it. Hope it helps

  7. @Enginer Keen :

    I don't understand why everyone thinks C++ is so difficult..

    Well in fact, you seem to be a programmer , perhaps i think passionnated by programming.

     

    Well actually I only started coding in C++ about 3months ago. I am originally a graphic artist and have done way more graphic art than coding....

     

    I do like programming and I do like art as well but my passion doesn't lie in the complexity of either. My passion lies in making games that are fun and doing it without taking shortcuts whether that means learning a bit more or not. Everyone seems to want to conquer the world without putting in a bit of effort....

     

    I'm not trying to start a language war because thats not what this is about. I just think too many people assume that C++ is super hard when it really isn't and because of their assumption they never give it a go, eternally thinking that its really hard and impossible for them. Give me a few good reasons why C++ is significantly more difficult than any other porgramming language out there.... If its a case of simply not liking coding then I don't see the difference between any programming language.. if you want to make a decent game you have to code... or there has to be someone in you team that can code if thats the case...

     

    It's not like you have to pick one or the other.

    Yes you are right I don't have to pick one or the other and I don't necessarily plan to. I just don't get what all the fuss is about C++ apparently being "oh so hard".

     

    Peace :)

  8. I recently read how LE3 will be much more supported by scripts using lua which i think is excellent, and whilst that was my ultimate suggestion it sounds like it may have alredy been done. And although big games or any games should be in C++ for best performance or standard, not alot of game designer wannabies know C++ and find it very hard to pick up and i would hazard a guess that most people who come across to leadwerks have dabbled in programming, know what it is or can program and want to design games with an easier tool set so for alot (if not most) who see its nativly C++ will be put alot off, whilst for some it will be what they want.

     

    I don't understand why everyone thinks C++ is so difficult.... It seems like much of a muchness to me, I look and Lua and I'm like 'wtf' not because its hard but just because It's not what I'm used to. I think people tend to think that what they learned first or what they know is easier just because it's familiar. Not that I have anything against Lua or any other particular programming language but I just hear this statement a lot.

     

    Also how many 'game designer wannabies' know any particular programming language or even Lua for that matter? I personally never heard of Lua before I started looking at game engines. Our friend Nick that thaught Gary's Mod was better than LE springs to mind when I read 'game designer wannaby'. But then again even people like that brings more money to leadwerks which = better engine for everyone.

     

    BTW Josh.. will we be able to write scripts in C++ if we want to instead of Lua.. or is scripting a 'Lua only' thing for LE3D. :( I don't mind coding in Lua but just wanna know if we will have this option.

     

    Oh and +1 000 000 for the multiple brushes idea :(

  9. Leadwerks physics (or rather Newton physics) is deterministic... meaning its 100% predictable and things will happen the same every time no matter what... So provided that all your bodies are symetrical along the z axis simply ensure that all your force's vectors have z at 0 and ensure everything starts at z=0. I don't think it is actually possible in this case for the z to change at all.

     

    I don't see why this wouldn't work as I have never had a random physics jump to an axis I haven't specified. It should stay perfectly spot on.. Guess the only way to find out is to give it a shot...

     

    A 'Make 2D' function probably wouldn't work imo because it sounds like your trying to make something that is essentially 3D but plays like a 2D game kinda like 'Valkyrie Profile' which is a 3D side Scroller.

  10. I'm not quite sure what you mean.

     

    to attach a TMesh to a TBody is done by setting the mesh's parent to the body.

     

    EntityParent(Your Missile,your invisible body,1)

     

     

    to then make the mesh "look in the same direction"

     

    RotateEntity(Your missile,EntityRotation(invisible body,1),1)

     

     

     

    And now the mesh will move with the bullet automatically...

     

    If you load the mesh and the body at 0,0,0 and then parent it and then position the body and fire it you shouldn't have to rotate the mesh to be in line. Provided that the body and the mesh match....

     

    But I would recommend what Josh said anyway, align to vector would be the best way to go

  11. Well Metatron seems to have summed up what most likely the problem is.... However,

     

    As for models there isn't really much to it and you probably already know it:

    -lower poly = faster

    -lower texture size = faster

    -fewer entities = faster

    -fewer seams in your UV unwraping (a lot of people don't tend to know this one. The more seams you have... the more vertices you have in you UV's = more data = more processing time..)

     

    This goes for any engine or 3D application. Yes one may handle more of x type but the above four still holds true.

  12. I also have another idea regarding making it more dynamic. From any collission u can get the position, velocity & normal of the collision

     

    I thaught what if I let the velocity to set the magnitude of the bone movement and then the normal vector to slightly alter the direction of the bone movement!

     

    If this works it will make way for more dynamic deformation as it will be different every time depending on the velocity & normals.. To make it even more realistic I could factOr in the mass of the two bodies into the equation.... Though this may be overkill.... Subject to testing I think :)

  13. How do you tell the bullet to go in the direction the camera is facing?

     

    Anyway you want. Line pick raycast comes to mind. Then just get the position of the collision and move the bullet from the guns to the position that the raycast hit.

     

    Yeh the way I said the camera facing direction wasn't technically correct but I wrote that In a rush so yeh :) rather get the position of to propell towards using a raycast.

  14. Well.. I haven't done it before in leadwerks myself but the concept is the same for any engine.

     

    Sorry if none of this makes sense. I'm tired.

     

    Player:

    1. Player Controller

    2. Attach camera to controller

    3. code the mouse movement to for rotating the camera

    4. code the wasd to move the controller foreward /back left /right

     

    Shooting:

     

    2-ways:

     

    -Raycasting <-- personally I don't like this way

     

    -Bullet Body

    1. On click -> create bullet with a body at the gun nozel

    2. Apply velocity to the bullet body in the same direction as the camera is facing (or gun)

     

    Reloading: <--

    On press 'R'

    2. Check that ammo is not full

    3. If not check how much ammo you need to fill the magazine (eg. cartridge size of 8 with only 3 bullets left = 8-3 = 5 bullets needed)

    4. If the ammo you have in your 'pocket' is greater than 5 (what you need to fill the magazine.

    : Play Reload animation |||| cartridge ammo = 8, ||| ammo = ammo -5 |||

    5. else if the ammo you have in your pocket is less than 5 but more than 0 (say 3 )

    : Play Reload animation |||cartridge ammo = cartridge ammo + ammo ||| ammo =0 (resulting in cartridge ammo being 6 and total ammo 0

    6. else if the ammo you have in your pocket is 0

    : notify the player that they cannot reload .

    simple

     

    Ammo Pickups:/u]

    These are really simple you just detect a collision between ammo box and player, get the entity from that and add the ammo to your stash according to what you collided with.

     

    Interchangable Weapons

    IDK how everyone else does it but I figured out a way in the last engine I was using. The idea should still work here.

     

    first I made a bunch of arrays that held all the stats for all of the weapons. It looked something like this. (This is just psuedo btw)

     

    std::string WeaponName["Colt 45", "Socom", "FAMAS", "12 Guage"];

    std::string WeaponModel["Colt.gmf", "Socom.gmf", "FAMAS.gmf", "12 Guage.gmf"];

    int WeaponRange[ 45, 50, 200, 25 ];

    std::string WeaponDamage etc

    etc

    etc

    etc

    etc

    etc

     

    Then I made an integer variable called 'currentWeapon' which started at 0. When you press the button to switch weapon the currentWeapon variable changes and and loads the stats of the corresponding gun in the array. EG. currentWeapon = 2 would be the FAMAS & currentWeapon = 0 would be the Colt 45.

     

    Anyway this was just some stupid method I came up with dunno if its technically the correct way to do it but it works.

     

     

     

    Everything here can be found in the existing tutorials on the wiki.

  15. Would probably be easier and more dynamic than making new models for damaged car.

     

    You are 100% correct here. I abandoned that idea pretty quickly

     

    I think another option would be to animate this one only. It looks like you have some bones and if not you can make bones around where you want the damage to be. Then in code get the bones as entities and then you can animate each bone by itself to deform that part of the model. Then if you needed it you could pretty easily just deform the parts that were hit by having bodies around the areas of your major bones. Giving some similar naming conventions of your bodies and bones would make it pretty simple to code "when this body is collided with, then get the bone with the similar name and animate it to show the dmg".

     

    Yes this was what I was planning on doing. Though I didn't think about coding the bone animation that is a great idea. Thanks. As for the collision bodies relating to different bones I was trying to set this up to. I had a freaking disaster of a time trying to set it up. My idea was that I could have a main body that actually handled the physics and a bunch of dummy bodies. around it to detect collision locally and assign a bone movement. However, I had a pretty hard time making them because these small bodies can't collide with the main body otherwise it will be detecting collisions. The main body can't simply be a non-detectable type because other vehicles will have the same body type which is what we are looking for in a collision. On top of that the fact that it has to be a convex hull makes it even more difficult to fit pieces around the car without touching the main body itself...

     

    hehehe.... All these ideas I had turning out to be way more difficult than I anticipated... sounds about right for games development.

     

    I think I'm going to get some of the other mechanics down before I continue with this damage stuff. I'm pretty sure I can get it right with a lot of optimising and tweaking but I think I'll leave it till later. The frustration is starting to burn me out. hehe

     

    Cheers

     

    oh btw

    Beetle_color.png

  16. Idk for sure how close it has to be to the real thing. However, I have purposely made different parts of the model different to that of a real beetle... of course it wouldn't be called nor badged as a beetle.. Though I don't know if that is really enough but... hehe guess I'll have to find out. Cheers...

     

    No I was not planning ahead for LE3. Just gonna give it a shot

  17. Hi all,

     

    Just finished the first modelling part of creating my destructible vehicle. I have finished modelling the un-damaged vehicle but I still have to do the deformed models later.

     

    Anyway, as you can see the vehicle isn't one mesh but has many different parts including doors, bonnet, trunk etc that will be able to fly off during gameplay.

     

    The poly count is around 30,000 tri's for the whole thing. Some may say that this is a lot but I've done my research and its a lot less than most vehicle games like GT5 where they have between 200,000 to 500,000 poly's. I also looked up many other poly counts of vehicle games and they all seem to be much more than 30,000. averaging about 100,000. So considering that and considering the environment in my game will be not big as it will be arena based PvP with only about 8 players at a time I should be Ok. Also I have LODs.

     

    Anyway here are the pics. Next tim I think I'll make a less round car to make it easier to keep the poly's low.

     

    Edit: This first one looks a bit funny because these shots are in Orthographic mode and not perspective... oops

    Beetle2.png

    Beetle.png

    Beetle3.png

  18. LE4DWERKS

    That contains Leadwerks+Engine+4D :)

    It could be even colored nicely:

     

    LE4DWERKS

    Kinda suggests you to say LE4D, doesn't it? Which again suggest to think of "lead", as in leading, not the heavy metal. Or why not also heavy metal, since it's the best music!

    And there were have Engine in the word too, because LE means Leadwerks Engine, which seperates it from n00b-only game makers.

     

    Hey thats actually pretty cool

  19. You have to program just to be able to make anyhting half descent.

    No wey! who would have thaught that decent games require coding.... Oh you poor thing you!

     

    I'm not even going to bother commenting on the rest of your post because I really couldn't give a dam and frankly it would be a waste of my time...

    post-1364-0-98040700-1314062450_thumb.jpg

    Classic...

     

    One last thing: HAHAHAHAHAHAHAHAHAHAHAAHAHAHAHAHA LOLOLOLOLOLOLOL ROFLROFLROLFORFLROFLROFLROLFORFL

  20. I personally don't care what the name ends up being as long as the engine itself is awesome....

     

    However, I found LE by doing a google search with the word 'engine' in it. I can't remember what the whole search was but it definately had engine in it. Not once did I think about searching game studio or anything like that.

     

    Also when I think Leadwerks3D.. hmm what is that? 3D modelling software? CAD modelling? TBH I wouldn't think of a game engine. Also imo the words 'Game Studio' are like a pointer to 'n00b n00b n00b'. If you tried to program a game with something called a game_studio it would look something like this: game_Studio->CreateOriginalGame(); ...... ERROR: SORRY, CAN ONLY CREATE COOKIE CUTTER GAMES!

     

    But Yeh I don't really care. Whatever, you think will get more people here Josh ;).

×
×
  • Create New...