Advertisement Jump to content
  • Advertisement
    1. Past hour
    2. Since hardware with full support for floating point textures and frame buffers is so ubiquitous today, is there a reason to shoehorn in HDR using non-float formats? The doubling in memory usage incurred by half-floats is indeed daunting, and minifloats just don't offer the desired level of precision in many cases. Still, this could mean so little on contemporary hardware that the benefits far outweigh any potential penalties,
    3. Hi there, My name is Liam. I've been out of game dev for a long time. My last video game project was for the Net Yaroze if that gives you a time frame. I have however been working on a lot of tabletop games as of late and figured it would be worthwhile getting back to my roots. I'm able to do a little bit of everything, but focus on art. I'm a graphic designer for a living, and versed to some degree with most 2 and 3d art, but have been working primarily in vector, illustration and UI for the last 5 years. As for what am I looking to make? Anything really. Sure I'd like to work on something with a ton of depth, but I think something simple and short might be best for getting to know and develop a working relationship with people. Thanks for reading.
    4. Today
    5. Hi! I'm a concept artist/illustrator/2d artist working in the gaming industry for over five years and I'm looking for people to work with on small projects. Anybody who needs some stuff done that goes in kinda like a Enter the Gungeonesque style? Would love to work on something small and sweet! Check out my portfolio https://www.artstation.com/gregor or drop me a line: gregordashkari@gmail.com. Thanks!
    6. Hi there, Please help us evaluate three fighting-game streaming channels (Twitch) through the following SurveyMonkey page: https://jp.surveymonkey.com/r/8PR7QRD It takes around 15 to 20 minutes to finish this evaluation. Thank you so much in advance for your contributions to fighting-game research. If possible, please finish the survey by this Sunday. Team FightingICE http://www.ice.ci.ritsumei.ac.jp/~ftgaic/
    7. IPnose

      Crystal Mine

      Hello, everyone, I'm dusting off this topic to tell you that for the past 3 months I've been making some minor modifications to Crystal Mine: a better dispatching of bonuses on the grid (it's not perfect yet, but it's already much better than at the beginning), a background blur at the end of a level or on a failure, so that the background does not interfere with reading the text, a bonus if you collect more than 90 crystals (per crystal), the conservation of remaining lives when a level is completely cleared, the display of the ad at the top of the screen to prevent people from clicking on it by mistake (it's not really in my interest but well...). The first in the ranking scored 763,955, so don't hesitate to dethrone him. See you soon!
    8. Hello, I am a bit new to DX12 and I'm trying to implement dynamic resources in my engine. Currently, I have 2-4 of each object that manages per-frame resources, so that's 2-4 fences (ID3D12Fence, value and event), ConstantBufferRing, DescriptorRing... etc. So basically each object has its own timeline, in my SwapBuffers function, I simply present, wait for the next frame and reset all its allocations. Is this wrong/inefficient ? I have seen many posts that recommend managing these resources with a single fence, but I can't see how to sync with the GPU otherwise.
    9. Hi everybody, Xilvan Design building 3D games since 2004 in Blitz3D, we are now presenting you our kindly official gaming related pages... Now, we have a .com & CNET.download.com are publishing our games. We use premium service & have unlimited bandwidth & infinite memory. - The Xilvan Design Website - (please click on each links, download games & bookmark the pages): Lights of Dreams IV: Far Above the Clouds v11.07. Candy World II: Another Golden Bones v15.07. Candy Racing Cup: The Lillians Rallies v4.17. Candy World Adventures IV: The Mirages of Starfield v8.27. Candy to the Rescue IV: The Scepter of Thunders v9.27. Candy's Space Adventures: The Messages from the Lillians v19.17. Candy's Space Mysteries II: New Mission on the earth-likes Planets v9.47. Heres my YouTube Channel ZeldaOOT, where we are showing Candy's & Lights of Dreams Series. Lately, I was working on newer video for my fans. - My Youtube Channel - Friendly, Alexandre L., Xilvan Design.
    10. Tom Sloper

      Tips for game programmer portfolio

      You shouldn't portfolio all the code for the entire game. Just the code that shows off your good coding habits and the smart solution you used for a particular feature.
    11. MobilityWins

      Special Effects For Games

      I actually encountered and issue. nothing I do with PBR graph changes the color or anything of the shader. it stays pink. I downloaded Render Liteweight pipeline and render pipeline.core. but it seems I might still be missing something
    12. I recently made the jump from OpenGL to vulkan. Following a tutorial i was able to display a simple colored triangle on the screen. Now, given that the tutorial was creating unique buffers for each allocation (vertex/Indexbuffer) i started implementing the vulkan memory allocator from AMD. The allocator seems to work, but i'm currently stumbling upon an issue in binding the vertex- and index buffer. Originally the buffers where bound with this code: VkBuffer vertexBuffers[] = { vertexBuffer }; VkDeviceSize offsets[] = { 0 };//offset is in both cases zero, as the vertex and indexbuffer have seperate buffers vkCmdBindVertexBuffers(commandBuffers[i], 0, 1, vertexBuffers, offsets); vkCmdBindIndexBuffer(commandBuffers[i], indexBuffer, 0, VK_INDEX_TYPE_UINT16); But after using the vulkan memory allocator, the memory was sub-allocated and thus buffers could be reused between object but the offset/startingposition of the specific data has to be taken into account. So i rewrote the code like this: //in this case the vertex and indexbuffer share the same VkBuffer object but the offset is different VkBuffer vertexBuffers[] = { vertexBuffer.buffer }; VkDeviceSize offsets[] = { vertexBuffer.allocationInfo.offset }; vkCmdBindVertexBuffers(commandBuffers[i], 0, 1, vertexBuffers, offsets); vkCmdBindIndexBuffer(commandBuffers[i], indexBuffer.buffer, indexBuffer.allocationInfo.offset, VK_INDEX_TYPE_UINT16); //======= //uniforms vkCmdBindDescriptorSets(commandBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &descriptorSets[i], 0, nullptr); //------- vkCmdDrawIndexed(commandBuffers[i], static_cast<uint32_t>(indices.size()), 1, 0, 0, 0); vkCmdEndRenderPass(commandBuffers[i]); Starting the c++ project does render the triangle correctly, but the validation layers throw this message: validation layer: vkCmdDrawIndexed() index size (2) * (firstIndex (0) + indexCount (6)) + binding offset (256) = an ending offset of 268 bytes, which is greater than the index buffer size (12). The Vulkan spec states: (indexSize * (firstIndex + indexCount) + offset) must be less than or equal to the size of the bound index buffer, with indexSize being based on the type specified by indexType, where the index buffer, indexType, and offset are specified via vkCmdBindIndexBuffer (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID- vkCmdDrawIndexed-indexSize-00463) I'm confused why it compares the index size * index Count + offset with the index buffer size. (which in this case is 12 bytes). The offset itself should be just an offset and not be counted towards the buffer size. Am i setting the parameters incorrectly? Are the offset parameters the offset for the starting position in the buffer for the information? I looked up the function calls in the vulkan documentation but i can't seem to find the issue here. (Unless i'm mixing up the offsets somehow).
    13. Then you should program custom applications yourself just for your portfolio and resume. For example, if you programmed path finding in a game, then you would make a basic application that performs the same thing but without reference to the project you worked on. Show your best work, when you're competing with other people for the same job you don't want to put yourself at a disadvantage. Best of luck.
    14. lougv22

      Tips for game programmer portfolio

      Thank you. How would I show them my code though? Everything in my game, including the code, is copyrighted material. Doesn't the same potential for liability that applies to games as a whole also apply to the code? I do have an older game project (XNA with C#) that was just for training purposes. I could show that, but it's old and not representative of my best work.
    15. phil67rpg

      c# tic tac toe game

      here is my latest code using System; using System.Collections.Generic; namespace tictactoe { class Program { static void Main(string[] args) { int player_x = 0, player_o = 0, count = 9; Console.WriteLine(" 1 | 2 | 3 "); Console.WriteLine("---|---|---"); Console.WriteLine(" 4 | 5 | 6 "); Console.WriteLine("---|---|---"); Console.WriteLine(" 7 | 8 | 9 "); bool gameOver = false; char[,] board = new char[3, 3]; while (gameOver==false) { Console.Write("Enter X spot (1-9): "); int num = Convert.ToInt32(Console.ReadLine()); Random rnd = new Random(); List<int> boardmove = new List<int>(); boardmove.Add(1); boardmove.Add(2); boardmove.Add(3); boardmove.Add(4); boardmove.Add(5); boardmove.Add(6); boardmove.Add(7); boardmove.Add(8); boardmove.Add(9); int rand = rnd.Next(1, count); int num_one = boardmove[rand]; boardmove.RemoveAt(rand); count--; switch (num) { case 1: board[0, 0] = 'X'; player_x = 1; break; case 2: board[1, 0] = 'X'; player_x = 2; break; case 3: board[2, 0] = 'X'; player_x = 3; break; case 4: board[0, 1] = 'X'; player_x = 4; break; case 5: board[1, 1] = 'X'; player_x = 5; break; case 6: board[2, 1] = 'X'; player_x = 6; break; case 7: board[0, 2] = 'X'; player_x = 7; break; case 8: board[1, 2] = 'X'; player_x = 8; break; case 9: board[2, 2] = 'X'; player_x = 9; break; } switch (num_one) { case 1: board[0, 0] = 'O'; player_o = 1; break; case 2: board[1, 0] = 'O'; player_o = 2; break; case 3: board[2, 0] = 'O'; player_o = 3; break; case 4: board[0, 1] = 'O'; player_o = 4; break; case 5: board[1, 1] = 'O'; player_o = 5; break; case 6: board[2, 1] = 'O'; player_o = 6; break; case 7: board[0, 2] = 'O'; player_o = 7; break; case 8: board[1, 2] = 'O'; player_o = 8; break; case 9: board[2, 2] = 'O'; player_o = 9; break; } if (player_x == 1 && player_o == 1) { board[0, 0] = 'X'; } else if (player_x == 2 && player_o == 2) { board[1, 0] = 'X'; } else if (player_x == 3 && player_o == 3) { board[2, 0] = 'X'; } else if (player_x == 4 && player_o == 4) { board[0, 1] = 'X'; } else if (player_x == 5 && player_o == 5) { board[1, 1] = 'X'; } else if (player_x == 6 && player_o == 6) { board[2, 1] = 'X'; } else if (player_x == 7 && player_o == 7) { board[0, 2] = 'X'; } else if (player_x == 8 && player_o == 8) { board[1, 2] = 'X'; } else if (player_x == 9 && player_o == 9) { board[2, 2] = 'X'; } Console.WriteLine(" {0} | {1} | {2} ", board[0, 0], board[1, 0], board[2, 0]); Console.WriteLine("---|---|---"); Console.WriteLine(" {0} | {1} | {2} ", board[0, 1], board[1, 1], board[2, 1]); Console.WriteLine("---|---|---"); Console.WriteLine(" {0} | {1} | {2} ", board[0, 2], board[1, 2], board[2, 2]); if (board[0, 0] == 'X' && board[1, 0] == 'X' && board[2, 0] == 'X') { Console.WriteLine("Player X Wins"); gameOver = true; } else if (board[0, 1] == 'X' && board[1, 1] == 'X' && board[2, 1] == 'X') { Console.WriteLine("Player X Wins"); gameOver = true; } else if (board[0, 2] == 'X' && board[1, 2] == 'X' && board[2, 2] == 'X') { Console.WriteLine("Player X Wins"); gameOver = true; } else if (board[0, 0] == 'X' && board[0, 1] == 'X' && board[0, 2] == 'X') { Console.WriteLine("Player X Wins"); gameOver = true; } else if (board[1, 0] == 'X' && board[1, 1] == 'X' && board[1, 2] == 'X') { Console.WriteLine("Player X Wins"); gameOver = true; } else if (board[2, 0] == 'X' && board[2, 1] == 'X' && board[2, 2] == 'X') { Console.WriteLine("Player X Wins"); gameOver = true; } else if (board[0, 0] == 'O' && board[1, 1] == 'O' && board[2, 2] == 'O') { Console.WriteLine("Player O Wins"); gameOver = true; } else if (board[0, 2] == 'O' && board[1, 1] == 'O' && board[2, 0] == 'O') { Console.WriteLine("Player O Wins"); gameOver = true; } else if (board[0, 0] == 'O' && board[1, 0] == 'O' && board[2, 0] == 'O') { Console.WriteLine("Player O Wins"); gameOver = true; } else if (board[0, 1] == 'O' && board[1, 1] == 'O' && board[2, 1] == 'O') { Console.WriteLine("Player O Wins"); gameOver = true; } else if (board[0, 2] == 'O' && board[1, 2] == 'O' && board[2, 2] == 'O') { Console.WriteLine("Player O Wins"); gameOver = true; } else if (board[0, 0] == 'O' && board[0, 1] == 'O' && board[0, 2] == 'O') { Console.WriteLine("Player O Wins"); gameOver = true; } else if (board[1, 0] == 'O' && board[1, 1] == 'O' && board[1, 2] == 'O') { Console.WriteLine("Player O Wins"); gameOver = true; } else if (board[2, 0] == 'O' && board[2, 1] == 'O' && board[2, 2] == 'O') { Console.WriteLine("Player O Wins"); gameOver = true; } else if (board[0, 0] == 'O' && board[1, 1] == 'O' && board[2, 2] == 'O') { Console.WriteLine("Player O Wins"); gameOver = true; } else if (board[0, 2] == 'O' && board[1, 1] == 'O' && board[2, 0] == 'O') { Console.WriteLine("Player O Wins"); gameOver = true; } } } } } I am still stuck on how to get the computer player to work.
    16. Have you read any books on Unreal Engine 4 and C++? If so, which ones were good? Thanks!
    17. sdidsa

      Shadow mapping methods

      that's what i thought,thank you guys for your replies and suggestions, i think i should just get over it and start with openGL. ThinMatrix already seems like a good choice to start with, thanks again
    18. WitchLord

      Catching two in a row

      I've fixed this in revision 2579. I'm sorry for the delay.
    19. LandonJerre

      Shadow mapping methods

      You are right, I ment the 3D related classes/packages got abandoned quickly. Although by looking at how Oracle treats JavaFX, I wouldn't count on it having a bright future, if I remember correctly they either already cut it out of JDK, or they plan to do it in a future release.
    20. fleabay

      Shadow mapping methods

      JavaFX is not abandoned. Also there is no such thing as JavaFX 3D, but if you do a Google search it might seem otherwise because of pages named such as 'JavaFX 3D rotations' which just means 3D rotations in JavaFX.
    21. Yesterday
    22. LandonJerre

      Shadow mapping methods

      I'm looking at the Oracle docs for JavaFX 3D, but I cannot find any indication that it supports custom shaders, or anything else that could be used to create proper shadows in any way I know of. ( It barely supports anything useful according to the docs, it looks like Oracle abandoned it astonishingly quickly. ) In the longterm switching to another graphics library could be a good idea, if the project let's that. Edit: I thought about it a bit more, the API supports custom triangle meshes, so that could be used to create late '90s style hacked shadows. Basically you define a plane which would "receive" shadows, then take all the meshes that cast shadows on that plane, and flatten them against that plane (project them onto it) into a new mesh, and add those back into the JavaFX scenegraph with a black color, and proper positioning. On the other hand, I wouldn't recommend doing this, it's more like a thought experiment.
    23. Alright, that's enough. This is a classified, not an engine architecture thread. @DaTueOwner, feel free to post another request that is free of this rather meandering conversation. The rest of you are welcome to take it up in the usual places.
    24. Oberon_Command

      Anyone who wants to write a little game engine?

      This is incorrect. A common C# interview question for junior developer positions is "what is the difference between a struct and a class?" And the answer pivots entirely around this issue - an object defined by a class is always on the heap/free store and is eligible for GC, whereas a struct is placed inline. So, if it is created on the stack, then it will live on the stack. Also, the "stackalloc" keyword (in unsafe blocks) allows programmers to allocate objects directly on the stack. See https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/choosing-between-class-and-struct https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/stackalloc
    25. What do you mean "file-trash"? UE4 is on github too. Calling Github a trash can for code (at least that is what I think you meant by that word) is just ignorant.
    26. If it reliable and quality why it live on file-trash like GitHub?
    27. sdidsa

      Shadow mapping methods

      yes, it's because of the limitations, however that seems like a fair explanation, i will check again and report back. thank you
    28. It mean same it, becouse GC languages unable to place temporary objects of classes on stack.
    29. So do you think that the engine I linked (xenko) is not of good quality and reliable?
    30. Caganius

      8D music in videogames

      I was just wondering whether some of you had used 8D/ambisonics audio effects for any of your games, or whether you have seen it implemented in any games you played. Honestly, I haven't heard anything about real uses in the game industry apart from VR, and I would like to know if there's any reason for that. Looks to me like it's worth experimenting with it pretty much everywhere.
    31. CrazyCdn

      Shadow mapping methods

      I'm not familiar with JavaFX but what exactly is your hangup? There are plenty of articles on shadow mapping and plenty of different methods of shadow mapping. Maybe instead of using JavaFX if it's so limited switch to pure Java and OpenGL? ThinMatrix on YouTube has some good tutorials for different OpenGL + Java techniques:
    32. Oberon_Command

      Anyone who wants to write a little game engine?

      It's possible to avoid triggering the garbage collector during gameplay. You can use up-front allocation and object pools in managed languages just like you can in C++. You don't get RAII, but plenty of games have shipped without the use of RAII in gameplay code. Using a managed language doesn't mean you have to be heap-allocating constantly. C# has stack types, too. It is easy to find articles on the subject, like this one, that explain how to deal with the problem. A lot of it boils down to "don't make heap allocations", and put stuff on the stack where possible - just like in C++, too.
    33. But it have requirments to runtime, that managed languages conceptually unable to fit. Is unity is not a parody to game engine? Is a engine and its component written on managed language? Instead it have only editor and scripting on C#. Anything else done on C++.
    34. not sure if this is the right place to ask, but i have made a certain simulation with JavaFX 3D API and it's working very well so far, now i wanted to implement 3D shadows and i wasn't able to find any articles or help, i had to read a lot of articles about 3D shadow mapping algorithms but i wasn't able to apply anything on my JavaFX project i already assumed that it's impossible but if anyone of you have tried that, let me know
    35. moshimoshi_ent

      [FREE][ANDROID] Run Deer Run

      Run Deer Run My first game for Android, which I made with Unity. I would be grateful if you could play this game and say something I am waiting for every opinion or tips because I want to improve my knowledge. I had no idea about programming and making games so it was a long road but I acquired new skills thus I am really pleased. Google Play - https://play.google.com/store/apps/details?id=com.moshimoshi.rundeerrun Thank you all
    36. DividedByZero

      Anyone who wants to write a little game engine?

      I am sure that the OP isn't trying to rival Unity at this point. The concepts are language independent.
    37. But not any language good for realtime software.
    38. Then I disagree with you. It's not the only option. And this kind of attitude leads to perfection petrification. From the details laid out by the one seeking advice here, any language would be a great learning experience for them.
    39. The magic words for running a different function implementation in a derived class are "C# method overriding". If you search for that, you should find plenty of examples of how to make a method in a derived class do something else.
    40. The "g" looks like you assume row 0 of the bitmap is always at the baseline, and the bitmap has the same number of rows as the height of the letter. For letters that end below the baseline, this cannot be true. Instead of randomly trying weird fixes, why not debug your problem? Take the "g", as that's clearly wrong, and look at the numbers you get from the freetype library. Take a piece of paper, and draw where the bitmap box is, according to the documentation and the numbers that you get.
    41. In short - i trying to argue why C++ is only option to productively developt a quality and reliable game engine. Really in many cases it much faster to do, than using a managed languages. For example fact that memory leaks really exists on practicle, not in theory only, a has know from guys that use managed languages and expirience a indirect memory leaks problems wery often. Of cource. Make once a 2-way smart-poiner system (that can fit at 250 lines of code) and never worry about how to remove object from model and dead references, or to keep temporaty memory leaks, that managed languages offer as protrction from dead references, temporary.
    42. I am sorry, I cannot determine what you're trying to say. I've developed real time games in C++. While it is time consuming at times to develop safe software in C++, it's very possible to prevent run time errors in C++ from coming up and/or crashing the application. And if you follow OOP principles well enough, you don't have to worry much about requirement changes either.
    43. For realtime software managed languages is not a option at all by definition of realtime. For video games, that is kind of "soft" realtime software (where "soft" only mean that malfunction of software will not cause a disaster, but not change any requirments to keep it in working condition), other native language that good for realtime, obviuosly not a option too, becouse it intended to other niche like ADA(for FA realtime most importent thing is to process device interrupts and timers at time with given priority, unlike games ) or too outdated to productively developt such complexive software as game engine like Pascal/Delphi/Fortran/C.
    44. It's most likely to be a false positive, caused by some part of your code that is somewhat similar to some part of the virus signature. This is quite common, especially if you're doing some clever bit-twiddling and the like in your code. I've had major problems with some bioinformatics software I wrote before for similar reasons. All you can do is whitelist it for now on your computer, and report it to the virus protection vendors as a false positive.
    45. I agree with the advice to work on the engine on your own. If it's for learning, then doing it on your own is the way to go. Create a document that details the entire scope of the project and only expand on that scope if another item in the design needs it to be completed. For beginner level development projects, I don't think that's the most efficient use of your time. Obviously you might be different than most, but from developers I know and me making the same choice early on, you'll be wasting your time while other developers will be passing you by. If/when you get the project done, you'll have gained some in depth skills, that are highly specialized. That's not bad in itself, I suppose it depends on your goals. However, if you take on making games using already developed engines, make a few games, and then develop your own engine, then you'll not only have a better grasp of development in general, you'll also have a much better idea about you want out of a game engine. I mean, you don't want someone who's never worked on a car to design a car engine do you? Even as a learning experiment, a person would be much more efficient by working on some cars and then designing and making an engine, than a person just jumping right in to making an engine. tl;dr: It is a good learning experience, but making a few games with other engines first will probably work out better in the long run. Also, I wanted to say, try not to worry too much about languages unless you are going for optimum performance. C# is just fine. I don't know about Rust, I never developed anything in that. C++ is great, but try not to take people touting it as the only option too seriously. You'll find problems with any language you choose, as well as benefits. Just pick one and run with it for the project. If you want, you can try a different language for your next project.
    46. C# have outdated memory managment that not applicable for realtime software. Also it unable to make static allocation of object and have no tools to implement automatic object lifetime managment. And it applicable to any managed language - it have outdated and useless GC, that required to no more then 0.001% of modern managment tasks, unlike task of plain chained buffers managment for wich it has been invented at 1959. Anything else works much better without GC and also GC prevent implementation of automatic memory managment schemes for modern graphs of links, like mix of composite and observer pattern, where objects without trace to root is impossible at all, and objects have to be deleted when it lost specified trace to root regardless of quantity of other existing traces. So really GC languages solve problens that never exists making tons of problems as cost of it solution. C# is not a "C++++" and not related to C at all. It just a Java++ intended to extend abilities of Java for visual development of GUI, and it almost fail to fit it task. First project for wich Microsoft has try to use C# was a C# Builder that thay has try to implement together with Borland. Results has so trimmed, in comparsion with Delphi and C++ Builder, so Borland has refused to relase it and gift it to Microsoft together with Hailsberg. Delphi.Net that has been developed as side effect of C# builder ptoject, same has been so trimmed, so has been reased only once. Similar failure was with C++.Net. IT becouse GC not intended for modern memory managment tasks. Really C++ is a first OOP language that eliminated outdated and useless for OOP GC. And still only language that make it efficiently - results allow to use much faster and much flexible automatucs that can be easily ajusted to fit needs of any hierarhy best.
    47. Rust trying to prevent opportunity to Intentionally shoot you leg by cutting of all legs and hands. As mentioned before standart library good for about any use-cases for cost that it is best for about nothing. It why anything like memory managment containers and so on in C++ live as library - it make no difficulties with replacing it by components that match requirments of task best. Rust putting same that STL do under hood, making difficulties with replacing components and nothing else. For example what difference betwin borrowing and move symantic? But what you will do with rust when you need a copy-on-write symantic or self-deletion of objects? Also rust dont support OOP that making it concepts outdated for at least 40 years. Really looks like people that invent rust just has not understend basics concepts of C++.
    48. Before I start, a quick disclaimer: I don't work much in C# and it's been quite a while since I did any at all, so apologies if I get some of the syntax a touch off, or if my methods of doing things aren't up to the latest C# approaches. Okay, so firstly, you want your base behaviour definition to be an interface rather than a class, this means that rather defining actual methods, etc. it simply declares an interface of expected methods, etc. that need to be implemented by the implementing class. You can refer to objects by their interface just fine, so something like this: // Interface for the behaviour interface IBehaviour { // Simplest possible RunAction // You may actually want to pass the full command in, // or the parameters to it, or some game objects to work with void RunAction(); } This is obviously the minimum set of actions for Behaviour interface, you might want to add additional methods or properties to the interface, to give it more functionality. Note that in this approach, behaviours don't know what keywords are used to trigger them ('take', 'open', etc.), this is by design to make them more flexible, more on that below. (Btw, alternatively you could declare RunAction to be a virtual method in your base class and then override them in your derived classes, but interfaces are usually a better way of doing this in languages that support them, such as C#). You can then implement an action in your implementing class. Note that because you are using an interface, your behaviour implementations can have completely separate design rather than being part of a class hierarchy, this makes them more lightweight and flexible. As a simplistic example, you could do do something like this: class HelloWorld : IBehaviour { void IBehaviour.RunAction() { Console.WriteLine("Hello World!"); } } Which you can then use in your main code, with something like this: // You can create any behaviour you like here IBehaviour behaviour = new HelloWorld(); // And this call will always invoke the right action // In this case printing "hello world" behaviour.RunAction(); As in your code, you will actually want to put your behaviours into a Dictionary or similar that lets them be looked up by keyword and the right behaviour invoked. I'm not sure how you are deciding which behaviour classes to instance for your keywords when defining them in your textfile, but if you're not already using one, you probably want to look into implementing the Factory Pattern to do this. Using a factory pattern will help keep your code nice and clean and separate the range of available behaviours from the code that creates them. Allowing your keywords to be specified separately from your behaviours allows the same behaviour to be used for multiple keywords, which seems like a likely occurrence to me (e.g. you might want to 'enter' a portal but 'climb' a ladder, but both actions will take you to a new room). I hope that helps, let me know if anything isn't clear.
    49. kseh

      Dungeon Crawler Challenge - Update 3.1

      Hmm. I had no idea that the music or sound was included in the video capture. It sets a much more light mood than I was figuring. The rectangle character with out a doubt has charm as he is. The past bit of development, I've been putting some armor type items together for equipment. The result is that I now have a character that looks quite human again, loosing some of the charm of being a simple shape. It also pulls the game away from the above style making it feel like it's harder to get away with simple abstracted graphics. Gonna need to think about this a bit.
    50. WitchLord

      When to prepare context?

      Are you calling Execute on the same instance of asIScriptContext that you called Prepare on? If Prepare was successful (check the return code) then Execute shouldn't return asCONTEXT_NOT_PREPARED (unless you're calling it on a different instance that hasn't been prepared). I cannot comment on your design decision. The description is way to vague for that. There is nothing wrong from AngelScript's point of view to prepare the context in one step of the setup to be used at a later step during execution, but the prepare could just as well be done just before the call to Execute in the same execution step. Which is better depends more on your surrounding engine design than AngelScript itself, e.g. how you manage the contexts, how you treat compile time errors versus runtime errors, etc.
    51. It's also possible that all of those virus scanning software providers that are flagging your .exe subscribe to a shared virus definition database somewhere, which your signature has been uploaded to. In which case you would need to find the false-positive reporting mechanism for that, or rely on your AV provider to propagate the change upstream like they did the false-positive in the first place. It's also theoretically possible that you could make a few changes to the code here or there that would alter the final signature of your executable enough that it no longer matches the definition on file.. It seems as though debug mode is doing this for you.
    52. frob

      Where to find the correct DirectX SDK ?

      Correct, you cannot install DX11.2 on Windows 7. As was written above, DirectX has been tied to the OS version since 2006. The last OS to have separate editions of DirectX was Windows XP. DirectX 10 was Windows Vista. Portions of DX11 were backported in Service Pack 2 after consumer and developer outcry. DirectX 11 was Windows 7. Portions of DX11.1 were backported to Windows 7 in the service pack, but there was significant missing functionality. DirectX 11.1 was Windows 8. DirectX 11.2 was Windows 8.1. DirectX 11.3 was Windows 10, as the final update to the DX11 series. DirectX 12 is Windows 10, and there are three versions so far. There was the initial version with SDK 10240 (initial launch), SDK 15063 ("Creators Update", also called 1703), and SDK 17763 ("October 2018 Update"). You only get the functionality if you update Windows 10 to that version. No, unless you accidentally move from Windows 7 to Windows 8.1. If you want DX11.2, you must migrate the system to Windows 8.1. If you move to Windows 10 you get DX11.3. I think the last version of the Windows SDK that work SDK v7.1 from 2010. After that, VS2005 could be manually configured to point to the newer compiler and newer libraries and headers.
  • 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!