Jump to content
  • Advertisement
    1. Past hour
    2. HI there, I'm currently working on a 2-player local card game and have run into a problem concerning hidden information. As in most other card games, I want to keep the cards each player has, hidden from the other player, but when you only have one screen this turns out to be more difficult than you think. I have multiple ideas how to solve the problem, but none of them really seams to be very elegant: 1. Turn around the cards, for the player that currently has to make a turn: This is the first idea that came into my mindt, but it also has a big problem: The other player isn't allowed to look at the screen while the other player is performing his turn. This seems unituitive because your opponent might want to think about his next move, or even worse, might need to respond to your actions depending of the design of the game. It also seems very unfun, to always make sure the inactive player turns around before making the next turn. 2. Encode the cards of each player: My second idea was to let each player choose a seed, to encode their cards. This would work like the following: Each player chooses a seed which then encodes each players cards (gives them random ids, according to the seed) The game would then only show the id's of the card available to the player. The second step would be to create a small phone app, where you could enter the seed and then display your cards by entering the ids shown on the main game. The problem with this would be that each player needs to keep track on his phone which cards he has, which he just played, etc.. This would cause the player to effectively do each turn twice because after playing a card on the main game screen he would need to manually remove it from his phone app. 3. Create a networking system that sends the game information to each players phone: Pretty much the same deal as above, only that you get rid of all the manual work of seed picking and updating the cards in your hand. A downside for me, however is all the code needed for networking to manage this stuff. For now I rather prefer to stay away from the networking aspect, as my project is complicated enough for now. 4. Scrap the idea of the local multiplayer and go full online mode (like Hearhtstone): Same deal as above, would need lots of networking. As you can see none of the solutions are very practical (if you want the project to stay local and don't use any networking). Do you have any ideas how you could solve this problem more elegant without overcomplicating the hole process of getting the information to the player and breaking the gameflow to much? Thanks in advanced for your help!
    3. Anton Kormishenkov

      2D To The Capital 2 is now live on Steam!

      To The Capital 2 is a game in the genre jRPG with classic turn-based battles in which you have to travel together with four heroes visiting a lot of cities, dungeons, mysterious places and fight with various bosses.It took almost 2 years to develop and finally we have reached this important event as the release of To The Capital 2!Big thank you to everyone who has followed our project. I hope our game will give pleasure to fans of the genre of jRPG, and beginners in it.
    4. Maybe you are right about bindless and multithreading combined, I haven't thought about it too much in a while. Although we already have texture arrays in d3d11, I don't see why we can't relax the requirement that they be all the same format and size, and just let us index an array of textures in a shader. I think OpenGL has bindless texture extension. I don't see how this causes a multithreading issue for SRVs. Seems multiple threads could reference a read-only texture resource just fine when building a command list.
    5. There's a reason I quoted two numbers in there instead of 1. You can multiply the whole thing by 10 if you like to get a safe "10km to 1cm detail" range. Fixed point 32bit was mentioned where obviously you can't use int(1) = 1m and still have millimetre details... So it holds that the same arbitrary unit techniques can obviously be used with float as well. Almost everyone works in meters and the other scientific units by default though, so I quoted my rules of thumb using those units and human scales. Did you really just assume I was telling you to store vertex position as meters in an integer and that will somehow preserve sub-milimeter details? And then repeatedly try to point out that this isn't true?
    6. Today
    7. DividedByZero

      Creating a global thread

      Awesome @All8Up, that worked perfectly. Many thanks!
    8. Another update, this time #4, getting close to release now ' Update #4 Live - Chopper Boss of DOOM 17 Feb @ 4:21pm - ExUnitDazza We've released a new update to Smith and Wintston! This is mainly a metric ton of tweaks to the first half of the game to make it more balanced and more fun to play. Thanks to everyone that gave us feedback and helped make the game even better. Features: Added in the Chopper boss. This is the middle boss in the game. He’s pretty epic (testable via the new BETA TEST menu) Added a BETA TEST menu so player can test specific features of the game and give us feedback without destroying their Arcade Save games. We’ll be adding things to this menu and asking for feedback a lot we think. Added a button for twitter and facebook in the title screen Tweaking/Balancing of lives and ammo based on player feedback and streamer videos Added disabled story and coop buttons to the main menu so players know they will be there activated at some point After the player dies in a level specific enemies don’t restore so it becomes ‘slightly’ easier to finish the level. The cost to the player is that they will get a slightly lower score because there are less enemies to kill. Beta Test You can jump straight to the Chopper Boss from the new Beta Test menu option. You can test the boss and give us feedback without affecting your Arcade Save game. We'd love to hear from all players Engine Changes: Upgraded BGFX rendering code. At least 10% faster on all platforms. Added Metal rendering engine for macOS (8x faster than OpenGL) Added OpenGL rendering engine for Windows macOS and Windows can select the rendering engine to use in Options > Video Bug Fixes: Fix for some of the trophies not being present Skip cutscene text is now correct for controller, KB/Mouse users. Ping Game Boy helmet renamed to the correct Pink Game Boi Chopper based enemies can now be hit by grenades Mining Laser now shoots from closer to the player so that when right up against the wall it actually hits it. This makes running through the caves and mines a lot easier. In some levels the player plows through snow or mud, after they died this stopped working, this is fixed. Some GameObject (enemies, pickups etc) were not restoring after player death long german and spanish phrases should now in to text boxes custom in game cursors appear in front of the shippy text. Once again, thanks to everyone that's played the game and given us bug reports and feedbacl. It's really means the world to us so jump in to the forum and tell us what you think!'
    9. Astrofra

      Pygame - alternatives?

      You should have a look at HARFANG 3D, that is a full C++ engine with a Python API (just import harfang and you take it from there) I'll let you have a look at the samples below and try it for yourself. Just feel free to contact me if you have any question, I'll be glad to help (I work for the company that develops HARFANG). A mini "ace combat" game, all done in Python : A snooker simulation, in full rigid body physics, all done in Python : and a couple of code snippets, including VR : https://github.com/harfang3d/vr-python-quickstart
    10. upallinsky

      My first OST | Feedback please

      Maybe you're right. Because I'm trying to meet expectations, but i think this is not my lvl now.
    11. Eternal

      Creating a global thread

      The temporary is already an rvalue, so what's the std::move for? (And the lambda also isn't useful, if you don't need the capture.)
    12. nsmadsen

      My first OST | Feedback please

      Gotcha. In that case - why not just have the audio by itself? Tying it to the Star Wars visuals definitely gives an expectation.
    13. upallinsky

      My first OST | Feedback please

      Thx a lot, man! Yeah, i have some problems with melody, because i usually used a voice for that, but in soundtrack voice doesn't need. I try to upgrade my tracks with your opinion. In Star Wars this is my first video music experience. And now i understand that this is big fail. Hope for next time i was more prepared. And again, thx so much!
    14. nsmadsen

      My first OST | Feedback please

      Destiny - Man, this is a fun track! I'd watch out for your low to highs balance here. I'm getting a LOT of highs but not much lows at all. This is making the mix feel tinny and thin. With the emotional, epic vibe you're building, there's PLENTY of opportunities here to make some big, large impacts. I really like the moment at 2:27 but I'd be careful about the rhythms here. With such a slow attack on the long(er) strings, it can make things feel out of time. The ending should be built up to be MUCH larger. The last few drum hits just don't do it justice at all. And consider a cymbal roll into that final hit with a nice, long reverb tail. It's a fun track but there's still a lack of a main melody. Not saying that's a problem but just be aware of it. The name fits - certainly feels like an epic, fates-driven song. Nice job, overall! Star Wars - You have to be really careful when writing to picture. You want to make sure your music matches the visuals perfectly in both terms of rhythm and vibe/mood. Unfortunately, I feel neither are matched up well in this video montage and your music. I would go back and look for key moments you want to hit and work out ways to build up the music (or have it suddenly drop out) to better fit the pacing of the visuals. Then also do a better job of establishing the vibe and mood you want the music to express. This music feels way more melancholy than what the visuals and the plot of The Empire Strikes Back presents. Also some of the same production tips I gave for Destiny apply here too. Hope that helps! Nate
    15. therax1986

      Theraxius - HTML5 2D action game + level editor

      I work with JavaScript for almost 10 years and I always used other frameworks and libraries (jQuery, Angular). For this project I intentionally decided to write it in pure JavaScript.
    16. All champions in League of Legeds are 3D models, animated with skeletal animation. You can see the actual models in lots of viewers, even online - like here: https://www.fanbyte.com/features/league-of-legends-model-viewer/#W1swLDAsMCwiNDAiLDMsNV1d It doesn't include particle effects at all, but basically you can see that there is just 3D model and simple skeletal animation. Not just for movement, attacks, but even for death (which points out that there is no rag doll physics involved, at all). The maps are also 3D, hand textured - the look is quite acceptable. They often use large polygons with hand painted image - especially for backgrounds around the map. They don't really use many effects (they used even less back then), I believe their goal is and always was to target even slower hardware (I was running it on integrated Intel GPU back when I was on university - and the performance wasn't bad). Some basic physics computation will be involved - for Ziggs abilities F.e. (bouncing bomb) - but they don't really use any rigid body dynamics, or cloth physics at all. Some animations are baked and look like physics simulation (collapsing environment on Howling Abyss for example). This will be just assumption on my side - but I believe Riot uses navmesh to implement character navigation on map (therefore when you move anywhere, your character immediately knows the path how to get there. Other champions can then be implemented by other agents on the navmesh, and so does minions (and abilities). You then have to avoid/block with other navmesh agents when going along the path. Why do I think it is used? Try blocking minion wave with your character, they do have some collision avoidance implemented. Also this tends to easily allow some characters to ignore the barricade (like moving through minions), easily implement 'Flash' ability, etc. Riot hosts their own servers, each of the 10 regions uses different location. What do you consider affordable budget? For development I'd dare to say that single small virtual server is enough (possibly multiple to implement load balancing) - these things are extremely cheap (I pay about $50 per year for one of these, and you can get cheaper depending on your requirements). As for live servers, this will depend on the amount of people that will play your game (your budget can easily go anywhere between $20 per month, to $20k per month and beyond). Using cloud services like AWS can be a huge advantage here, because you can scale them based on your requirements (start with small one, and when picking up more players you can upscale), this should work unless your game is simply too big, and it most likely will work for that scenario too, although ... at some point buying your own hardware and housing it will most likely be cheaper.
    17. SoldierOfLight

      Performance of D3D12 and Vulkan

      You don't get bindless texturing or efficient multithreading without manual memory management and manual resource barriers. I suppose some people may see memory management as a feature rather than a tax, but resource barriers are nearly always a tax. But if you want the ability to do bindless or efficient multithreading, the app's the only one who has enough information to be able to do it -- in order for the driver to do it, they'd need to know what you're referencing (defeated by bindless) and when (defeated by multithreading).
    18. DX12 makes sense for large teams or companies that make engines that can optimize for each GPU type. It's not worth the development cost for small companies or smaller 3D projects IMO. I hope they eventually release some sort of DX11++ that supports the ray tracing API, bindless texturing, PSOs, and better multithreading, maybe even manual resource barriers. Not really interested in manual memory management (maybe make this optional--let driver do it or do your own). I think they could have solved a lot of the CPU draw-call overhead problems without going so low-level.
    19. I like the idea of finding new names and say take it a step further and abandon the high-fantasy setting, keep the same concept, slow speed tank units that deal heavy damage, mid range units with more speed and less damage, and of course the squishy special skill users. The basic concepts of strategy the SRPG genre are rooted divide all military combat units into 3 groups,infantry, artillery and cavalry. Each has its' strengths and weaknesses and is effective against one while being vulnerable to the other. It's easy to default to knights, archers and mages when translating this concept to video games because that is the standard for so many of the best SRPGs, but at it's core it's just a basic grid based rock, paper sciscors game. If you have something awesome that will stand out like a story that absolutely needs to be told in a Tolkenesque high fantasy setting or a bunch of assets made and work done on a fantasy. Of course you should try and find a game play mechanic to make it stand out but I think a different story and setting will do just as much to make you stand out. Take for example "Shadowrun", it took the basic table top mechanics of "Dungeons and Dragons" then changed the settings and made their own distinctive world out of it. There are the same basic concepts, magic, orcs, fairies, dragons, but it's in a cyberpunk setting and set in alternate future dystopian versions of real world cities. The series has managed to stand out and have longevity compared to the countless other D&D clones of the time and has been around for about 30+ years. First, decide on a setting. If you have your heart set on high fantasy medievil we can work from there but see if you can't come up with anything else. It doesn't have to be Shakespeare, it can just be the Shmoobles wanting to fight the Schmobbles because they took all the Schmoopty, the important thing here is where is this happening?
    20. h8CplusplusGuru

      Creating a global thread

      you're going to need a std::move in there like All8Up posted.
    21. Hi All, I want to make a game similar to league of lengends but I am not able to decide certain implementation factors that I will eventually put in my code. 1) Is the game world full 3d or 2d? I am confused here because there are videos on youtube that show first person LOL and there are video captures that shows full 3d perspective view of characters. Is it 3d but the camera is fixed at angled top view? Is it not a waste of polygons of your game objects are 3d but you get to show them from one fixed global camera? 2) Is there any physics simulation involved? It looks like interacting players have fixed animation and it does change per map position. If there is some, how of physics is involved? 3) How collision detection is implemented? I believe characters just block each other and dont’t animate while trying to be at one same coordinate. They interact only throug auto(which is click and play) or abilities(click and play). 4) If my multiplayer architecture is client server, then where can I deploy the server? Do lol have dedicated high performance/ load balancing server computers for each continental areas? Are they self hosted or hosted through aws/cloud services? Is it possible to setup self hosted server application with affordable budget? How much?
    22. I've recently implemented runtime lua scripting in my game engine, and am currently just polishing it. During the polishing I noticed that when I do this one specific thing in lua, the stack gets overflown. I'm doing the memory management my self for the lua stack, and I'll code dump it at the bottom of this post in case it has any relevance. To give some context, I'm using the __index and __newindex metamethods for reading and writing fields in the user data "LuaEntity", which is basically just a wrapper for the Entity class in my engine. This is somewhat what the __index and __newindex functions look like in C++ static int32 __index(lua_State *ls) { string _index = lua_tostring(ls, -1); if (lua_isuserdata(ls, -2) && !lua_isnil(ls, -2)) { auto _entity = (LuaEntity*)lua_touserdata(ls, -2); if (SceneManagement::GetEntity(_entity->id)) { _entity->UpdateProps(); if (_index == "x") { lua_pushnumber(ls, _entity->x); } else if (_index == "some_field") { lua_pushnumber(ls, _entity->some_field); } else if (_index == "some_other_field") { lua_pushnumber(ls, _entity->some_other_field); } else /* if reading a non-default field */ { lua_getuservalue(ls, -2); WZ_ASSERT(!lua_isnil(ls, -1), "Tried reading unitialized field '" + _index + "' in '" + _entity->name + "'"); lua_pushvalue(ls, -2); lua_gettable(ls, -2); lua_remove(ls, -2); } return 1; } } else { lua_pushnil(ls); } return 1; } static int32 __newindex(lua_State *ls) { string _index = lua_tostring(ls, -2); if (lua_isuserdata(ls, -3) && !lua_isnil(ls, -3)) { auto _entity = (LuaEntity*)lua_touserdata(ls, -3); if (SceneManagement::GetEntity(_entity->id)) { if (_index == "x") { WZ_ASSERT(lua_isnumber(ls, -1), "Expected number value"); // .. Set "x" to the value top on stack } else if (_index == "some_field") { WZ_ASSERT(lua_isnumber(ls, -1), "Expected number value"); // .. Set "some_field" to the value top on stack } else if (_index == "some_other_field") { WZ_ASSERT(lua_isnumber(ls, -1), "Expected number value"); // .. Set "some_other_field" to the value top on stack } else /* if writing a non-default field */ { lua_getuservalue(ls, -3); lua_pushvalue(ls, -3); lua_pushvalue(ls, -3); lua_settable(ls, -3); lua_remove(ls, -1); } _entity->UpdateProps(); } } return 0; } }; This all works fine as in I can read and write both the default but also user-made fields in the entity table without a problem like this: local function update() -- A callback function that's invoked each frame from C++ local entity = entity_get("some_entity") local old_x = entity.x local old_y = entity.y -- .. do stuff if (old_x ~= entity.x or old_y ~= entity.y) then -- .. entity moved end end This keeps the memory steady with no problems, however, If I were to do the same thing but instead of storing entity position in old_x and old_y I would store it in a table called old_pos like this: local function update() -- A callback function that's invoked each frame from C++ local entity = entity_get("some_entity") local old_pos = { x = entity.x, y = entity.y } -- return values 'x' and 'y', pushed to the stack in C++, doesn't get garbage collected - memory fills up -- .. do stuff if (old_pos.x ~= entity.x or old_pos.y ~= entity.y) then -- .. entity moved end end then the values x and y, each pushed to the stack in __index as a return value, seems to not get garbage collected by lua which quickly fills up my stack budget and causes the stack to overflow. Here is how I've told lua to handle stack memory: struct LuaMemPool { const void *head; const void *tail; const ubyte *headByte; ubyte *current; LuaMemPool(void *head, void *tail) : head(head), tail(tail), current((ubyte*)head), headByte((ubyte*)head) { } void Free(void */*ptr*/) { } void *Allocate(size_t sizeBytes) { void *_ptr = current; current += sizeBytes; WZ_ASSERT(current <= tail, "Memory usage overflow"); return _ptr; } void *Realloc(void *ptr, size_t oldSize, size_t newSize) { void *_newPtr = Allocate(newSize); memcpy(_newPtr, ptr, oldSize); Free(ptr); return _newPtr; } int32 Allocated() { return (int32)(current - headByte); } static void *Alloc(void *ud, void *ptr, size_t osize, size_t nsize) { LuaMemPool& _pool = *((LuaMemPool*)ud); if (nsize == 0) { if (ptr != nullptr) { _pool.Free(ptr); } return NULL; } else { if (ptr == nullptr) { return _pool.Allocate(nsize); } return _pool.Realloc(ptr, osize, nsize); } } }; I am aware that I'm not freeing memory.
    23. JokinenHarri

      Crypts of Death: Free Android mobile RPG

      It's a really fresh and interesting take on the rpg genre! I really like it Hope to see more updates in the future.
    24. I've recently implemented runtime lua scripting in my game engine, and am currently just polishing it. During the polishing I noticed that when I do this one specific thing in lua, the stack gets overflown. I'm doing the memory management my self for the lua stack, and I'll code dump it at the bottom of this post in case it has any relevance. To give some context, I'm using the __index and __newindex metamethods for reading and writing fields in the user data "LuaEntity", which is basically just a wrapper for the Entity class in my engine. This is somewhat what the __index and __newindex functions look like in C++ static int32 __index(lua_State *ls) { string _index = lua_tostring(ls, -1); if (lua_isuserdata(ls, -2) && !lua_isnil(ls, -2)) { auto _entity = (LuaEntity*)lua_touserdata(ls, -2); if (SceneManagement::GetEntity(_entity->id)) { _entity->UpdateProps(); if (_index == "x") { lua_pushnumber(ls, _entity->x); } else if (_index == "some_field") { lua_pushnumber(ls, _entity->some_field); } else if (_index == "some_other_field") { lua_pushnumber(ls, _entity->some_other_field); } else /* if reading a non-default field */ { lua_getuservalue(ls, -2); WZ_ASSERT(!lua_isnil(ls, -1), "Tried reading unitialized field '" + _index + "' in '" + _entity->name + "'"); lua_pushvalue(ls, -2); lua_gettable(ls, -2); lua_remove(ls, -2); } return 1; } } else { lua_pushnil(ls); } return 1; } static int32 __newindex(lua_State *ls) { string _index = lua_tostring(ls, -2); if (lua_isuserdata(ls, -3) && !lua_isnil(ls, -3)) { auto _entity = (LuaEntity*)lua_touserdata(ls, -3); if (SceneManagement::GetEntity(_entity->id)) { if (_index == "x") { WZ_ASSERT(lua_isnumber(ls, -1), "Expected number value"); // .. Set "x" to the value top on stack } else if (_index == "some_field") { WZ_ASSERT(lua_isnumber(ls, -1), "Expected number value"); // .. Set "some_field" to the value top on stack } else if (_index == "some_other_field") { WZ_ASSERT(lua_isnumber(ls, -1), "Expected number value"); // .. Set "some_other_field" to the value top on stack } else /* if writing a non-default field */ { lua_getuservalue(ls, -3); lua_pushvalue(ls, -3); lua_pushvalue(ls, -3); lua_settable(ls, -3); lua_remove(ls, -1); } _entity->UpdateProps(); } } return 0; } }; This all works fine as in I can read and write both the default but also user-made fields in the entity table without a problem like this: local function update() -- A callback function that's invoked each frame from C++ local entity = entity_get("some_entity") local old_x = entity.x local old_y = entity.y -- .. do stuff if (old_x ~= entity.x or old_y ~= entity.y) then -- .. entity moved end end This keeps the memory steady with no problems, however, If I were to do the same thing but instead of storing entity position in old_x and old_y I would store it in a table called old_pos like this: local function update() -- A callback function that's invoked each frame from C++ local entity = entity_get("some_entity") local old_pos = { x = entity.x, y = entity.y } -- return values 'x' and 'y', pushed to the stack in C++, doesn't get garbage collected - memory fills up -- .. do stuff if (old_pos.x ~= entity.x or old_pos.y ~= entity.y) then -- .. entity moved end end then the values x and y, each pushed to the stack in __index as a return value, seems to not get garbage collected by lua which quickly fills up my stack budget and causes the stack to overflow. Here is how I've told lua to handle stack memory: struct LuaMemPool { const void *head; const void *tail; const ubyte *headByte; ubyte *current; LuaMemPool(void *head, void *tail) : head(head), tail(tail), current((ubyte*)head), headByte((ubyte*)head) { } void Free(void */*ptr*/) { } void *Allocate(size_t sizeBytes) { void *_ptr = current; current += sizeBytes; WZ_ASSERT(current <= tail, "Memory usage overflow"); return _ptr; } void *Realloc(void *ptr, size_t oldSize, size_t newSize) { void *_newPtr = Allocate(newSize); memcpy(_newPtr, ptr, oldSize); Free(ptr); return _newPtr; } int32 Allocated() { return (int32)(current - headByte); } static void *Alloc(void *ud, void *ptr, size_t osize, size_t nsize) { LuaMemPool& _pool = *((LuaMemPool*)ud); if (nsize == 0) { if (ptr != nullptr) { _pool.Free(ptr); } return NULL; } else { if (ptr == nullptr) { return _pool.Allocate(nsize); } return _pool.Realloc(ptr, osize, nsize); } } }; I am aware that I'm not freeing memory.
    25. If I try and sell you something for 100 but say I will take 10, then you ask me if I am talking about dollars, I would say "don't get hung up on the units, I'm talking about magnitude".
    26. Nick Griffith

      Ideas for Platformer Game

      Thanks for the idea man! I think that's a really cool idea. I'm planning out what choices you make right now, and that looks great.
    27. Irusan, son of Arusan

      float or double for my vertices / normals?

      I think you're getting hung up on the units, when @Hodgman is really just using them as an example to talk about magnitudes of scale. He's saying that if you're covering around 7 orders of magnitude or less (i.e 10km to 1mm, or 10m to 1 micron, or 1AU to 10 miles, or whatever) then you're fine with a float.
    28. It is the most common problem for anyone who starts to study TS. They cannot include a few ".js" files after compilation to <script> tags in "index.html". It is very simple in JS. You have two files in JS and you can include them in "index.html": index.html <html> <head> <script src="js/sayHello.js"></script> <script src="js/main.js"></script> </head> </html> sayHello.js function sayHello(name) { console.log("Hello, " + name); } main.js function main() { sayHello("Ivan"); } window.onload = main; Output: But if you rewrite these files in TypeScript: sayHello.ts export function sayHello(name: string): void { console.log("Hello, " + name); } main.ts import { sayHello } from './sayHello'; function main(): void { sayHello("Ivan"); } window.onload = main; And if you compile them to JavaScript: tsc ts/main.ts ts/sayHello.ts --outDir "dist" You cannot just include this files in "index.html": <html> <head> <script src="dist/sayHello.js"></script> <script src="dist/main.js"></script> </head> </html> You will see this errors in the browser debug console: There are a few ways to solve this problem: You can concatenate all generated ".js" files in one bundle.js file using: Webpack, Gulp, Grund and so on. For example, see this official instruction: Gulp - TypeScript You can compile to AMD modules and use RequreJS to load them. For example, see my instruction: A few TypeScript files on Sandbox You can use Browserify to concatenate all generated ".js" files in one bundle.js file I will show you how to use Browserify. Install Browserify using this command: npm install browserify -g You can create bundle.js using this command: browserify dist/main.js dist/sayHello.js -o dist/bundle.js You will see "bundle.js" in the "dist" folder. Now you can include "bundle.js" in "index.html" using <script> tag: <html> <head> <script src="dist/bundle.js"></script> </head> </html> Open "index.html" file in a browser and you will see "Hello, Ivan" in the browser debug console. Bonus. UglifyJS You can install uglifyjs: npm install uglify-js -g And compress your "bundle.js" to "bundle.min.js": uglifyjs dist/bundle.js -o dist/bundle.min.js Do not forget to change a script name from "bundle.js" to "bundle.min.js" in "index.html": index.html <html> <head> <script src="dist/bundle.min.js"></script> </head> </html>
    29. I think you did. You can put a whole planet in 1 unit or you can fit a grain of sand in 1 unit. It depends on the game. There is no such thing as kilometers or millimeters inside a computer. It matters with scale when exporting/importing meshes from DCC tools to game engine but also with floating point accuracy inside the game itself. Without defining a base unit size you can make no assumptions. A unit is not a size. Unit math is what causes floating point accuracy errors. You must define the size of a base unit to make real world comparisons thus my observation to Hodgman's assumed unit size... "You can't assume what size the units represent and it does matter when using your guidelines listed. "
    30. Irusan, son of Arusan

      Need Advice Important (advanced questions)

      Hello youngster It is not possible for a single person to create something that matches the best game engines. Unity employs 2000 people, they've been developing for years. The idea that you can do that on your own is nonsense. The good news is that you don't have to; people confuse the difficulty of making a game engine with the difficulty of developing a game from scratch without using a game engine. This is possible; although not sensible (I'm doing it because I want to, not because I think it's a better approach). Realistically the best way to make games is to just use an existing game engine. Nope, this is mostly just Game Programmer snobbery; however, there is a filter effect. The minimum skill level for entry is higher, which creates a slightly false impression of overall difficulty, but there are top class programmers in basically every field taking on remarkable challenges. JavaScript is a god awful excuse for a language; please don't confuse it with modern languages such as C#, Rust, or Python. C++ continues to be the best widespread language at what it does and will be around as a major legacy language until long after you and I are retired. However, the need for maximal performance is ever diminishing and, realistically, there's no good reason to favour the C++ of Unreal over the C# of Unity or vice-versa beyond personal preference or considerations such as existing code, or favoured libraries to use with it. Both are easily capable of powering AAA quality games. Outside of games, C++'s diabolically poor Windows development libraries are an issue; C# is simply better for any kind of Windows UI stuff. No. The difference in performance is marginal and far smaller than other concerns.
    31. Next part: Browserify TypeScript
    32. Prototype

      Ideas for Platformer Game

      Perhaps you could give the player a choice whether he wants to abide by the rules or take a more riskful path, e.g. getting a job or do some shady business. That could open up a lot of possibilities.
    33. Shaarigan

      Need Advice Important (advanced questions)

      Using a game engine like Unreal or Unity you can get to an acceptable result as fast as a day of tutorials get you. Making a game engine by yourself is a long term but interesting job I do for last 6 years in C++ now. I worked part time at it in my spare time (that is nearly 1 1/2 years of work in fulltime I think) and had an iteration process where I throw code away and started completely from scratch but at least it was/is worth it if you don't want to release a game in a couple of months with that. There are a lot of topics you need to get about and even more management needed as I posted some answeres here related to engine architecture. I'm on the track of doing anything on my own so using no third-party libs and even prevent using the STL is my goal and I got very far with that. I've seen a lot of engine projects out there in the wild and most of them just threw some libaries from all arround the net together and called that a game engine while others like Urho3D (free and open source) made a good first look and even Cry Engine and Unrealare open source these days. Feel free to take a look at them. It is but because of the debugging capabilities. You won't see a mesh laying on the GPU as you see a buffer you allocated in your 'normal' program and even Shader programming is a world of itself. It depends; if you are using C++14 + with all that fancy shiny language features, it is bloated of stuff you won't need for a game/engine except for a very slow and memory wasting one. SmartPtr dosen't do memory caching and dosen't prevent memory from fragmentizing while Lambdas are a thing to avoid unless you really know what you are doing. On the other hand C++ has more capabilities of low-level handling than other languages like Java or C# and this is what makes it such powerfull. I love playing with raw pointers and using templates while in our coding guidelines we highly recommend the C++ 99 standard and rarely use some C++ 11 features to keep anything compatible. Crysis is almost obsolete and you should avoid using Cry Engine. Unreal and Unity are both capable to run well on limited platforms if you know what you are doing. They don't keep ya away from wasting CPU and memory
    34. wurstbrot

      Theraxius - HTML5 2D action game + level editor

      Very, very nice! I love the art style, and how you managed to make it look great with very simple graphical means. However, the thought that you wrote it in JavaScript hurts in my brain...why don't you use TypeScript? I mean, on the other hand, this makes it even more impressive, but I wouldn't want to put that pain on me.
    35. Nick Griffith

      Ideas for Platformer Game

      He's just a normal man, in a normal world. You'll get to decide things like who he marries, some of his friends, college or no college, things like that. The idea is that the levels are supposed to represent the difficulties of navigating everyday life, with any mistake potentially destroying your life(restarting the level)
    36. Prototype

      Ideas for Platformer Game

      So tell us a little more about Harold Where does he live? Is it a fantasy world or more like real life? What's his goal? What other characters are playing a role? You have to define your world at least loosely otherwise you may end up with something that feels tacked-together. I could say here it would be fun to swing on a rope but perhaps that doesn't make any sense in your game. Don't confuse this with elaborate storytelling, but just use it for yourself as a general guideline for things that happen in your game. Hope this helps.
    37. therax1986

      Theraxius - HTML5 2D action game + level editor

      The demo (more like a prototype) is out! Go, try it. Any thoughts, feedback? http://theraxius.com/play
    38. Nick Griffith

      Ideas for Platformer Game

      It's a pixel art game, where you are playing through the life of a man named Harold. You can make rpg-esque "decisions", more difficult decisions(AKA going to college) having more difficult platforming required. There will be 15+ endings based off of your decisions you make in game.
    39. No. It's just a proportion. The order of magnitude is the same whether you talk about meters, kilometers, yards or whatever. So if you have a map of 10 km with the minimum detail is about 1mm, it is the same if you have a 10 meters map and a detail about 1e-3mm and so on. Or did I understand wrongly what you told ?
    40. Prototype

      Ideas for Platformer Game

      Try to create a theme and some background story for your game. That will give you some context from which you can extract ideas. People would also be able to give you more coherent suggestions.
    41. Looks a bit like Phantasy Star. If you wanna make a game with artsy backgrounds i recommend a (2D)-shooter or platformer. ps, Age of Wonders isn't a 4X-game(on soil) though it shares some similarities since they re both empire-builders.
    42. Nick Griffith

      Ideas for Platformer Game

      I'm building an innovative 2d platformer game, more on that later probably. I've created basic mechanics, some basic enemies, wall jumping platforms and the like. But I just need MORE to fill my levels with. Could you guys give me ideas for enemies, items, mechanics, basically anything(art would be appreciated, but I just need ideas)
    43. Esteban5XG

      Project BlockchainZ [Available on itch.io]

      Hi there! I just recorded this video. It's just me VS 800 zombies. I won't show you wheter I win or not. Just take a look and see a different way to survive. BTW, the game is already available on itch.io for free! Right now, we are discussing about new technologies to include in the gameplay (turrets and drones, maybe). Feel free to participate in the conversation in our Discord Server.
    44. Should objects be measured on the CPU, GPU or on the screen? You can't assume what size the units represent and it does matter when using your guidelines listed.
    45. Use a Fixed Time Step not Variable if the speed of the ball is causing missed collision. Don't use Update() for anything physics related, that is why you have FixedUpdate()
    46. hi all, just wondering if I could get your tips or insight on a specific gameplay and animation question I've had for a long time: For tennis games and other games involving hitting fast moving objects, what would be a good way to avoid mishits like in this video? (Far side 0:50s and 0:58s) (watch in .75 or .5 speed for even more clarity) This is quite a common visual bug for tennis games as I assume the devs didn't have time to polish, but I want to make sure I plan and code for my tennis game to avoid this kind of blemish. I'm assuming the fix would involve some kind of IK solution and maybe target matching to get the hitting animation to line up with the correct hit "pose". Any advice for a Unity beginner like me would be super appreciated 😃
    47. reedgangproductions

      Paddle Fall

      In this pong esque arcade game, you collect blue balls to get as many points as possible while weaving through red balls. Yellow balls and green balls will you do good, but be wary of the black balls!
    48. All8Up

      Creating a global thread

      Yup, late night goof. I didn't actually make the thread.. Edited the post with corrected code.
    49. Eternal

      Creating a global thread

      This should do it: std::thread t1; int main() { t1 = std::thread(functionToThread); t1.join(); return 0; }
    50. If your objects are less than around 10km in diameter and have details around 1mm in size. Then use floats for your vertex data. If your objects are larger then 10km in size, split them up into sub-objects and still use floats for your vertex data. If your objects are bigger than 10km, have details smaller than 1mm, and can't feasibly be split up... are you sure? Well, go ahead and use 32bit integers for your vertex data. If your objects are bigger than 1000km, have details smaller than 1mm, and can't feasibly be split up... you're shitting me? Well, go ahead and use doubles for your vertex data... But this is very odd. If your objects are far, far smaller than 1km, consider using 16bit fixed point for your vertex data. If your world is bigger than 10km, then go ahead and think about fixed point, hierarchical (with high precision intermediate results) or 64bit transforms on the CPU side, but there's still no need for doubles on the GPU. Once you've computed your model-to-view transforms in high precision, you can safely truncate them to 32bit precision before sending them to the GPU, as the final matrix will take relatively small model-space values as input and produce relatively small view-space outputs. Just never use raw global-origin world-space values on the GPU.
  • 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!