Jump to content

Undac

Members
  • Posts

    62
  • Joined

  • Last visited

Everything posted by Undac

  1. I only downloaded the audio and 2 model packs so far. The formats are fbx, max, ma and mb. The last two formats can only be converted using Maya (as far as I know). The audio pack is totally worth it - I would say that it's a very good deal.
  2. Sadly, you can only use them with cryengine: https://twitter.com/cryengine/status/709874255010267136 I am interested in the audio, so... if you have news, please post. later edit: https://twitter.com/fourzerotwo/status/709994497229365248 (HB response) http://pastebin.com/Jc4YAeGt (license linked by HB). from what I understand, these packs can be used in other engines than CryEngine: Plants and Shrubs Trees Environment Props Prototyping Kit Textures, Decals, & Visual Effects Audio Kit Vehicle Pack SE City Pack SE Weapons Pack Vehicle Pack HQ City Pack HQ Character and Animals
  3. Sorry, I could not reply earlier, but thanks everyone for the advices! For now I will drop what you see in the image from the initial post, and just stick with a square grid stored in a 2D array. I remember studying about A* (divide the matrix in squares if obstacle and move on diagonal), but it's been a while and never used it, so I will have to do some research - thanks for the suggestion! Also, thanks for the update animations part, Rick! PS: One last thing: is there a way to create an user interface in Leadwerks? Basically, I draw textures with context::DrawImage and store their locations. If the mouse cursor is over such an "interface object" on LMB event, I proceed to check which children of the said object is selected; otherwise (if the mouse is not over an "interface object"), I do whatever should happen in game on LMB event - and I pretty much call this an "interface". Is there a way to handle interfaces in Leadwerks? (another layout, but pretty much the same idea). PPS: You also highlighted a thing I did with other classes as well: store extra information which can be easily calculated or obtained otherwise.
  4. Well, I am not home now and I have some time to think about my project. Anyway, I started the thread because I am unsure of some things, so I thank you guys for the replies! I can select and move objects to a certain tile with the mouse (the only thing I am missing here is that, for selected objects, I need to create an "aura" similar to the ones in Diablo 2 - well, more subtle than that, but I will think about it later). I still need however to mark the tile as populated if a character moves there. For entities that are supposed to do something every frame, I use this personaj->Update() function. Your idea regarding the location is great, Rick, and don't know how I haven't thought of that, but thanks a bunch! I will keep the matrix I already have and change the struct to something like this: struct gridCell{ struct Position { float x,y,z; } const bool restricted; bool populated; // could be combined with restricted by making it an int, with these values: 0 - empy cell | 1 - restricted cell | 2 - populated cell int terrainType; char resource; // I could combine this with terrainType; 1003 being "mud" for "10" and fish for "03" Yes, I changed my mind quite a bit regarding this and thanks for explanations and advices, Nick! Also, there would have been only 6 directions because each cell has 6 neighbors (it's a 2d grid and when calculating the path, the neighbors of neighbors would have been accessed with gridCell->left->topLeft or gridCell = gridCell->left; gridCell->topLeft;). PS: Right now, my project actually uses Djikstra to calculate the shortest path on a smaller matrix (21*21 -> since the party can travel maximum 10 squares in any direction until they run off stamina and diagonal travel costs 1.5x straight travel stamina). Do you have a suggestion what to use instead of that? PPS: Also, I am using the ForEachVisibleEntityDo() function each frame to update animations for characters visible on the screen (current camera). Possibly not a good idea because only characters have animations. Any ideas?
  5. If you want something like call of duty. if (window->KeyDown(Key::Q)){ Vec3 angle = camera->GetRotation(); Vec3 pos = camera->GetPosition(); if ( angle.z > -15){ // it will only lean 15 degrees left or right angle.z -= 1.5; // rotates the camera a bit to the left pos.x -= 0.5; // moves the camera a bit to the left pos.y -= 0.5; // moves the camera a bit down camera->SetPosition(pos); camera->SetRotation(pos); } } if (window->KeyDown(Key::E)){ Vec3 angle = camera->GetRotation(); Vec3 pos = camera->GetPosition(); if ( angle.z < 15){ angle.z += 1.5; // rotates the camera a bit to the right pos.x += 0.5; // moves the camera a bit to the right pos.y -= 0.5; // moves the camera a bit down camera->SetPosition(pos); camera->SetRotation(pos); } } I don't actually have access to a computer with LE installed, but it should be something like that. edit; Ok, now I read "Lua" in the title. I didn't use it, so I can't really help, but this page could help: http://www.leadwerks.com/werkspace/page/api-reference/_/entity/entitysetrotation-r30
  6. For my project the 2d array is not a good solution, and here's why: I work alone and even if I cannot afford to make my world as big as King's bounty one, I would like it to be as big as 6 maps of that game (combined into a big one, which I hope that will give the impression of a big world!). Each King's bounty map is 64x64, which means that for my map, I would need a 64*64*6 (~=25.000 cells) matrix, out of which I will probably use only 35%. Another solution is to make the map like a maze, which means that I will save space, but I won't really get the desired map design. If a use a structure like this one: struct gridCell{ Vec3 position; gridCell *left, *right, *topLeft, *topRight, *bottomLeft, *bottomRight; //other data } I only need to store the cells which can be traveled. But now I cannot use Dijkstra's shortest path algorithm anymore. I probably have to know a standard distance between the center of any two cells (which means that I have to use circles instead of squares - not really a problem) and do backtracking on an area defined by standard distance between two tiles * how many tiles the group can travel, in order to find the shortest path. Is this a good idea? If not, which would be a good idea? The thing is that I don't know which data structure should I use to store the grid system. (in fact, I don't really know when one should use a certain data structure and when not). I use it for navigation purposes (the player's party is not the only moving party in the game and I need to know if the cell is populated or not). You suggestion is valid, but here is why I think it's more convenient to store a pointer value: When I get into a battle, the party you see on the map reflects what kind of enemies you shall fight in the battle. Sometimes the interactions between player and NPC might move the said NPC or the player's group on a different tile. I obviously need to know on which tile is located a given object. I think it is just easier to get the object with gridCell->entity instead of scanning all the objects and comparing their locations to gridCell->position ; and it's easier to get a gridCell with personaj->currentGridCell ,instead of using a gridCell *getGridCell(Vec3 position) function. Other than that, a pointer to object, which 90% of the time will have nullptr value isn't expensive. (personaj is just a class that extends model)
  7. That's a very good question, and I will try to explain why I opt for a grid system by describing the core idea of my game. Just like King's Bounty, it consists of two parts: the map-part, in which you move the group, interact with NPC, pick quests, manage your group, start fights etc; and the battles (in which you resolve disputes). My game however is set in a realistic setting (XV century South Africa) and you control this group of africans who managed to run after their village was pillaged and family enslaved. This group is often chased by animals, slave merchants or rival tribes from whom they stole supplies. This means that for me it is important to know on what kind of terrain do they travel on (rough terrain drains their stamina faster), what distance can they travel until they have to rest, where do they camp (popular paths means that they are more likely to get attacked), what ressource(s) can they find on the tile they camp on (if they camp near a river, they can fish and get bonus stamina) and so on. Ok, now this is why I want a grid-system: - it is easy to store all the information I need about the terrain using this tile-system; - navmesh is a bit slow to load even for small maps (at least on my computer). By using the grid system, it would be not-very-hard to create a navigation system which "looks good", does not use physics and does not require 10sec to load every time I switch from battle to map; - It is a design decision: I really love TBS games and I think that the grid system makes the rules clearer and easier to understand for the player.
  8. Hello everyone! For a grid-based game, what would you use to store the grid? Let's suppose we have this map (green cells are accessible to the player if there isn't another entity there, the white ones are never accessible to the player): Right now I use: struct gridCell{ vec3 position; Entity *entity; bool restricted; } and a matrix of MapGridHCellcount / MapGridWCellCount to store the grind. The problem however is that in the exemple above, more than 60% of the cells are not accessible to the player... and this isn't even the worst scenario because my end result should look something like this: What would you use in this situation? I've been thinking of using a graph implemented with adjacent lists, but I don't know if it's a good idea and the the thing is that I spend quite some time with the matrix implementation, so... I don't really want that to happen again. PS: For the big map, the grid does not change, which means that instead of generating it each time I open the map, I could just create it by hand, save it in a file associated with the map and load it when the map is loaded. PPS: Of course, another solution would be split my big map in a lot of smaller ones and keep the current system. I would like however, if it's possible, to have one big map.
  9. If you want a free 3d painter to create textures for your models (like substance painter), I don't know any. You can however achieve similar results with a little more effort by using blender + gimp / paint.net.
  10. Different solutions suit different people, Angelwolf. Good luck, Mihai! I would not start with a MP-only game because it's a lot more work and probably very hard to achieve and maintain a stable playerbase.
  11. I haven't used it lately, but I remember having some issues: - as the people above said, you have to download the model, then download each animation individually as FBX with model, and then load the animations in one mdl with Leadwerks - you can't use animations from a male rigged model to a females one, and vice-versa - if you have issues with the models uploaded from the Steam version of Fuse, use Adobe Fuse CC
  12. I don't know if it works, but you could give this a try: http://forums.steampowered.com/forums/showthread.php?t=2648217
  13. Well, we'd need more details. What can you see in debug mode, but not in release: maps or events and objects from maps? Do you have multiple maps? If so, is there a method to swap between maps? Are you using cpp, lua or both? etc
  14. Ok, I thought that there is a method similar to Entity::Move which allows us to ignore one of the rotations. ixFirebal69xl - I cannot test right now, but I think that it's something like: if (window->KeyDown(Leadwerks::Key::W)){ Leadwerks::Vec3 normalizedVector = camera->GetPosition(); normalizedVector.y = 0; normalizedVector.Normalize(); // it sais that the function returns a Vec3, so it might be normalizedVector = normalizedVector.Normalize() camera->Move(normalizedVector); } In case I understood it wrong and it does not work, you can use my solution meanwhile: if (window->KeyDown(Leadwerks::Key::J)){ camera->SetPosition(camera->GetPosition().x + Leadwerks::Math::Sin(camera->GetRotation().y), camera->GetPosition().y, camera->GetPosition().z + Leadwerks::Math::Cos(camera->GetRotation().y)); }
  15. Thanks for the response! Regarding the first question, I want to check if the camera touches the terrain so it won't go under it.
  16. Hello there, I have 2 questions and any help / idea is welcome. 1. How can I make sure that the camera does not go off terrain? 2. I need to move the camera forward (0Z) and sidewards (0X) along it's own axes, but without taking in consideration the rotation around 0Y axis (up/down). Any idea? I tried to make some pictures, hope they help: and an example: PS: I have solutions for both problems, but I am not satisfied with them. 1. "trap" the camera inside a cube 2. increment the camera position with sin(y rotation) on 0X, and with cos(y rotation) on 0Z code below: PPS: It didn't take the whitespaces when I copy-pasted from VS. Any idea how to solve this? PSPS: I posted the camera movement method on pastebin: http://pastebin.com/BLBQgjAj
  17. Thanks a lot for the info (map switch for me) - bump so more people see it!
  18. For everyone with this problem: For Leadwerks projects, the root is %UserProfile%\Documents\Leadwerks\Projects\ProjectName\Source . If the file called header.h is there, you include it with #include "header.h" If it is in %UserProfile%\Documents\Leadwerks\Projects\ProjectName\Source\demo , you include it with #include "demo/header.h" Visual studio labels do not create folders. If you create a label called "demo" and a "header.h" file under the "demo" label, you will still include the header as #include "header.h" , and not #include "demo/header.h" If you create a header file named "header.h" in "%UserProfile%\Documents\Leadwerks\Projects\ProjectName\HeadersFolder" , you include it with #include "../HeadersFolder/header.h"
  19. Hmm.. are you looking for the carve tool? http://www.leadwerks.com/werkspace/page/tutorials/_/constructive-solid-geometry-r2#section6
  20. Well, the problem with action-oriented 2.5D-style RPGs (I have Diablo-style in mind) is that if it's simple, it's boring. If it's complex, you need personalised solutions for your problems: you might need to put up a basic database, to be able to use data containers efficiently and to create your own functions which are less physics-heavy than actual leadwerks functions are. These being said, from my point of view, an RPG template would not help much. What I think that would help is a basic RTS template (again, with less physics-heavy functions), which teaches people how to move the camera around the map, "spawn units", select a unit, select a group of units, give an order to a group of units, give an order which is carried-out until canceled by user, create the fog of war, create an interactive-GUI etc... the ugly part is the enemy AI. I think that an RTS template is more useful because lessons learned from here can be applied in a lot of other genres. PS: These templates won't really help me, so these were just my two cents...
  21. @Charrua Another temporary (poor, but fast) solution would be to create a transfer function for lua and one for c++, put the transfer data into a buffer, save it into a file and load it into lua / c++ (don't forget to delete the content of that file before you read on it). @Josh Since it has RPG elements which will be implemented in c++, opening a door cannot be done without recieving data from c++ because that door might or might not trigger a trap, based on current character's perception (to notice it), intelligence (to figure out how to disable it) and dexterity (to be able to disable it). What I however think that "can be in it's own world" for my game is the implementation of quest-line. PS: I am not asking for these features: I understand that I am in the minority, that you have another things on your head, and I want to find my "own" solutions anyway (since this is the best way of improving yourself). I only posted because I don't really want to start with the left foot and to modify a big part of my main game code sometime mid-project and to see what other (& more experienced) people think. Cheers everyone!
  22. I read those lessons before starting the thread, and I thank you for posting them. I think however that you should also talk a bit about multi-dimensional arrays in the "Lua tables tutorials": http://www.lua.org/pil/11.2.html . How about my question, after browsing through the Lua documentation a bit, I realised that what I came up with at point 2) is a proper way indeed. If anyone is interested, you can find a couple of things regarding tables here: http://www.lua.org/gems/sample.pdf (pag5). "C++ for the main game code and Lua for scripted objects in maps." I was thinking to do all the "prototyping" with Lua, since it's faster, and to port the 'good' ideas to c++. You have a fair point, thank you! On the other hand, I have to learn how to pass values from lua to c++. "It depends on what you are making and what your needs are. " Party turn-based with RPG features (X-COM UFO Defense can give a decent idea of what I have in mind), so core engine modifications must be made. @drarem Good luck with your project!
  23. First of all, I would like to salute and wish "good luck with your projects" to everyone! Second, I just finished the tutorials and I have a few questions: 1. as a 'general' rule, when is advised to use c++, and when is advised to use lua scripts? 2. tables From what I've read on the tutorials, I don't quite get how tables work. At first I thought that when you initialize them, the constructor assigns them a data container type (array, struct, queue etc), but it seems that is it not the case. Anyway, I will read the Lua documentation soon and maybe I will make a better idea regarding how they work, but meanwhile I fail to understand how to create a vector of structs. 3. passing parameters to functions I played a bit with Lua and it seems that variables are passed by value, while objects are passed by reference. It there a way to control this? PS: Sorry to bother you with this. PPS: It there a way to enable TAB on these forums - because that's not how I wrote what is between tags.
×
×
  • Create New...