Jump to content
  • Advertisement

All Activity

This stream auto-updates     

  1. Past hour
  2. kseh

    hex grid

    Well, as I'm sure you know, if you want to do something multiple times, you use a loop. Use a loop to paint your hexagon and adjust its location as the loop processes.
  3. Alex Gomez Cortes

    Weird lighting when translating object

    Hello and thanks for your reply! I modify the normals every frame because the multiplication of the normals is made on the vertex shader. I understand what you said, but if dont multiply the normals then I cannot rotate the object. Isnt there a way to have the normals a way the object can be rotated and translated without having any problem?
  4. pristondev

    Directx9 Crashing with Shader Model 2.0

    Ye the problem its on Vertex Processing by Software. I tried set the flag D3DUSAGE_SOFTWAREPROCESSING on CreateIndexBuffer and Create Vertex Buffer but didn't works. Do you know the right way to uses software processing?
  5. phil67rpg

    hex grid

    I am trying to draw a whole screen of hexes , I am able to draw only one hex here is my already posted code private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Pen whitePen = new Pen(Color.White, 1); float height = 50.0f; float width = (float)(4 * (height / 2 / Math.Sqrt(3))); float y = height / 2; float x = 0; float row = 0.0f; y += row * height; float col = 1.0f; if (col % 2 == 1) { y += height / 2; } x += col * (width * 0.75f); PointF pt1 = new PointF(x, y); PointF pt2 = new PointF(x + width * 0.25f, y - height / 2); PointF pt3 = new PointF(x + width * 0.75f, y - height / 2); PointF pt4 = new PointF(x + width, y); PointF pt5 = new PointF(x + width * 0.75f, y + height / 2); PointF pt6 = new PointF(x + width * 0.25f, y + height / 2); g.DrawLine(whitePen, pt1, pt2); g.DrawLine(whitePen, pt2, pt3); g.DrawLine(whitePen, pt3, pt4); g.DrawLine(whitePen, pt4, pt5); g.DrawLine(whitePen, pt5, pt6); g.DrawLine(whitePen, pt6, pt1); whitePen.Dispose(); g.Dispose(); }
  6. ritzmax72

    Weird lighting when translating object

    I believe for translation you don't have to touch the normals. Are you modifying normals while translating?
  7. Hello everyone, About a month ago I finished programming the lighting (or at least it is what I thought), because a few hours ago I realized that when I translate the object, the lighting breaks (not when rotating, because I multiply the normals by the transpose of the inverse of the modelMatrix), only if I move the object from the 0,0,0. I only have one light, a directional one. Here the rock is at 0,0,0. T Here the rock is at -10,0,0. I only moved it to the left, and as you can see looks like the normals are wrong, but I do not touch them, except when I multiply them by the transpose of the inverse of the modelMatrix (if I do not multply the normals by that matrix the lighting doesnt break but when the object rotates the light rotates with it). So, is there a way to have the normals well for translating and rotating? Now I can translate the object and the lighting doesnt brake, but if I rotate it the light rotates with it. Now I can rotate it but if I move it the lighting breaks. Thanks a lot!!
  8. pristondev

    Directx9 Crashing with Shader Model 2.0

    Both uses D3DDEVTYPE_HAL, 'll try what u said. Already gave me a light, thanks.
  9. Today
  10. If you're purely talking about the reflection direction, I would be tempted to say that the magic simply happen with your normal map as long as the normals don't all point perfectly in the same direction.
  11. Here let me Google that for you
  12. Well instead of killing the object directly you could do this: // Game main loop. while (true) { std::set<Actor*> actorsThatNeedToBeKilled; for(Actor* a : playingActors) { // Code..... if(...) { Actor* enemy = findEnemyToKill(); if(enemy && ...) { actorsThatNeedToBeKilled.insert(enemy); } } } // Now kill the actors that no longer will participate in the game. and continue with the next frame. for(Actor* actorToKill : actorsThatNeedToBeKilled) { game.killAndDeleteActor(actorToKill) } }
  13. Gnollrunner

    Sandbox MMO Idea ( My Video Game Idea )

    Is this something you're working on, or is it just ideas at this point?
  14. Alberth

    hex grid

    There is nothing wrong with re-inventing wheels for educational purposes, but please make sure YOU re-invent it rather than getting it from someone else. There is no substitute for learning than trying and experiencing it yourself, it's really the best way. Sure it's slow and you will fail to find the answer a few times, but that is normal when you're trying to do something you never did before. I have been programming for nearly 40 years, and I still make wrong turns at times, and fail to find a solution. However, a failure teaches me where I made a mistake, so I can try again, and avoid making that same mistake a second time. Eventually, you get to know all pitfalls to avoid, and then Eureka, it works.!
  15. kseh

    hex grid

    You have not actually posted a question or otherwise indicated what you are having problems with. I don't have experience working with hexagon grids and it isn't something I can invest the time investigating to be able to provide any suggestions. In general, I would expect it to be much more difficult than a square tile based project. But if you just wanted to print out a grid, you have code to do that which you can examine to try and understand what's going on.
  16. Alex suggested to have a hotkey cheat sheet. Meaning, coming back to a game and forgetting the important keys for a screen, make a default key (such as Tab), bring up a window while held that shows the relevant keys for that screen and what they do. That way they don't need to be looked up in the configuration. Since not all keys are needed on all screens, it may give hints on what a screen can do that the user might have forgotten. Original post blogged on b2evolution. View the full article
  17. Steve_Segreto

    Directx9 Crashing with Shader Model 2.0

    Seems like creating a d3d9 device with software vertex processing is not working ... but it looks like if you use a "pure" device with hardware vertex processing your scenario works. Also interesting in the first log is that the supported vertex shader version is listed as 0.0 and in the second log it's listed as 3.0 Is the first log from a REF or software device? Can you avoid going down that path and stick to hardware devices only?
  18. Hello What would be the most "hidden" or "unexpected", "unusual", ("difficult to think about ahead" maybe even)... We all know more or less about the graphics, programmers, musicians, sound guys, animators, voice actors etc. etc. But there are surely less "visible" but yet NECCESARY costs most people who did NOT yet gone throught the WHOLE process of producing and releasing THEIR OWN game might not know about or thought about. I would like to name few and maybe even estimate the cost of each and i would like others to add their "tips" and experience regarding this. 1) Game testing - according to me a lot of this is overshadowed and underestimated by regular development but you still need to test and "Debug" your game which costs time/money. I dont have experience with this so i dont know the cost 2) Getting approved by various "age" rating agencies like ESRB, PEGI, some australian one and others. This was a suprise for me, and altough its said its not necessary to get this rating, but in reality it practically IS NECESSARY since when you dont have it, some shops will simple refuse to carry your game or do something similiar to ignoring it. It was a shock to me, listen to it in some interview with some gamedev. You practially NEED it or NO shop will take your seriously... Is this true...? The COST for these ratings was also quite a negative suprise for me cause i think that for the big three (PEGI+ESRB+the australian one+ you should probably get even the german one (?) it i think like around 2 750 USD... 3) AFAIK even demos (not a current issue really) but even TRAILERS (!) need (?) to be apoved (and pay for aproving). Is this true? 4) Steam admission fee - i think theres something there but its small, but i rather mention it. Could someone elaborate more on these and add additional "hidden" costs that are not as "visible" or "easy to find/figure out" in advance? Thank you (Sorry for english, have written it in hurry)
  19. HappyCoder

    Sandbox MMO Idea ( My Video Game Idea )

    This is a large scope for even a AAA studio. There are certainly some interest ideas in your post but nothing stands out as being the hook, or unique interesting concept, to your game that would set it apart from the rest. If you are actually interested in making games you need to start smaller. Way smaller. Pick a single interesting mechanic and create a small game around that mechanic to explore how it effects game play. This would be a game like Undertale or Braid. Another approach would be to pick an established genre and just make a really well polished version of that game like Hollow Knight. Even a game like Undertale is large in scope for somebody new to games. You need to start much smaller.
  20. Steam We’ve had a busy few months, but we are now officially on Steam! Obviously an important place for us to market our game is Steam. Although we are still developing away, it is important for us to get a presence on Steam and start building up a community. A major part of that is getting people signed up to our “Wish List”, so that they can see updates and get notified when the game is ready. So, if you like the look of our game, click below and add us to your wish list and take a look at our Steam page. https://store.steampowered.com/app/1047870/Something_Ate_My_Alien/ Enhancements We’ve been adding lots of new effects, sounds and challenges to all the planets. The game is now 100% playable from start to end, but we still have some things to finish off, polish and refine. We added lots more particle effects and lighting to make the battles stand out, and some other interesting effects including snow storms, earthquakes and a new device on Lelantos that portals the Aliens around. There are now lots more upgrades that you can give your Aliens to help them out while down on the planets solving puzzles and fighting with the locals. Including a new weapon, the ‘Bomb Launcher’ that allows the Aliens to fire bombs into tight areas to clear out a horde of enemies. We worked on some colour-blindness settings to help players to be able to identify where the blocks in the puzzles fit into by having symbols representing the colors. This is an option you can turn on in the settings. Also the ability to ‘zoom’ the view in, so you can get a closer look at things. In conjunction with starting up on Steam, we have also released a new video trailer showing off the current state and game play. This showed off all the aspect of the game, Puzzle Solving, Digging, Collecting and Fighting! We also updated our main logo and you can see that in the thumbnail of the video below. Something-Ate-My-Alien-RoKabium-Games-Dev-Trailer-2-FadeTransitions-v4-1440.mp4 Alpha Testing We’ve also started public Alpha testing. So if you fancy trying out our game and give us some feedback on what you think, click the link below to go to the forum post about how you can apply to do some testing. http://www.somethingatemyalien.com/forums/Thread-Sign-up-for-Alpha-Testing Last month we joined forces with a company called IndieBros, and they will be helping us with Social Media, Steam and general marketing activities. We felt we needed help in this area to make sure our game is a success when we launch. Over the next few months we will be keeping in contact with our Alpha testers and once we are happy that nothing major is going to change we will move to Beta testing and then onto a launch. So still some work to do but the finish line is in sight.
  21. Give it a try (it is a pretty casual game) and if you have some friends on the same wifi network, feel free to try the multiplayer out! (inspired by Ultimate Chicken Horse's multiplayer, if you've ever played that one). https://play.google.com/store/apps/details?id=com.hestermanholdings.Dash4 Seize the crown and beat your friends to the finish line in this fast-paced multiplayer game!
  22. Hey, I've updated my shaders to uses Shader Model 2.0, with ps_2_0 and vs_2_0, works good only on PC's where was possible to use Shader Model 3.0. The problem its the shaders its already compiled for SM 2.0, but it doesnt works on PC's with obsolete hardware config. That PC's supports SM 2.0, so I dont know the shaders isn't working. Looks the crash is caused on DrawIndexedPrimitive, but this function never returns something different from S_OK. This way I can't check any log or something like that. Im compiling shaders like: technique Mesh { pass P0 { VertexShader = compile vs_2_0 MeshVS(); PixelShader = compile ps_2_0 MeshPS(); } } Initialization logs where have that crashing problem: 16/04/2019 23:18:13 - (INF) Direct3D 9 Interface Created 16/04/2019 23:18:13 - (ERR) Your graphics hardware doest not support 32 bit Dynamic Texture [8876086A] 16/04/2019 23:18:13 - (INF) FPU Preserve 16/04/2019 23:18:13 - (INF) Vertex Processing: Software 16/04/2019 23:18:13 - (INF) Device Created! 16/04/2019 23:18:13 - (INF) Multi Sample: 0 0 16/04/2019 23:18:13 - (INF) Resolution: 800x600 16/04/2019 23:18:13 - (INF) Window Mode 16/04/2019 23:18:13 - (INF) Color Depth: 32BPP 16/04/2019 23:18:13 - (INF) @ Device Capabilities 16/04/2019 23:18:13 - (INF) Vertex Shader Version: 0.0 16/04/2019 23:18:13 - (INF) Pixel Shader Version: 2.0 16/04/2019 23:18:13 - (INF) Max Vertex Blend Matrices: 0 16/04/2019 23:18:13 - (INF) Max Vertex Blend Matrix Index: 0 16/04/2019 23:18:13 - (INF) Max Primitive Count: 65535 16/04/2019 23:18:13 - (INF) Max Vertex Index: 65534 16/04/2019 23:18:13 - (INF) Max Streams: 16 16/04/2019 23:18:13 - (INF) Max Streams Stride: 255 16/04/2019 23:18:13 - (INF) Max Vertex Shader Constant Registers: 0 16/04/2019 23:18:13 - (INF) Max VShader Instructions Executed: 0 16/04/2019 23:18:13 - (INF) Max PShader Instructions Executed: 96 16/04/2019 23:18:13 - (INF) Max Vertex Shader 30 Instruction Slots: 0 16/04/2019 23:18:13 - (INF) Max Pixel Shader 30 Instruction Slots: 0 16/04/2019 23:18:13 - (INF) Max Simultaneous Textures: 8 16/04/2019 23:18:13 - (INF) Max Texture Blend Stages: 8 16/04/2019 23:18:13 - (INF) Max Texture Width: 2048 16/04/2019 23:18:13 - (INF) Max Texture Height: 2048 16/04/2019 23:18:13 - (INF) Max Volume Extent: 256 16/04/2019 23:18:13 - (INF) Max Texture Repeat: 8192 16/04/2019 23:18:13 - (INF) Max Texture Aspect Ratio: 2048 16/04/2019 23:18:13 - (INF) Max Anisotropy: 4 16/04/2019 23:18:13 - (INF) Max Active Lights: 0 16/04/2019 23:18:13 - (INF) Max User Clip Planes: 0 16/04/2019 23:18:13 - (INF) Max Point Size: 256.000000 16/04/2019 23:18:13 - (INF) Max Npatch Tesselation Level: 0.000000 16/04/2019 23:18:13 - (INF) Num Simultaneous RTs: 1 16/04/2019 23:18:13 - (INF) Using Textures Non Pow2 Conditional: Yes 16/04/2019 23:18:13 - (INF) Using Textures Pow2: Yes 16/04/2019 23:18:13 - (INF) Supports HW Skinning: No 16/04/2019 23:18:13 - (INF) Software Skinning My initialization logs (where shader with sm2 works perfectly): 22/04/2019 14:45:21 - (INF) Direct3D 9 Interface Created 22/04/2019 14:45:21 - (INF) FPU Preserve 22/04/2019 14:45:21 - (INF) Vertex Processing: Hardware 22/04/2019 14:45:21 - (INF) Pure Device 22/04/2019 14:45:21 - (INF) Device Created! 22/04/2019 14:45:21 - (INF) Multi Sample: 0 0 22/04/2019 14:45:21 - (INF) Resolution: 1024x768 22/04/2019 14:45:21 - (INF) Window Mode 22/04/2019 14:45:21 - (INF) Color Depth: 32BPP 22/04/2019 14:45:21 - (INF) 32 bit Back Buffer 22/04/2019 14:45:21 - (INF) @ Device Capabilities 22/04/2019 14:45:21 - (INF) Vertex Shader Version: 3.0 22/04/2019 14:45:21 - (INF) Pixel Shader Version: 3.0 22/04/2019 14:45:21 - (INF) Max Vertex Blend Matrices: 4 22/04/2019 14:45:21 - (INF) Max Vertex Blend Matrix Index: 0 22/04/2019 14:45:21 - (INF) Max Primitive Count: 16777215 22/04/2019 14:45:21 - (INF) Max Vertex Index: 16777215 22/04/2019 14:45:21 - (INF) Max Streams: 16 22/04/2019 14:45:21 - (INF) Max Streams Stride: 255 22/04/2019 14:45:21 - (INF) Max Vertex Shader Constant Registers: 256 22/04/2019 14:45:21 - (INF) Max VShader Instructions Executed: 65535 22/04/2019 14:45:21 - (INF) Max PShader Instructions Executed: 65535 22/04/2019 14:45:21 - (INF) Max Vertex Shader 30 Instruction Slots: 4096 22/04/2019 14:45:21 - (INF) Max Pixel Shader 30 Instruction Slots: 4096 22/04/2019 14:45:21 - (INF) Max Simultaneous Textures: 8 22/04/2019 14:45:21 - (INF) Max Texture Blend Stages: 8 22/04/2019 14:45:21 - (INF) Max Texture Width: 16384 22/04/2019 14:45:22 - (INF) Max Texture Height: 16384 22/04/2019 14:45:22 - (INF) Max Volume Extent: 2048 22/04/2019 14:45:22 - (INF) Max Texture Repeat: 8192 22/04/2019 14:45:22 - (INF) Max Texture Aspect Ratio: 16384 22/04/2019 14:45:22 - (INF) Max Anisotropy: 16 22/04/2019 14:45:22 - (INF) Max Active Lights: 8 22/04/2019 14:45:22 - (INF) Max User Clip Planes: 8 22/04/2019 14:45:22 - (INF) Max Point Size: 8192.000000 22/04/2019 14:45:22 - (INF) Max Npatch Tesselation Level: 0.000000 22/04/2019 14:45:22 - (INF) Num Simultaneous RTs: 4 22/04/2019 14:45:22 - (INF) Using Textures Non Pow2 Conditional: No 22/04/2019 14:45:22 - (INF) Using Textures Pow2: No 22/04/2019 14:45:22 - (INF) Supports HW Skinning: Yes 22/04/2019 14:45:22 - (INF) Hardware Skinning Does anyone know what might be happening? Thanks.
  23. In the glossy shader I think there's a part that pseudorandomly perturbs the reflection vector so that it's not a perfect mirror reflection. How does one go about perturbing the reflection vector to get good visuals? Is there a formula?
  24. phil67rpg

    hex grid

    is this too hard of a question
  25. E.g. something a player does causes the object to delete itself. Why does everyone think it has something to do with threading? Because of how you wrote "no way to check if the returned pointer is valid" and "could be deleted at any point". In a single threaded environment, "deleted at any point", should not be true, and you should be able to guarantee a returned pointer is safe. Entity *target = map->get_nearest_enemy(this->faction(), this->position()); // target should be valid, and there should be no way for it to become unexpected invalid, within this code block if (target->type()->valid_assassination_target()) { target->kill(); // Now, maybe the pointer is invalid } The "something a player does causes the object to delete itself" can't happen in the middle of that block if it is only single threaded, and so the raw pointer can be used safely, keeping it over a longer duration of course has other considerations. The advantage of using a unique ID / "handle" there, is because of memory reuse you can't safely validator a pointer at a later time. But being able to store an ID between frames you can, and then you can retrieve it again later safely. Entity *target = map->get_entity_by_id(target_id) if (target != nullptr) { // target still valid, raw pointer is safe as before } else { // target is gone target_id = INVALID_ENTITY_ID; // fairly easy to have some sentinel value that acts like a null pointer } In a more complex environment, you could turn that into your own custom smart pointer, I did that previous as an optimisation on "get_entity_by_id" in a design where I stored things in std::vector like arrays and compacted them (meaning objects could move memory address to keep an efficient memory layout, although that was part of an ECS design, so "Entity*" like OOP didn't exist at all)
  1. Load more activity
  • 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!