Jump to content
  • Advertisement
  • Celebrating 20 Years of GameDev.net

    This week, GameDev.net celebrates its 20th birthday. To the GameDev.net Community and the games industry, I wanted to say Thank You for the last 20 years of inspiration, education, and friendship.

    Read the full post

    1. Past hour
    2. Hi, I have been busy for long time so I couldn't play around with Dx12. Well, I got a very simple and basic question. I have read the API references ,did googling but didn't get much information. It is about this API, ID3D12DescriptorHeap::GetCPUDescriptorHandleForHeapStart(). And , ID3D12DescriptorHeap::GetGPUDescriptorHandleForHeapStart() I'm confusing. What Get"CPU" and Get"GPU" means? 1) Is it means that one is a handle for CPU and the other a handle for GPU against the same virtual address or something? [ same address ] ---> for CPU handle [ same address ] ---> for GPU handle or 2) It means that there are 2 different addresses and those handles are representing respectively? [ system memory address ] ---> for CPU handle [ GPU memory address ] ---> for GPU handle Those 2 API returns 2 different values(addresses) so I guess 2 is the answer but I want to sure.
    3. Hey man! Saw your video. Pretty cool game-mechanics. I'm more of a 3D / 2D artist - would like to participate - your gig seems pretty interesting to me. here's some of my works - I can do modelling, texturing, some animation, UI and motion design, and stuff like that. Let me know if you're keen to chat. Cheers.
    4. Today
    5. Spidi

      I Am Overburdened

      The player takes the role of an artifact hunter, who has a surprisingly large carrying capacity, embarking on a quest to search through dungeon after dungeon for mystical artifacts and answers, in a world where magic has long been forgotten… Run focused campaign, playable in short bursts. Fill a huge inventory having 20 slots. Find more than 100 crazy artifacts, all of them unique. Learn the ins and outs of an RPG system which feels approachable and fresh, but familiar and deep at the same time. Crawl in procedural dungeons generated from hand authored layouts. Collect details about monsters and artifacts in your journal. Unfold a funny story, packed with vicious evils, puns and jokes. Immortalize your best playthroughs in the “Hall of Fame”. What is this 20 slots, 100+ unique artifacts RPG nonsense? Simple, your “hero” does not get more powerful magically by beating some orcs to death and he is not a wizard either. In the world of I Am Overburdened the art of magic wielding was lost, but legendary artifacts and relics retained their power. If you equip these you become stronger, sometimes immeasurably, and you may even learn reactive skills and otherworldly abilities, but no sane person wears two pants…
    6. Vilem Otte

      spirit engine development

      As someone who has worked with multiple and also on multiple engines (some even from scratch) I'd say that it is not the engine that takes the most time and money to develop, but the tools. Based on your original post - what matters for the engine is the workflow, not the resulting graphics (some engines, like my Skye Cuillin (shameless self promotion) allows user to specify custom render passes, use custom shaders, use both - geometry and voxels, and so on. It is the toolset that makes it advantageous for me (over other engines) and it is time consuming for me to develop. What would your engine bring new to the market of 'how you create a game in it'? (Just to note here - my engine doesn't bring new ways of creating game to market, I'm just making one that fits projects I'm working on - and adjust tools for that).
    7. fleabay

      Error LNK1168

      Most likely you didn't close the last run of your program and the compiler can't write the new version out. Check your taskbar. Maybe check task manager also.
    8. Tom Sloper

      Error LNK1168

      Don't try to edit an EXE file. You should be editing source code, not object code.
    9. phil67rpg

      Error LNK1168

      how do I fix this problem?
    10. Tom Sloper

      Error LNK1168

      (I deleted the path and changed the filename for simpler reading.) Looks like you're trying to edit an EXE file.
    11. Tape_Worm

      Gorgon Update #2

      This is another small update that fixes a couple of bugs in the editor. These issues were not logged in the issues page on the github repo, but a description can be found in the change log on the releases page. To get the latest version, go to the Github Releases page and download version View the full article
    12. To the contrary, the programmers are the highest paid, because their work makes it all possible.
    13. Tom Sloper

      whatsapp security

      OK, just adding a social media connection, then. There can be danger in doing even just that.
    14. phil67rpg

      Error LNK1168

      I get the following error using vs2017 Severity Code Description Project File Line Suppression State Error LNK1168 cannot open c:\users\owner\documents\visual studio 2017\Projects\Debug\Win32Project1.exe for writing Win32Project1 c:\Users\Owner\documents\visual studio 2017\Projects\Win32Project1\LINK 1
    15. DavinCreed

      RIP Level 1.5: Battle Unit Zeoth

      Battle Unit Zeoth came out in 1990 for the Game Boy. his was a favorite of mine growing up. It’s a short game, but it was nice to put in and play every once in a while. And I played it several times over and over again. Which is why I decided to select this game to be one that I cloned in my quest to become a better game developer. I made some 4 color graphics for this game: the main character, enemies, items, bullets, UI elements, and the level graphics. Like before I tried to spend very little time on the graphics because this part of the plan I’m only supposed to be working on the programming side of things. The graphics and other parts of game development are later on. Like before I played the game several times to get down all the gameplay mechanics that I would need to replicate. The player actions, the item interactions, the enemies, and everything else. This time though, I was a lot better at it and missed far less than on previous times. Like before I worked through each thing one at a time until I was done. How the camera acted was important to the game play, it needed to follow the player with some limits. While before, I had done a lot of child blueprints, in this one I did more and that made things go a bit quicker. Also, I tried things a little differently, not all of it was good. This was a fun challenge. This is the last one for the first level of the RIP method. The next level is to make games with an additional game mechanic. I have chosen Arkanoid with enemies instead of blocks.
    16. 1. How would one go about gaining access and a license to use images from a character creator as simple as that of Black Desert or City of Heroes? Reallusion, Mixamo, MakeHuman. Are not really my cup of tea. I want something simple with limitless character creation potential. Not to be used in a video game, rather for taking still shots to be sold as part of board/card games, cover art, etc. 2. The next question is, is it possible to get this in the context of a 3d world? Ideally licensing through NCSoft or Pearl Abyss would be the way to go. That said, getting ahold of either company is near impossible.
    17. BitsNPiecesMusic

      Bits & Pieces Music

      Hey again, everyone! So I've got 2 things to share: 1.) I finally have a very small side-project with my music! It's for a short RPG and I'm very excited to be getting the experience of making some music for a game! 2.) I have another new track ready for you, called The Path to Victory: Enjoy!
    18. Thank you very much for your reply, Sharingan. I decided to make a trigger, turned off all scripts. Thank You for your explanations, I will think how to do it. require("lualoader/mod") model = MODEL_HOTRINB function main() while lualoader == nil do wait() player = findplayer()-- получить игрока if keypress(VK_H)-- клавиша h. then loadmodel(model) while keypress(VK_H) do wait(1) end while not availablemodel(model) do wait(1) end x,y,z =getcoordes(player) y=y+10 car = createcar(model, x,y,z) releasemodel(model) setarmour(player, 300) printmessage("create car and give armour ", 1000) wait(1900) end end end Thank you very much Warframe for such a detailed full answer. Yes, You are absolutely right, each lua script has its own state and then, each has a main function. Yes, it can not stop the endless loop in lua scripts, complete the flow. This is a very good way that You suggest, you need to analyze it carefully to understand it better.
    19. Yesterday
    20. Sable Prince

      spirit engine development

      kk, have a potential investor lined up... and its nextgen stuff for all u passionate ones
    21. fleabay

      white dragon finger paint

      That's more like a dry smashed serving of instant Ramen noodles without the flavor pack.
    22. Schzophr

      Mon Card Community Project

      Mon Card is a game like Yu Gi Oh where players battle on two sides of a four by four grid using Mon (or other cards). I consider it perfecting Yu Gi Oh, exploiting where it goes wrong and it's altitude. Mon Cards are gold, Ritual Mon Cards are blue, and Mix Mon Cards are red. Multiple Mon Cards on the field can be mixed in mix summon or Ritual Mon can be summoned using a special card, this is called a ritual summon. Players take turns, but there are no phases. Players place card on the grid, either Mon Cards on the front row or special cards on the back row. Special Cards on the grid can activate either players turn. When it's your turn, you draw a card from your deck and if an opponent's special card is activated it is activated as you draw, as you summon, mix summon, ritual summon, special summon, as you attack, as you use a special card - or can numerous other ways. Mon Cards have card effects. Another type of card is a Special Card which is an effect but not a mon. Effects can be diverse as long as it makes sense to players and is good game logic. Mon Cards have levels and the higher level the monster the more pay you need to produce to summon it to th field and that's in the form of lower level monsters who potentially cost nothing to summon to the field. Mon can be summoned through effect called a special summon. Mon have attack and defence, attacking stat is activated when a Mon Card is vertically aligned on the grid front row, and defence stat is activated when a Mon Card is horizontally aligned on the grid front row. Mon can attack once per turn unless by some effect, it changes. If the attack stat is higher than the stat which is active on the enemy Mon Card, that card is destroyed unless by some effect. If an enemy Mon Card is in attack position and is attacked by your monster with a higher attack stat, inflict piercing damage equal to the difference. Defence position monsters cannot attack and do not receive piercing damage. This game will require card designing. I am an apt artist and game logic designer but have no real experience. I will dedicate most of my time to this project and seek others to join my team. Current Work Example Hydra [ATK 1400[ ]DEF 1000] WATER | FISH If this card is in your hand, and you control a Hydra on the field, special summon Three-Headed Hydra from your deck. Three-Headed Hydra [ATK 2500[ ]DEF 2000] WATER | FISH This monster gains 500 attack for each other [Three-Headed Hydra] in the graveyard, hand, or on the field. Thousand-Headed Hydra [ATK 4000[ ]DEF 4000] WATER | FISH This card can attack as many times as there are enemy monsters on the field; this card must attack. Endless Hydra [ATK ?[ ]DEF ?] WATER | FISH This card is ritual summoned using Endless Ocean; this monster gains 1000 attack for each [Hydra, Three-Headed Hydra, Thousand-Headed Hydra or Endless Hydra] in your hand, graveyard or on the field. Red Dolphin [ATK 1900[ ]DEF 1300] WATER | FISH This monster gains 300 attack for each [Red Dolphin, Blue Dolphin, Green Dolphin or Yellow Dolphin] you control. Blue Dolphin [ATK 1800[ ]DEF 1400] WATER | FISH If you summon this card while there is a [Red Dolphin, Blue Dolphin, Green Dolphin or Yellow Dolphin, special summon a Red Dolphin, Blue Dolphin, Green Dolphin or Yellow Dolphin] which is not already on the field, from your deck. Purple Dolphin [ATK 2700[ ]DEF 2000] WATER | FISH This monster is mix summoned using [Red Dolphin and Blue Dolphin]. If this card attacks an opponents defence position monster, inflict piercing battle damage to your opponent. Yellow Dolphin [ATK 1700[ ]DEF1300] WATER | FISH If you control [Red Dolphin and Blue Dolphin], you can special summon this card from your hand. Green Dolphin [ATK 1000[ ]DEF2000] WATER | FISH You can tribute this card to add one [Purple Dolphin, Brown Dolphin or Orange Dolphin] in your graveyard to your hand. Brown Dolphin [ATK 2500[ ]DEF2000] WATER | FISH This monster is mix summoned several ways using [Blue Dolphin and Green Dolphin, Red Dolphin and Green Dolphin, Red Dolphin and Yellow Dolphin, Purple Dolphin and Red Dolphin, Purple Dolphin and Yellow Dolphin, or Purple Dolphin and Orange Dolphin.] You can tribute a monster to special summon a Brown Dolphin from your deck. Orange Dolphin [ATK 2000[ ]DEF2000] WATER | FISH This monster is mix summoned using [Red Dolphin and Yellow Dolphin]. If you control [Purple Dolphin, Brown Dolphin and this card] they cannot be destroyed by battle. Rainbow Dolphin [ATK 4000[ ]DEF 2000] WATER | FISH This card can only be ritual summoned by using Water World. This card cannot be destroyed by battle. If this monster battles a defence position monster inflict piercing battle damage to your opponent. Quirk [ATK 0[ ]DEF 0] WATER | FISH If you control a Quirk in face up attack position and this card exists in your hand, special summon one Abyss Snake from your deck. Abyss Snake [ATK 3000[ ]DEF 3000] WATER | FISH This monster can only be summoned under the effect of Quirk. If this card is summoned, pay 4000 life points. You must control a Quirk on the field in face up attack position. If you are interested leave a message in this thread and I will contact you or contact me via schzophr@protonmail.com
    23. Magogan

      Did I really remake Minecraft?

      Hi Prinz Eugn, thank you for the feedback regarding the screenshots. They are mostly placeholders currently because I still wait for the textures for the characters that some freelancer is creating for me. I obviously can't make screenshots where the characters are just plain white. Nevertheless, your feedback helps a lot. What do you mean, the game I describe here is not what you are reading about on the website? I agree in terms of images, but what is wrong with the texts? I really like the earth-like planet, it looks beautiful overall, maybe some textures can be replaced like the podzol in the forest, but apart from that it really looks great. Yes, it looks like earth and therefore kind of like Minecraft, but I will add more planet types and show those more prominently. I have added some new screenshots of villages and stuff on the store page recently.
    24. Gin Hindew 110

      GameDev - Critique/ Book of Alex

      The first two screenshots look pretty generic but from the gifs onwards they are pretty cool, specially the movement, to make easy hit effects i suggest using typing flowing out from the enemies or from the protagonist's attacks, like magic particles but with letters
    25. EA Put out a nifty, and fairly complete overview of their sky/atmospheric scattering/etc.: https://www.ea.com/frostbite/news/physically-based-sky-atmosphere-and-cloud-rendering And the PDF link: https://media.contentapi.ea.com/content/dam/eacom/frostbite/files/s2016-pbs-frostbite-sky-clouds-new.pdf Here's their froxel fog for near rendering too, as a bonus: https://www.ea.com/frostbite/news/physically-based-unified-volumetric-rendering-in-frostbite
    26. Gin Hindew 110

      Cycling strategy game

      Bicycles and strategy? say no more! Just take a page from real life and introduce the mechanic of... DOPING!!! Dope your player so much that he can perform at peak power but not so much that he will die of cardiac arrest! the trill! the risk! But seriously, a tactic cycling game sounds very weird, i can think of this: the scenario is divided in squared areas, or rectangles since its a race, and every area has a percentage of risk and a percentage of speed, meaning that the most risking areas can provide speed boosts but you risk the bicycle getting damaged, the player has to choose a route with minimizes the risk but maximizes the speed, and if several cyclists happen to be in the same area at the same time their speed decreases but the risk is the same The other side of the strategy would be to buy stronger but slower parts for the bicycle or weaker but faster parts, this would allow to traverse areas with a certain level of risk with no risk at all obtaining a boost from the area even if the bicycle is slower, then the real strategy would come from selecting the area less likely to be occuppied by other players to avoid the speed penalty
    27. Gin Hindew 110

      My new Game Survival Taxi

      i did not play the game but the screenshots look like there is not a clear route, mabe adding some floating icons above it? if the game is about carrying a passenger it would make sense to know the main route, the important part is that it can also allow to take detours without getting lost, which improves the gameplay as the player now has options, what about leaving helpful items outside the main route? to reward exploration
    28. Gin Hindew 110

      How to avoid open-world grind?

      -Turn grinding into a source of consumables widely used by the player, like having one-use spell enhancers/barriers dropped by different enemies or healing items that have low healing but can be spammed, of course, those items should be on their own dedicated button to prevent turning their use into a chore - Make grinding have more than one reward, specially turn the grind into some short term objective AND the standard long term one Example, you need 100 tortoise pelts to trade for Unstorable Pouch, or you need to hit 1000 times with your stick to upgrade your Stick Mastery Technique, then, killing tons of enemies is a must but is also very boring, to avoid that you give your character a power bar that can store up to 5 special power strikes and every power strike has to be charged by killing 5 enemies, killing 100 enemies every time is a chore but 5-25 is not so much variations: Have a tree that feeds on the essence of defeated enemies, more essences give better fruits have merchants or the state pay for every monster eliminated the aforementioned consumables Based on this imagine you go on a quest to fetch the All-Seeing-Eye but the road is plagued by scorpions and tortoises, you kill the enemies and obtain fire barriers, water shoots and refill your power strikes to spam everything against the Fire Cockatoo guarding the eye, then you go back to the town and deliver the pelts required for the Unstorable Pouch, cash in your reward from killing monsters and feed essences to the tree to receive some healing fruits, this way a fetch quest is still a fetch quest but not as boring as it could be
    29. Makusik Fedakusik

      spirit engine development

      Modern Game Engines are 1kk+ lines of code. It's required up to million dollars and several years of full time development. Or really passionate developers. So many just for DX/GL demo with dummy Tools and Utilities.
    30. Thanks @Hodgman. For now I used the uncharted 2 variant and tweaked its values for the night scene. Will look into HDR at a later stage. This is now:
    31. Gin Hindew 110

      Suggestions needed for "Humanitarian game" mockup!

      fetch quests are a given, x person forgot his medicine/money/phone/pet
    32. Gin Hindew 110

      Turn based statistics driven strategy game

      The statistics by themselves would be VERY boring to see, its better to visualize them in some way like small icons popping up around the map for stuff lice crime or poverty and then having the excel sheet to consult the specifics Lets say your map is 100 squared areas and there is a crime icon popping up every time the crime rate increases, so, if the crime rate is 5% you would have 1 icon popping up every 50 seconds, if it increases to 10% that would be 2 icons every 45 seconds, 90% would be 18 icons every 10 seconds and so on The idea would be the sensation of urgency, like its alive and beating faster, same with the other statistics, you could have the roads giving a sensation of movement that speeds up when comerce is booming, buildings that get specific color when developed towards certain industries and the map could start as gray or white to give a clear impression of growth, the main idea is to make the map look alive in a technical way
    33. ScorpioCapricorn

      Any other Angelenos?

      I just moved to the city and was curious if there are any other L.A.-based game devs on this forum?
    34. Gin Hindew 110

      MMORPG Brilliant Game Idea.

      Too late bro, the game was already made, here is the trailer https://www.youtube.com/watch?v=fXgZGZMaUks
    35. Shinmera

      Daily Development Streams

    36. Shinmera


      Set in the post-apocalypse, you play as one of the few remaining androids roaming the earth along with the remnants of human society. As a detective, you solve various cases around the last few human settlements still in existence, and follow an over-arching plot centred around the morality of sentient machines. The project is still in its infancy at the moment, and most of its design is not yet solid.
    37. D4yz

      The Delicious Pseudocode of an English Muffin

      Deliciously understandable.
    38. Prinz Eugn

      Did I really remake Minecraft?

      As many have said, your website screams "Minecraft Clone." You need to invest some time in rethinking how you sell your game, since first impressions are very important and have not gone well so far.The screenshots you have publicly available are especially poorly chosen, they either don't seem to show anything at all, or look straight out of Minecraft. The game you describe here is not the one I see or am reading about on your website. You really need to show not tell. Think about what you want to communicate to potential investors/buyers about your game. What sets it apart, and why would I want to play it? I suggest the following additional screenshots: Block Scale: One to give a sense of scale of the blocks. Some with a character and blocks so it's obviously your world is higher-resolution than Minecraft. Without any clue as to scale of the world, it really does look like Minecraft with a texture pack. World Scale: Similarly, some to show us things that are impossible in Minecraft, like mountain ranges with your generous height limit. Mess with the terrain generator and show us some really unreal structures. Planet Size: Some showing us these planets floating in space at a size we can make out that they are realized worlds. The current space screenshot ("A Realistic Night Sky") is not clear, I thought it was a blurred out stock image. The planet needs to be much bigger, and the nebula needs to be much brighter to really be recognized. General Interface: Some showing something from the player perspective that illustrates unique UI elements. This will be another clear indicator that it's not Minecraft with a skin, but rather a unique experience. Questing: Some showing us some questing stuff. Quests seem to be something that really sets your game apart, show us characters interacting and some of the interface. Even if it's just a screenshot of a character with the dialog subtitle related to the quest, that immediately tells someone 1) there are quest-like things and 2) it's not Minecraft, because there aren't NPCs with dialog in Minecraft. Unique Items/objects: You mention a spaceship in some description text... can we, like, see it? Same goes for other unique items or objects, which will immediately reveal this is not Minecraft! Alien-ness: Some showing us these alien worlds where we can actually see them, so we can tell they are distinct places. Currently your Lumious screenshot is too dark to see anything, and Lunar is just the peak of a grey mountain on black (with a very very faint nebula in the background). You should also check your screenshots and other images on other screens, all your screenshots are really dark, even the one during the day. I think your monitor(s) might not be well-calibrated. Obviously if you can jam mutliple categories into one screenshot, do it. Think a screenshot of the player and their ship on a lunar mountain range, or the player holding a unique item talking to a Pirate on Lumious. You should also rethink your vocabulary to be a less Minecraft-esque in general. Think "Outposts" instead of villages, or "Zones" instead of biomes, little stuff like that. Visually, you could do some pallet swaps and get a way different looking game at first glance (especially with Terra):
    39. Sable Prince

      spirit engine development

      Hi, I am not a programmer but I have an inspiration for an advanced game engine and I am wondering if it is possible, more focused on a vibrant high then realism. If it could be done with technology and programming today it would be the nextgen of engines. Please email me at rhythmbad@hotmail.com for more information or if you might be interested in creating it.
    40. hplus0603

      Challenges of 100 Players

      A modern data center is generally well connected. Cogent will charge you maybe $2k/month for 10 Gbps unmetered backbone bandwidth. If you have 100 servers full of 100 players each, $2k is not going to be your biggest worry 😄 If you host in Amazon, yes, you will pay through the nose. That's how they make their money! Action games, in general, don't do well on AWS, for two reasons. One is the bandwidth cost (streaming in general has this problem, no matter whether video, or gameplay) and one is the virtualization jitter. Depending on where your server instance is placed, you may get smooth-as-glass performance, or you may have noisy neighbors and suffer 100 millisecond interruptions with some frequency. Not being able to know whether to blame the host, or something else, is a terrible handicap when trying to debug gameplay lag reports.
    41. These have been really cool to read, so thank you all for posting! I hope more trickle in over time. When did you join? 5pm PST June 15, 1999 when we redirected Sweet.Oblivion and the other game programming sites to the GameDev.net server. @Myopic Rhino, @Nick Murphy, and I had been running SO for about 2 years or so. SO was a merger of our individual sites. If I think all the way back to the very early formation of the universe, I think it was originally @Myopic Rhino's idea to collaborate. What brought you here? A passion for games and the technology behind game development, particularly in graphics and gameplay/simulation. My roots go back to learning from the 1990s demo scene and mode 13h. Who needs more than 320x240? Why do I participate? To give back. To learn and be inspired by the many who participate. To keep this community thriving.
    42. Well, thanks for the advice
    43. Gin Hindew 110

      Early idle game concept looking for ideas

      For the attack, the player sets some grid points as attack areas and the units will go there to attack, he thing is, you set a large amount of attack points, like 20 or so, and the points will have priority tiers, this is, they will attack in the 1 points and if those points are free of enemy units they will move onto the 2 points, then onto the 3 points and so on, and of course, they will go back if enemies are detected in the previously cleared point, this way the player can set a large amount of routes for the troops and just let them move as they are produced
    44. It's hard to tell, but I think you have a pattern where each of your lua scripts defines a global function called "main", and you invoke that in each of them? So, the issue right now is that (a) all your Lua code runs infinite busy loops, and (b) you have no way of signalling to your threads that they should stop processing, whether because you are shutting down the application or just restarting your scripts. What you probably want to do is change paradigms. For each file that successfully loads as a Lua script, you want to create and register a Lua Module object to communicate with that script. The module is responsible for the lifetime of the Lua State. Lua code can register event listeners and callbacks and such with the Module which they live inside. When your application generates an event (including the "run this code 30 times per second" event, or whatever), you iterate through all modules and raise the relevant event on them. The module wrapper translates the C++ event into a Lua function call, and calls the handler code inside their Lua module. You'll want to take care of threading concerns, and handle runaway Lua code, at this point. This way, when you want to "reload" scripts, all you have to do is tell each Lua Module wrapper to scrap their current state and re-load it from file. class LuaModule { private: std::string m_path; lua_State *L; void load(); void unload(); public: LuaModule(std::string path); LuaModule(LuaModule &&other); ~LuaModule(); void reload(); /* ok(); returns true if module is ready to use */ bool ok() const; /* callGlobal(name); really simple example invoke, returns true if the method exists and completed without error */ bool callGlobal(const char *name); }; void LuaModule::load() { if( ok() ) { // We are already loaded; we have to be unloaded first. return; } if( m_path == "" ) { // We can't be loaded, on purpose. See the move-constructor. return; } // Compile the Lua source file in question. lua_State* L = luaL_newstate(); int status = luaL_loadfile(L, m_path.c_str()); if( status == 0 ) { // Link the libraries (which were not necessary to just parse the file). luaL_openlibs(L); getGlobalNamespace(L) .beginClass<CPed>("cped") .endClass() // закрыть регистрацию класса. .beginClass<CVehicle>("CVehicle") // имя класса авто в lua. .endClass() // закрыть регистрацию класса. .addCFunction("findplayer", findplayer) // возвращает указатель игрока. .addCFunction("sethealth", sethealth) // название функции в lua и c++. уст здоровье. .addCFunction("setarmour", setarmour) // название функции в lua и c++. уст броню. ; // Call the top-level block function, to initialize this module. lua_pcall(L, 0, 0, 0); } else { // Error during loadfile; close the state. lua_close(L); L = nullptr; } } void LuaModule::unload() { if( ! ok() ) return; lua_close(L); L = nullptr; } LuaModule::LuaModule(std::string path) : m_path(path), L(nullptr) { load(); } LuaModule::LuaModule(LuaModule &&other) : m_path(other.m_path), L(other.L) { // Detach the other from its LuaState, and empty its filename to make sure it can't be re-used. other.L = nullptr; other.m_path = ""; } LuaModule::~LuaModule() { unload(); } void LuaModule::reload() { unload(); load(); } bool LuaModule::ok() { return L != nullptr; } bool LuaModule::callGlobal(const char *name) { if( ! ok() ) { // This LuaModule was not ready to be called. return false; } lua_getglobal(L, name); if( LUA_TFUNCTION != lua_type(L, -1) ) { // Value was not a function; pop whatever it was and return false. lua_pop(L, 1); return false; } if( 0 != lua_pcall(L, 0, 0, 0) ) { // Call failed with an error (now on-stack) lua_pop(L, 1); return false; } // State OK, method existed, and method exited without error. return true; } // In your game's main loop somewhere... switch(event.type) { case PLAYER_DAMAGED: broadcast("onPlayerDamaged"); break; //... } //... std::vector<LuaModule> allModules; //... void loadFile(std::string filename) { LuaModule tmp(filename); if( tmp.ok() ) { allModules.push_back(std::move(tmp)); } } //... void broadcast(const char* event) { for(auto& module: allModules) { module.callGlobal(event); } } //... /////////////////////////////////////////////////////////////////////// // player-invulnerable.lua -- Find the player during script init player = findplayer() function onPlayerDamaged() -- Make the player near-invulnerable by -- resetting their health whenever harmed. sethealth(player, 200) setarmour(player, 250) end
    45. PeterZ

      Challenges of 100 Players

      High data transfer cost is another challenge. Say you are transferring more than 150TB a month. AWS will charge you at $0.08/GB data transferred. https://aws.amazon.com/blogs/aws/aws-data-transfer-prices-reduced/ 9MB a seconds is around 30GB an hour. That's about 2.5 dollars an hour. (30*0.08).
    46. Mike Bossy

      Celebrating 20 Years of GameDev.net

      Congrats on a huge milestone! A wonderful site and resource to many over the years.
    47. Neon signs are very important and very attractive for advertisements.I want to design a 3d neon sign having smooth edges and round shape.I use Adobe Photoshop for this purpose. Does any one have suggestions about different best tools to make this creativity except Adobe Photoshop?
    48. If you have a strong idea and connection to your neo-noir setting, try to let that inform your choices with both gameplay mechanics and the narrative. If the noir part is the important part, I would go with the brain implant route and make him an adult from the beginning maybe an ex-soldier or former criminal. As classic noir generally is about criminals or soldiers or violent men somehow. Loss and revenge, all that stuff. Trying to change your nature. So the brain implant one and two consciences struggling is very noir. If you have a stronger neo scifi element the changing body option seems better. Or if you attached to a specific gameplay mechanic let that inform your decision. But always pick the one you like the much, that makes the writing process easier I find.
    49. GildedOctopusStudios

      The Delicious Pseudocode of an English Muffin

      //This pseudocode will teach you how to make an English muffin for breakfast as //a programmer. It will also show you how to explain programming to //non-programmers. check_ingredients( egg, English muffin, sausage, cheese, mayonnaise) { if !egg return error if !Englishmuffin or Englishmuffin==moldy return error if !Suasage or !cheese or !mayonnaise return error return true } cook(ingredient){ place in pan when done remove } assemble() { stack ingredients } eat(){enjoy} //in the main function if check_ingredients( egg, English muffin, sausage, cheese, mayonnaise){ cook(egg) cook(sausage) cook(English muffin) mayonnaise.spread() assemble() eat() } */As you can imagine I had an English muffin for breakfast. It got me thinking as I made it about the steps involved. The concept of pseudocode is a great starting point for explaining programming to non-programmers. As a teenager I competed quite aggressively in science fairs. I had to come up with a simple way to explain programming to judges. Often times they were experts in their own fields but had no background in programming. Pseudocode improvisation was my preferred method because even if you have never touched a computer before you can quite easily understand the concept of pseudocode. I would spontaneously come up with a short pseudocode related to their field to explain how programming works and how my projects worked. When making video games you can have a similar problem in explaining what you do to people who have no background in the programming side of building video games. These might be people on your team or investors or even relatives at annual family dinners. Start by following these simple steps (I’m assuming for the purposes of this explanation that you are a programmer.) Step 1. I do programming. Step 2. Counter their “What is programming?” with programming is like making an English muffin. First you check if you have all the supplies, then you cook the ingredients, then you assemble it, then you eat it. Programming is simply writing down the steps in such a way that a computer can do it. You can substitute almost anything for making an English Muffin. Step 3. Specific key words related to your specialty. This is so if someone asks them a question about what you actually do they can show off their knowledge. Keep it simple. For example “I use the programming language C# to build video games.” You can expand upon what type of video games you build if asked for more details. That’s it. Three simple steps that will leave your team mates, investors, and family members actually having an idea of what you do as a programmer. A last interesting fact the English muffin is not actually English. They were invented by a British ex-pat in America and in fact are sold overseas as American muffins. I found the fascinating story at https://www.thekitchn.com/the-english-muffin-is-not-english-at-all-234056 /* The post The Delicious Pseudocode of an English Muffin appeared first on Gilded Octopus. View the full article
    50. As you always have the problem in a multithreaded environment, you need to have some kind of trigger state that will end your loops. For example while(!loopClose) { ... do } This state should be something global and properly synced e.g. through interlocked arithmetic. Then you need to end in your main functions body, that function should maintain a second state that indicates if reload was triggered. If so, loop again and start all the state mashines again, otherwise leave and shutdown the application
    51. If you just look at initial cost structure and then make a conclusion without evaluating the many many other variables that determined that initial cost, then sure "ya got me" but it feels like a big oversight. World of Warcraft were one of the first to market ( MMO ), which are always the ones that pay the biggest price. I would be okay with the 2009 version of WoW. Many technologies and libraries are put out now that would otherwise would have to be paid and built for back in those days. My game won't be focused on having tons of highly detailed content for many different (classes * races). No custom game engine, rendering is already available, lots of plug and play. I can purchase bulks of same design models / textures on unity game store for a few hundred which would of costed hundreds of thousands back in the day I like your comment on the WebSockets and assuming its speed is negligible to UDP, that sounds great.
    52. Panagiotis Kouvelis

      Celebrating 20 Years of GameDev.net

      Major congratulations are in order for this life achievement! You are awesome and that goes also for the members of the community, old and new! Here's to 20 years more and beyond!
    53. Pasarel Studios

      My second game release

      About the game Color Switches is a simple and fun game made for android , your objective is to drag the "Switches" left and right , each "Switch" goes in a different direction . But that's not it when the Switches are in the middle they change they'r color in white and you can pass white obstacles only if you are white ,purple can only go through purple obstacles and so on. About me My name is Alex i'm a 17 years old developer from Romania , I always enjoyed playing games and doing stuff on computers(Video editing, photoshop etc) but recently i started programing (7 months ago) and started learning unity 5 months ago , and I'm trying to open my own studio "Pasarel Studios" even if i'm the only one currently . Development of the Game Making this game was a lot of fun , hardships , and I learned a lot of things making it. It all started when I messed up some code,and one object was not going in the direction i wanted it to , and I made that "mistake" my core mechanic of this game . Making this (at least for me) was really hard , i felt like giving up so many times, but something pushed me everyday and said "FINISH IT" and I didn't gave up , even if sometimes was so buggy that it was unplayable. What I learned When I started this project I didn't have a single idea how to implement skins , how to make a menu for levels , how to place rewarded ads , how to make the score system to work at all. And I gave myself a challenge , to not watch any tutorials on how to do different things , just use what I already know to get what I want to work (even if my code is really messy in some parts) and somehow , it WORKED! I implemented everything I wanted to in my game ! Have Fun! Leave me any bad or good comment , tell me what can I do better or what I did bad. This is my 3rd game so I don't expect it to be a "Hit Game" on marketplace , but all the things I learned were worth IT! Google Play Store : Download studio instagram : @pasarel.studios_ personal instagram : @alexandruandriev I hope you have a nice day and don't give up on anything that you do!
  • 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!