Recoils14 Posted February 11, 2015 Share Posted February 11, 2015 I recently purchased the Leadwerks engine during the winter steam sale to tinker with in my free time and it's been fun but now I have decided to build my own game but something out of the norm for myself. I want to design a Bullet Hell game. I'm wondering if anyone has done this yet and if so, can you point me in the direction of some resources to help me with journey? I'm relatively new to the programming and scripting side of things so anything that may help would be greatly appreciated. Also discussion on the subject of Bullet Hell within Leadwerks is highly encouraged. Thanks. Quote Link to comment Share on other sites More sharing options...
Josh Posted February 11, 2015 Share Posted February 11, 2015 I have no idea what that is but it sounds really awesome. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recoils14 Posted February 11, 2015 Author Share Posted February 11, 2015 Bullet Hell is a Shoot'em up style game, generally Top Down view in which players are forced to fight their way though hundreds or thousands of bullets on the screen. http://www.usgamer.net/articles/ten-great-bullet-hell-shooters Quote Link to comment Share on other sites More sharing options...
gamecreator Posted February 11, 2015 Share Posted February 11, 2015 That should be very doable. Are you coding in C or Lua? Also, will you be using 2D images or 3D models? Quote Link to comment Share on other sites More sharing options...
Recoils14 Posted February 11, 2015 Author Share Posted February 11, 2015 I am a 3D modeller so probably 3D, but I prefer the 2D look for these games. I'll use simple 3D objects during development and finish in 2D with an artist friend, but I haven't even started yet so that's neither here nor there at the moment. As for C or LUA I'm not sure. Like I said I'm new to the programming side and that's why I came here to ask. I'm not sure which will be better for me as I have to learn from the ground up. I understand that learning while trying to develop a game will be difficult and arduous, but I'm up to the task. Quote Link to comment Share on other sites More sharing options...
AnthonyPython Posted February 11, 2015 Share Posted February 11, 2015 @Recoils14 sounds awesome man, LUA is a good first start, you can do a whole lot with just LUA, as for C++ you can start there if you want to,But I enjoy using LUA just as much as C++, its all a preference I guess LUA does have its limits as C++ doesn't really (like LUA doesn't have steamwork achievements correct?) Quote OS: Windows 10 Pro CPU: i3-10100 CPU @ 3.60GHz GPU: NVIDIA 2060 Super - 8 GB RAM: 32 GB Link to comment Share on other sites More sharing options...
Recoils14 Posted February 11, 2015 Author Share Posted February 11, 2015 Is it possible to use both languages in conjunction? Quote Link to comment Share on other sites More sharing options...
gamecreator Posted February 11, 2015 Share Posted February 11, 2015 I haven't done it myself but there are threads on the forums claiming it's possible. Also, in addition to the Documentation at the top, don't forget to check out the unofficial wiki: http://leadwerks.wikidot.com/ Rick is kind enough to offer super cheap Lua tutoring. If you have a few extra bucks laying around and he can find time, I'd suggest taking him up on it. There are great YouTube video tutorials if you like watching videos. Two popular ones are here: https://www.youtube.com/user/Aggror89/videos https://www.youtube.com/channel/UCdNkNE5acxWUf2vCEo-eOcw/videos One word of caution: coding for 3D and for 2D are two different things. I'd suggest picking early on which you'd like to use. That said, getting prototypes going in both formats shouldn't be too hard (but give it some time as you learn). Hope that helps. Quote Link to comment Share on other sites More sharing options...
josk Posted February 11, 2015 Share Posted February 11, 2015 I think im to old for Bullet Hell type games, to much going off on screen. Look forward to seeing it though. You can just use Lua scripts for certain in game objects and do the rest in C++. Have dabbled a bit in C++ but like the simplicity of Lua. As a hobby coder Lua is great. Quote Elite Cobra Squad Link to comment Share on other sites More sharing options...
YouGroove Posted February 11, 2015 Share Posted February 11, 2015 LE3 is a 3D engine good at what it is : 3D , there are better suited for 2D games with tools for 2D , it's a strange choice. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted February 11, 2015 Share Posted February 11, 2015 If you do 3D, don't use full physics for those bullets. You could, and you might get away with it, but it's kind of overkill for a spherical object traveling in a straight path. Use picking instead, like I did in the weapon script for bullets. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted February 11, 2015 Share Posted February 11, 2015 Use picking instead, like I did in the weapon script for bullets. How would you do this with visual spherical bullets though? I mean the idea of these games is avoiding those bullets coming at you at a much slower speed than reality. It's really more about collision with the bullet itself. Picking is instant so not sure how you'd do that with this style of game. I wouldn't go the physics route either but maybe bounding box collision checks on bullets? Or does the Collision() callback get called if you move things with the Move() function? I can't recall. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted February 11, 2015 Share Posted February 11, 2015 You would use bounding boxes to start but not sure if checking thousands of bounding boxes every frame will slow things down. You may need to optimize eventually. Quote Link to comment Share on other sites More sharing options...
Rick Posted February 11, 2015 Share Posted February 11, 2015 I wouldn't think it would be thousands. Although some of those screens look crazy I bet there is at max a hundred or so bullets at a time and depending on how fast they move could get away with splitting cycles on checking them all. 1/2 the bullets this frame, 1/2 the bullets the next frame, rinse and repeat and I bet that would be good enough for performance. Put on top of that any player movement restrictions then perhaps can only limit bounding box collisions to a certain point on the screen (that could move). Say the player can only move on 1/2 of the screen and can't go into the enemies 1/2. No sense in checking those bullets that are on their way to the player 1/2 of the screen. Stuff like that would be good to do at first glance. Quote Link to comment Share on other sites More sharing options...
Josh Posted February 11, 2015 Share Posted February 11, 2015 You would just pick a short distance each frame, then move the bullet forward. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recoils14 Posted February 12, 2015 Author Share Posted February 12, 2015 Bounding box is the ideal way from my readings so far. Also thank you everyone for your advice! Quote Link to comment Share on other sites More sharing options...
gamecreator Posted February 12, 2015 Share Posted February 12, 2015 I got curious. I wrote a little code to bounce bullets around and turn them blue if they hit the ship. 1000 bullets = ~166fps 5000 bullets (attached image) = ~36fps GTX 970, 3.4GHz i7 3 Quote Link to comment Share on other sites More sharing options...
Rick Posted February 12, 2015 Share Posted February 12, 2015 How are you doing collision? Quote Link to comment Share on other sites More sharing options...
gamecreator Posted February 12, 2015 Share Posted February 12, 2015 Simple, hacky and unoptimized. From memory, here at work, something like: for(int i=0; i<NUMBEROFBULLETS; i++) { if(bullets[i].x>shipx-16 && bullets[i].x<shipx+128 && bullets[i].y>shipy-16 && bullets[i].y<shipy+128) context->SetColor(0,0,1); else context->SetColor(1,1,1); // draw bullet } Quote Link to comment Share on other sites More sharing options...
YouGroove Posted February 12, 2015 Share Posted February 12, 2015 You could even optimize more : if bullet.x < ship.x - (ship.width) SetColor (Red) if bullet.x > ship.x + (ship.width) SetColor (Red) if bullet.y < ship.y - (ship.width.y) SetColor (Red) if bullet.y > ship.y + (ship.width.y) SetColor (Red) Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Recoils14 Posted February 13, 2015 Author Share Posted February 13, 2015 Is this done in C++ or LUA? Quote Link to comment Share on other sites More sharing options...
gamecreator Posted February 13, 2015 Share Posted February 13, 2015 C++ but it could just as easily be done in Lua, I'm sure. I can post the full code if you like but it might not be the best example to learn from. 1 Quote Link to comment Share on other sites More sharing options...
nick.ace Posted February 13, 2015 Share Posted February 13, 2015 You could even optimize more : if bullet.x < ship.x - (ship.width) SetColor (Red) if bullet.x > ship.x + (ship.width) SetColor (Red) if bullet.y < ship.y - (ship.width.y) SetColor (Red) if bullet.y > ship.y + (ship.width.y) SetColor (Red) YouGroove, that code actually wouldn't be any more optimized and would likely be LESS optimized because there are more interpretation steps, at least in Lua (even in C++, you would be guaranteed to run 4 checks each time, whereas gamecreator's code would do at most 4 checks). You should be using elseif for the second, third, fourth, etc. if statements. That way, you don't have to run through all the conditionals for all of the entities. Quote Link to comment Share on other sites More sharing options...
Recoils14 Posted February 13, 2015 Author Share Posted February 13, 2015 C++ but it could just as easily be done in Lua, I'm sure. I can post the full code if you like but it might not be the best example to learn from. If you don't mind, please do Quote Link to comment Share on other sites More sharing options...
Rick Posted February 13, 2015 Share Posted February 13, 2015 I think YouGroove forgot the return statement after setting the color to red for each if statement. At that point you'd have exclusion statements so that best case scenario after the first if fails (which means it couldn't possibly be hitting the ship) you bail out so as to not do any other of the if statements. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.