Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

568 Good

About Mekamani

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. This is probably stupid question, but why do you multiply each vertex by matrix in cpu instead of passing it to shader and doing matrix multiplication inside the shader? I mean this: //Sprites have matrices that are precomputed. These pretransformed vertices are placed into the buffer Matrix4 model = sprite->getModelMatrix(); verts[0].position = model * verts[0].position; verts[1].position = model * verts[1].position; verts[2].position = model * verts[2].position; verts[3].position = model * verts[3].position; verts[4].position = model * verts[4].position; verts[5].position = model * verts[5].position; Or maybe thinking about using instances with the dx11, so there would be less data being sent since all the instances are just quads.
  2. Mekamani

    Cutscenes scripting

    I have written xml-cutscenes, and then parsed them in c++. It required me to write some cutscene-system, then something to control the parts of cutscenes. Like you will most likely have to have different way to declare which scripts are running in parallel, and which are sequentical. For example something along the line: <cutsceneStart>     <choise type="play cutscene" name="final attack"/>     <choise type="play cutscene" name="run away"/> <cutsceneStart> <cutscene name="final attack">     <say char="paul" text="I am not going down!" face="beated up"/>     <play effect="theMostAwesomePowerupShaderEffect"/>     <parallel>         <walk char="paul" x="1" y="2"/>         <character char="paul" useAnimation="swing"/>         <play sound="swingSound"/>     </parallel> </cutscene> <cutscene name="run away"> .... </cutscene> Then you can parse each of the xml-element as a corresponding class, which can be derived from cutsceneBase. After the element has done it's task, tell the cutsceneEngine to play next thing. You could also make conditions which text to be shown, which could also be used to create branches for conversation. The good thing is, that you can actually write a system to create cutscene-xmls, like cutscene editor and all the cutscenes would have specified format on them. The bad thing is that creating the xml-format might take some time.
  3. Mekamani

    Should I leave Unity?

    On random note, are you creating 6 faces on every single cube, even though 1-6 sides of the cube would be hidden because cubes next to it exist? If this is the case then you probably should start optimizing by removing hidden surfaces from being generated.   Considering if you have 8x8x8 blocks = 512 blocks and if each block has 6 faces that would be 3072 faces, although the only visible ones from outside would be the ones on the edge which is 8x8x6 = 384.   Edit: Quick glance on the code, you can probably reduce a lot of vertices by actually building look up table, so that you do not add same vertices coordinate multiple times, which also saves a bit.
  4. Mekamani

    UML for UE4 Robust Skill System

    Ok after spending some time looking at the diagram, I think I have grasped most of it. It took some time to find the most centric classes: skillUser and skill, because they were one of the smallest boxes in the pdf.   In simplisity what you have is Skill and SkillUser which to my understanding is essentially something like unit/character. Then when skill is being used it is then being applied to other units/characters that you get from some sort of filtered list, that is determined by the skills characteristics (if skill is aoe or single target, etc.).   Now just some thoughts. How do you apply damage over time? Personally I would add debuffs or skills into the skillUser list that was affected by the skill, and then have some timer on the skillUser that loops through whole list of skills that the skillUser is being affected in certain intervals. For example once every 0.5s if real time, or once every turn change on turn based. Then when the debuff has run out, just remove it from the debuff-list. Although I do not know if this is a good way to do it or not. The dot system also probably needs to take some sort of snap shot from the character stats when the dot was applied to keep the damage same throughout the whole duration.   The debuff list is just bit annoying when you actually have multiple effects on you. If any of the things are additive (power +10, when this effect is on), you have to actually have some sort of back up of your base stats, and recalculate the stats every time you add or remove things. But if everything in your game/system works on multiplying, you can just keep the current value in memory and when effects endy reverse the calculations by just dividing it.
  5. Mekamani

    UML for UE4 Robust Skill System

    First of, I openly admit that I am not exactly the best coder out there, and I am not even going to say if your diagram is good or bad.   Anyways what I was thinking when I read your post and quickly glanced your classdiagram was, that you haven't given us any information what you are actually trying to do. Basically there is no information of what it is that you are actually trying to do. And at least I do not know what you mean by skill system, the definition could be pretty much anything, but judging from the class diagram it has something to do with spells/player attacks or something?   So first before asking feedback, I think it would make sense to actually write the use of your system. Like for example I want to make a system that when pressing Space, it attacks a selected target (if this would be turn based?) and uses the skills special attributes to damage the target, and the things that are within certain radius of the target. The skill has a movement speed and when it is fired it creates a certain sound and when it hits the target, it creates explosion sound. Every target that are damaged also grunt and the skills special attribute such as freeze is applied to every one of them.   The example is pretty terrible, but my point is, that if you write a scenario or something that shows how the system is used it probably helps more for people to make it easier to give feedback.   Now the second point and I have to admit that I haven't used unreal engine much, so it might have some underlying classes that one must use in order to accomplish something, but.... Lets say that this is the first time you are building the system, I honestly think that you should try keep things as simple as possible. If on the otherhand you have already made one version and you are trying to improve your previous design, then you can just skip the rest. So if this is your first design at least for me, if I try to create a solution to complex thing, I usually overthink things too much. Then I spend way too much time trying to solve everything on the first go, and... waste a tons of time. Regardless how long I spend on trying to think stuffs beforehand, things just rarely go as I plan. After getting things work, I realise that some of the decisions I made before hand were either bad or I didn't think something. So I myself have tried to learn to try to come up as simple solution as possible, even if it doesn't solve everything, and eventually add/modify it until it is good enough. Some things that I have overcomplicated might actually turn a lot easier or simpler and the most important thing is, that I acoid making things more complex than I need to. I should not add features that I am not actually going to use, by trying to generalize everything for all purpose super system.   Anyways the last chapter thoughts came from seeing so many interfaces, that I cannot comprehend how complex of a system the pdf looked like from first glance. Or highly possibly I just do not understand what an interface is.
  6. Mekamani

    This is probably WAY too big to begin...

      I don't really understand what is wrong with using stuff that other people made, that is basically how real world works... waste 3 weeks making it yourself, or find something that works and probably works better than coding it yourself although it might cost a buck or two and use that? Like if you use the 3rd person controller and it works then boom. Spending 2-3 weeks to get something like moving cube to work, while fighting against null pointers is more likely going to burn people and prevent them from doing anything.   And even if you use ready made scripts, you can try and test how to adjust things to figure out how stuff works. I just cannot really see why someone would rather advice beginner game developer to go use SFML over Unity.
  7. Not exactly coding related, but I was thinking about polygon count. If there were unlimited speed, one could use sculpting tools to create very high poly objects, and possibly not needing to actually recreate a low poly one. This might save some time in developing games.
  8. If your main goal is to make 8bit jrpg, I would definitely take a look at RPG maker, probably the newest which is MV or you could use older ones, which are a lot cheaper. Although I think a lot of people do avoid playing games made with RPG maker, I still honestly think that it is quite a lot more productive to use that, than actually first spend couple of years to learn to program, then eventually start making your game. To get more out of RPG maker, you would anyways have to learn programming, but at least it does a lot of things for you and you can focus most of your time in actually making the game / content, rather than on everything else.   Edit: something to note, if you decide to go with older version of rpg maker, the resolution of the game you are making, will be very limited by todays standards, which is really a good reason imo to go with MV, in case you decide to actually use RPG Maker.
  9. From my understanding there is a high chance of me being wrong but, in modern warfare they usually use squads of something like 7+ people. There is usually one person that is more in charge of radio messaging. It might not matter a lot for AI development, but there are quite some hand sings as well for squad movement.   I would also think of something like morale with smaller squads, how would it affect performance. Also something like fatigue, how it can make people hallucinate from the lack of sleep. Maybe even discipline, do troops take orders?   Then you could think about military logistics, like how to cut ones supply line and what is the affect of it.   Anyways that is just some random thoughts you might want to consider or just completely drop, because these things do not matter/aren't suited for the game you are making.   Edit: I would probably look for SWAT tactics in the internet, if I were to look something really modern one.
  10. It looks like my own train of thought is pretty close to something called greedy meshing if I understand the greedy meshing correctly that is. It seems to generate bit more vertices for pyramid kind of shape, but I suppose it is better to do it in the way of greedy meshing, rather than creating partially visible faces.   The greedy meshing could possibly work in reducing the geometry of Merger Sponge as well, at least a bit. Looking the cube after 2nd iteration where there is 1 big hole, and 9 small ones in one face, the front face could be drawn with 4 vertical rectangles and 4 horizontal. Although I am not sure what the result would look like, since there would be 4 places where the rectangles would overlap each other, but at least it would reduce the geometry a bit to 8 quads per outer face. On deeper level of recursions, you wouldn't be anymore able to draw whole face length rectangles unless using some alpha channel to create partially invisible faces, but that would be more like a hacky approach rather than a good solution, and would it really work that well, I have no idea since that is just something that came to my mind when I saw the picture what the Merger Sponge looks like.
  11. Hello, in the past couple of days I have been thinking of a problem with voxels. Like if I make a pyramid shape, which has 4 triangles and quad as a base, not tetrahedron with voxels. Would drawing each "floor" or layer whatever you would call it, by using cubes with 5 sides be a good idea? Would there be drawbacks, when there would not be any kind of connection between some of the vertices? I guess this might lead to glitched graphics?   I am using pyramid as an example of a problem that I was thinking. For example lets say I have 2x2x2 cube, which could be represented by single cube, 6 faces. Then I add one 1x1x1 block so that it is sharing one face of the previous cube. Now I would need to add only 5 faces and let the z-buffer hide the 1/4th of one of the faces that is behind the 1x1x1 cube. Now I would have 11 visible faces but I am just wondering if there is some draw back using this kind of method. Maybe mobile devices wouldn't like redrawing parts of the area again and again?   What I am trying to achieve is trying to optimize the mesh at least a bit, while maintaining the ability to actually modify the mesh. I feel like if I tried to actually triangulate the whole mesh, it becomes quite hard to maintain the ability to add / remove cubes to the already existing mesh vs just trying to find as big quads as possibly to present one single surface despite having part of the surface overlapped by other voxels.   Thank you in advance. .
  12. On Google Chrome the code that you posted on first post gave me 1 - 5 ms Stroke time and 1 - 5ms time for Arc-function, and I didn't notice much difference in performance depending if the radius was 50 or 200. If you got the results you're showing with the code you've added on the first post, maybe your hardware acceleration is disabled in your browser? I think I had some issues with hardware acceleration on Linux in Google Chrome, but that might not be your case.   I tried drawing multiple circles by modifying the draw function to draw multiple cirlces as following: function draw() { ctx.clearRect(0,0,canvas.width,canvas.height); ctx.beginPath(); for( y = 0; y < 20; ++y ) { for( x = 0; x < 20; ++ x ) { ctx.arc(x + pos.x, y + pos.y, (x + 1) * (y + 1),0,2*Math.PI); } } ctx.stroke(); requestAnimationFrame(draw); } And got these results from the F12 debugger on Google Chrome with the modified code that draws 400 different sized circles:
  13. I am kind of curious about how many circles you are drawing per frame? Like do you draw multiple circles on top of each other? How bout some hacky approaches such like you draw large circle on a texture then splat that texture around the screen with different scale-values? It just seems odd that drawing circles would be too slow to accomplish with modern computers, unless the arc-drawing algorithm is terrible written. I would also try to see if there is something like draw circle-function, cos the arc-algorithm could be far less optimized than drawing circle.   For drawing circles there is at least Bresenham's algorithm which at least back in the old days was one of those tricks to draw circles faster, but that involved drawing one pixel / line at a time, and this algorithm might be irrelevant nowadays.
  14. Since you probably do have some programming experience you could check out Love2D I haven't seen it being mentioned that often in the forums, but what I like about the engine is that it is very fast to get something done with it, just couple of lines of code and magic happens.   Also since the engine uses LUA as a language, most of the games in the forums, you can read the source code in them and try to learn from those. Ofcourse you can't copy paste the source codes for their games, but it is good for learning things.   The downside of the engine is, that there is very little extra given by default. You'll have to make your own gui-system, animation system etc. Although once again in the forums there are lots of solutions ready to use for such things, and you can even read the source code to learn how other people implemented these things. Although this might lead you to learn some bad habits from people, but I guess that is nothing unusual when you're trying to learn coding.
  15. Mekamani

    Help making an old school RPG

      The latest one is RPG Maker MV It is bit pricey though compared to the older versions and honestly I haven't tried this one out, but apparently they have done quite some upgrades. There is no more 800x600 resolution limits. Apparently you can also now port to mobile platform and HTML5. The scripting language has been changed to JS from what I think used to be Ruby?   Also I just happened to check BundleStars today, so if you want to get VX Ace for decent price you could pick one up from there. VX Ace seems to be tier 2. https://www.bundlestars.com/en/bundle/ultimate-game-makers-bundle   Hopefully this didn't seem like too much of an advert...
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!