Jump to content
  • GameDev.net Members! Click here to learn more about the new contest from IntelⓇ and GameDev.net. Ends December 21!

  • Advertisement
    1. Past hour
    2. Are you content with the fact that a D3D12 port would only be able to run on Windows 10?
    3. Today
    4. Rutin

      collision sprite

      Sadly I'm a sucker for wanting to help people even though I made a pretty good conclusion this will never go anywhere no matter what I type... Even my wife was telling me why I even bother and to not waste my time. Either way, that's on me for doing so. After looking through those links I'm lost for words. At least if someone else has a similar issue, maybe some of my posts might help them, who knows.... Going forward I wont be engaging.
    5. CrazyCdn

      collision sprite

      I would just like to nominate @JTippetts for post of the year. I know you're a moderator but it's still impressive. I'm curious, it seems like an elaborate troll. I knew he went way back and I always read his initial post because I find it hilarious that people still reply to him over and over again like @Rutin has, but didn't realize he went THAT far back. That is perseverance trolling to say the least. There has to be anti-trolling rules on the forums, if not time to consider them haha.
    6. That's true too! I mean the majority of my project can be done in but a few hours, Its just the little extra bits to add in for flavor that need some tweaking but I started again mainly because I ended up changing my mind and some ideas so I got the first version to work 'fully' and now I'm trying to do it again for my own sake I guess. I don't think I've hit any horrendous events situations just yet but I definitely am NOT looking forward to them
    7. Zemlaynin

      The Great Tribes

      Album for The Great Tribes
    8. You have to remember that Switch Statements and If Statements have their own pros and cons. I personally will mix and match depending on what I'm trying to accomplish. One can truly over think and even over engineer their games which is just a waste of time in my opinion. Unless what you're doing is going to cause a massive chain of horrendous events down the road, you can usually go back and optimize as needed, and you'll find that you get more done by solving the issue and moving on because it works. Don't get this mistaken for doing "band-aid" style coding. Your project isn't massive enough to worry about such things.
    9. Nick Griffith

      Sprites & backgrounds for 2d platformer

      Ok, I updated my question.
    10. Kaina

      Guess The Number

      Guess The Number Since I am still learning how to code in GM:S, I decided to start small and work my way up. So that's why I made the most easiest game ever, but, I do wanna take this game somewhere further. So I decided to make a game... within a game. Now obviously there's only the number guessing feature in this game so far but here's a list of things I wanna implement/change in the game somewhere in the future: A puzzle game if you fail to guess the correct number too much. Number of correct guesses you made. Main Menu. Add some background music. Add the ability to change the resolution. Some spooky events that I didn't think of yet, so that'll be fun. Change the way that the game tells you if you Failed or Won so instead of another text window to pop up, the text will appear in-game, so if you play on Fullscreen, the screen won't turn white. This is a bug more-less. And that's it for now. Do you have suggestions on what I should implement/change in the game? I'd love to hear them!
    11. JTippetts

      collision sprite

      phil's been putting this particular dead horse out there to get beaten for 14 years now, so apparently we don't grow tired of it. That poor horse just keeps getting beaten unrecognizable. For anyone who may be new to this guy's schtick, just go ahead and check his posting history. Then be aware that for some reason a lot of that posting history is no longer there. There've been a few forum migrations since the horse was first killed. I was unable to access anything from before 2012 (page 39 in his profile history) directly from his profile. Google can help ya, though! For instance, a quick search turns up hex grids from 2005, where he opens with his usual statement-as-a-question, expecting people to do the all the work, and follows it up with a blatant failure to listen. It's a pattern you might find eerily familiar. A bit of advice to people currently in this loop of madness, and to those who might be tempted to dive right in thinking that they just happen to have the magic that'll make phil listen and learn: It's a waste of time. If this comment of his from 2013 is to be believed, he has a BS in computer science, so if 4 years of university and a subsequent decade of posting on gd.net have failed to teach him anything, then I highly doubt anyone can. You would probably have better outcome by finding an ACTUAL dead horse to beat.
    12. That's true, I mean 'it works' was the overall goal for this project anyway but I'd like to learn 'best practices'. I'm thinking I can see areas where a switch statement would be much better/cleaner at least. (I recently 'restarted' the tower defense to 'clean it' so I have a full working version and that's like the online/live one, I'm currently redoing it all and seeing what I can remember/do better)
    13. Guy Fleegman

      Sprites & backgrounds for 2d platformer

      Hey, Nick. You should let people know what it is that you're wanting. Artists typically need inspiration to function and the details of what you're looking for will fuel that. Do you want a half-dinosaur, half robot character stomping around on an alien world? Is it pixel art, hi-res painterly or cell shaded vector your looking for? Food for thought, man.
    14. Yesterday
    15. Jason Goepel

      Template Factory Return Type Bug

      My application is experiencing a crash in a template object's factory, because the asITypeInfo pointer being passed to the factory does not have a valid subtype. I've tried to track down the cause of this bug, and I suspect that the reference counting of template function return types may be incorrect. When a module contains a template instantiation, function objects are added to the script engine. Building a second module with an identical script will reuse those function objects. After discarding the first module though, the return types of those function objects are no longer valid. Below I have constructed a simple example which crashes due to a null engine pointer in the return type of a factory function. class MyTmpl { public: MyTmpl(asITypeInfo *t) { refCount = 1; type = t; OutputDebugStringA(asGetActiveContext()->GetFunction(0)->GetDeclaration()); type->AddRef(); } ~MyTmpl() { if( type ) type->Release(); } void AddRef() { refCount++; } void Release() { if( --refCount == 0 ) delete this; } asITypeInfo *type; int refCount; }; MyTmpl *MyTmpl_factory(asITypeInfo *type) { return new MyTmpl(type); } asIScriptEngine *engine = asCreateScriptEngine(ANGELSCRIPT_VERSION); engine->RegisterObjectType("MyTmpl<class T>", 0, asOBJ_REF | asOBJ_TEMPLATE); engine->RegisterObjectBehaviour("MyTmpl<T>", asBEHAVE_FACTORY, "MyTmpl<T> @f(int&in)", asFUNCTIONPR(MyTmpl_factory, (asITypeInfo*), MyTmpl*), asCALL_CDECL); engine->RegisterObjectBehaviour("MyTmpl<T>", asBEHAVE_ADDREF, "void f()", asMETHOD(MyTmpl, AddRef), asCALL_THISCALL); engine->RegisterObjectBehaviour("MyTmpl<T>", asBEHAVE_RELEASE, "void f()", asMETHOD(MyTmpl, Release), asCALL_THISCALL); asIScriptModule *mod1 = engine->GetModule("m1", asGM_ALWAYS_CREATE); asIScriptModule *mod2 = engine->GetModule("m2", asGM_ALWAYS_CREATE); const char* script_text = "void main() { MyTmpl<int> s; }"; mod1->AddScriptSection("test1", script_text); mod1->Build(); mod2->AddScriptSection("test2", script_text); mod2->Build(); mod1->Discard(); asIScriptContext *ctx = engine->CreateContext(); asIScriptFunction *func = mod2->GetFunctionByDecl("void main()"); ctx->Prepare(func); ctx->Execute(); ctx->Release(); engine->Release();
    16. phil67rpg

      collision sprite

      I put in freeglut in vs 2017
    17. As long as it works and your method isn't hindering performance or your ability to manage the code then you're good to go!
    18. Just an fyi... I failed figuring out the Switch stuff but I think I actually understand it now I got it working my old IF IF IF way so will use to clean up BUT... it's working!!! Nothing Clicked (Watch the blue box) One tower is selected.. (Blue Box Will Display Upgrade Info) Can really screenshot clicks but trust me I'm clicking the blue area and its staying selected.. Clicking another tower it switches to that one, and clicking off... It clicks off So it works! Woo
    19. Nick Griffith

      Sprites & backgrounds for 2d platformer

      I've got placeholder assets, I just have some specific stuff I need done.
    20. Hi guys, I've got a little problem which is irritating me as there must be a simple solution but Google isn't necessarily being my friend right now. In my new game, I've got a set of projectiles for which I need to check for collisions with typically rectangular shapes (but which aren't axis aligned). My general approach is to create an axis aligned bounding box for both the projectile's movement and the target object. If there's a match on the broad phase, then I want to check whether the projectile collides with any of the edges of the collision and then report the first collision (i.e. if the projectile would have gone through multiple lines then I want to know the first collision so I can display the explosion animation in the right place). I represent my shapes as a series of line segments (there's a future question about colliding with semi-circles and circles, but that's later). Can anyone 'refresh my memory' on being able to test for the interaction of line segments? Thanks Steve
    21. Here are my thoughts, I consider myself to still be a noob (5 year hobbyist) KISS, keep it simple and in modules, ie start with openGL stuff then move on to inputs, audio etc, then iterate. Look for simple engine examples, I like this one: https://github.com/Marzac/le3d/tree/master/engine Focus on design (data structures and functions) of the underlying tech and simple abstractions, ie mesh'es to openGL and wav files to audio system etc. But don't get hooked on OOP/ECS design, messaging or other non core systems at the start, these are actually far more complex then a simple engine exercise is, so KISS! Re: Game Engine Architecture, I think it's too academic to be of any benefit to a noob, instead I recommend http://www.mcshaffry.com/GameCode/ It's not perfect, but a lot more practical! Re big engine source code, it's great that it's open, but too complex to understand it all, especially as a beginner. Even Doom source code today is hard to understand, and that's magnitudes smaller. I don't see why the need for a disclaimer "academic purposes", if you make it, why not use it? commercially or free.. as long as it's not buggy and deemed finished, I don't see why it has to be purely academic.
    22. So there's honestly a lot to unpack here. It's awesome that you're enthusiastic about it at 18, absolutely hold on to that motivation. However, it's still best to take it a step at a time. Design is mostly written and each game needs its structure to be clear, even if its a solo project. This article might help, but it is a bit dense. Good things you've done so far: Reference other games: "i was playing lately alot of FPS (Quake champion , Law Breaker and bunch of other cool game)" Collaborate with others: "I was talkinh with my friend" Propose basic gameplay objective(s): "1- Capture the flag and bring it back to your's. If you managed to do so , the game instantly stop and you win. 2- Kill all the enemy team." Things you need to do now: Simplify the design Your first game should be very basic. Formally research other games inside the genre you're interested in (FPS) Write down the defining characteristics of each game and compare/contrast Improve technical writing skills Communication is everything for design, it's gotta be crystal clear Make a game design document Then make a project thread on gamedev.net so we can all see your progress!
    23. Looking forward to this update!!
    24. khawk

      Frogger - challenging entry

      Have you been using a different tech stack / engine for each challenge?
    25. Today, Allegorithmic announces Substance Painter’s third update of 2018, including a complete overhaul of the engine that has helped make the texturing tool an industry leader. From large-scale VFX scenes to high-quality mobile projects, the Substance Painter Fall Update improves performance across the board while simultaneously lowering the hardware requirements for all users. In order to handle large amounts of data without a drop in performance - an increasingly common requirement for VFX professionals and anyone working with massive scenes - the Substance Painter engine has been rewritten to incorporate Sparse Virtual Textures (SVT), a method of simulating large textures using less texture memory. The new memory and management system will allow for up to 300 tiles running at once, moving Substance Painter one step closer to its inevitable goal of unlimited UV tiles support. And while the new engine can easily handle massive scenes, projects of all sizes will benefit from an immediate increase in speed and ease of use. The Fall Update also brings with it new tools for mobile users, including a 2D viewport exporter designed to increase the possibilities for mobile games. High-quality PBR shaders can now be baked into a single high-resolution texture, before final exportation into an artist’s game engine of choice. Using dithering, artists will also be able to remove artifact or banding issues in their 8-bit exports, ensuring solid normal maps up and down the creation process. “Our goal isn’t just to have the best features, it’s to make sure our users have the best experience – even if that means completely rewriting an engine that has served us well for years,” said Allegorithmic founder and CEO Sebastien Deguy. “Hardware should never be a limiting factor, so Substance Painter helps them do more with less.” The Substance Painter Fall Update also introduces a host of user-requested additions, beginning with an updated Baked Lighting filter, capable of presenting environment maps that are near-perfect copies of a PBR shader. Environmental maps can now be rotated horizontally and vertically, and artists no longer have to manually account for painted details on the normal and height channels. New anisotropic patterns have also been added to help create anisotropic patterns. Additional feature sets include: Viewport Improvements Mipmapping – Textures now use mip-maps to avoid flickering on noisy surfaces. New Anisotropic Shader – New anisotropic highlights can help create realistic hair, satin, brushed metal, and glossy reflections using native Iray support. New Temporal Anti-Aliasing – New anti-aliasing methods ensure smooth edges at all times; automatic smoothing of dithering effects caused by sub-surface scattering or transparency shaders. Updated Clearcoat Shader – Adds control over coating thickness and roughness; Iray parity with new MDL shader automatically applied when selected. Symmetry and Layer Stack Improvements Deactivating Multiple Layers – Multiple layers can be clicked and dragged vertically through a stack; blending modes can be scrolled through by hand or mouse. Enhanced Symmetry Tool – Introduces ability to move the axis freely using a 3D Gizmo or within the Symmetry panel; Symmetry plane now displays as an intersection. Layer Stack UI and UX – New color swatch system allows for easy assignment and differentiation of folders and layers Black Friday/Cyber Monday Deal Allegorithmic will also be participating in Black Friday and Cyber Monday, with a sale aimed at new users. Beginning on Friday, November 23, first-time Substance users will receive a 33-percent discount on annual subscriptions, which includes Substance Painter, Substance Designer, the Substance Source material library and the upcoming AI-powered Substance Alchemist. The discount will last until November 26, making it an ideal gift for friends and family interested in digital design. Pricing/Availability The new update to Substance Painter is available today. Following the 30-day trial period, individual users will be able to subscribe to the Substance Indie or Pro plans. Substance Painter is also available for individual-license purchase, which includes 12 months of maintenance. Excluding the Black Friday deal, Subscriptions to Substance Indie cost $19.90/month; Pro plans cost $99.90/month. Enterprise and education pricing is available upon request. Students and teachers can request a license at no cost. View full story
    26. Today, Allegorithmic announces Substance Painter’s third update of 2018, including a complete overhaul of the engine that has helped make the texturing tool an industry leader. From large-scale VFX scenes to high-quality mobile projects, the Substance Painter Fall Update improves performance across the board while simultaneously lowering the hardware requirements for all users. In order to handle large amounts of data without a drop in performance - an increasingly common requirement for VFX professionals and anyone working with massive scenes - the Substance Painter engine has been rewritten to incorporate Sparse Virtual Textures (SVT), a method of simulating large textures using less texture memory. The new memory and management system will allow for up to 300 tiles running at once, moving Substance Painter one step closer to its inevitable goal of unlimited UV tiles support. And while the new engine can easily handle massive scenes, projects of all sizes will benefit from an immediate increase in speed and ease of use. The Fall Update also brings with it new tools for mobile users, including a 2D viewport exporter designed to increase the possibilities for mobile games. High-quality PBR shaders can now be baked into a single high-resolution texture, before final exportation into an artist’s game engine of choice. Using dithering, artists will also be able to remove artifact or banding issues in their 8-bit exports, ensuring solid normal maps up and down the creation process. “Our goal isn’t just to have the best features, it’s to make sure our users have the best experience – even if that means completely rewriting an engine that has served us well for years,” said Allegorithmic founder and CEO Sebastien Deguy. “Hardware should never be a limiting factor, so Substance Painter helps them do more with less.” The Substance Painter Fall Update also introduces a host of user-requested additions, beginning with an updated Baked Lighting filter, capable of presenting environment maps that are near-perfect copies of a PBR shader. Environmental maps can now be rotated horizontally and vertically, and artists no longer have to manually account for painted details on the normal and height channels. New anisotropic patterns have also been added to help create anisotropic patterns. Additional feature sets include: Viewport Improvements Mipmapping – Textures now use mip-maps to avoid flickering on noisy surfaces. New Anisotropic Shader – New anisotropic highlights can help create realistic hair, satin, brushed metal, and glossy reflections using native Iray support. New Temporal Anti-Aliasing – New anti-aliasing methods ensure smooth edges at all times; automatic smoothing of dithering effects caused by sub-surface scattering or transparency shaders. Updated Clearcoat Shader – Adds control over coating thickness and roughness; Iray parity with new MDL shader automatically applied when selected. Symmetry and Layer Stack Improvements Deactivating Multiple Layers – Multiple layers can be clicked and dragged vertically through a stack; blending modes can be scrolled through by hand or mouse. Enhanced Symmetry Tool – Introduces ability to move the axis freely using a 3D Gizmo or within the Symmetry panel; Symmetry plane now displays as an intersection. Layer Stack UI and UX – New color swatch system allows for easy assignment and differentiation of folders and layers Black Friday/Cyber Monday Deal Allegorithmic will also be participating in Black Friday and Cyber Monday, with a sale aimed at new users. Beginning on Friday, November 23, first-time Substance users will receive a 33-percent discount on annual subscriptions, which includes Substance Painter, Substance Designer, the Substance Source material library and the upcoming AI-powered Substance Alchemist. The discount will last until November 26, making it an ideal gift for friends and family interested in digital design. Pricing/Availability The new update to Substance Painter is available today. Following the 30-day trial period, individual users will be able to subscribe to the Substance Indie or Pro plans. Substance Painter is also available for individual-license purchase, which includes 12 months of maintenance. Excluding the Black Friday deal, Subscriptions to Substance Indie cost $19.90/month; Pro plans cost $99.90/month. Enterprise and education pricing is available upon request. Students and teachers can request a license at no cost.
    27. Hi there, we are still searching for a developer who like to join us and finalize this game with us. No dev here, who is interested to know more ybout our game and have a little bit time to raise his reference list? 😉 Best regards, Cologny
    28. Thank you both! @Septopus @Rutin I feel smarter!
    29. Znippy

      Sprites & backgrounds for 2d platformer

      If you are using Unity (your post is tagged with Unity) and this project is only for the learning experience I would recommend checking out the Unity Asset Store. You should be able to find a lot of great stuff that is free to use. This should also be a lot faster than finding someone who wants to create art assets.
    30. I'm making a 2d platformer game as a learning experience, and I need a character and some backgrounds. The idea is a person on the brink of death "running" through his memories. The background is his memories. This game will make minimal revenue, because it'll be a free mobile game. I'll give you more details if you respond. Thanks.
    31. Balancing gameplay is super hard. I think it is always impossible to make it ideal for every type of gamer. I think the most important thing is to be happy with the gameplay yourself. I think I have worded this badly. I got a subscription and did not buy a license. Kinda sad that you can't actually buy Photoshop anymore since I am usually not a big fan of subscriptions. I tried Krita before and never really got used to it. Not really sure why since I heard from a lot of different people that it is actually a pretty good Photoshop replacement.
    32. CrazyCdn

      collision sprite

      You've been told over and over to stop using GLUT. It was last updated in 1998, 20 years ago. Even FreeGLUT has not been updated in almost 4 years. Even though these forums are quite friendly we all eventually grow tired of beating a dead horse. You often just post code saying you're having a problem. Not what that problem is, what you've tried, what your thoughts the problem might be, etc. Then as @Rutin pointed out, when given advise like he has multiple times in this thread, you just flat out ignore it like you have with his. He actually has given you very sound advise too. If you're unsure what he meant with something, ask specific questions. Also some of your comments seem fairly pointless. You have a comment in one function for collision that says, "//draw bullet" but it's collision detection code, it should not nor does it look like it draws a bullet. It's also just calculating the position of the bullet anyways, so it's a completely useless and misleading comment which might throw you off later down the line.
    33. I feel like I am better understanding this now.. if mouse_check_button_released(mb_left) && position_meeting(mouse_x, mouse_y, id) 'id' is a built in part of Game maker which returns the instance variable... So I'm thinking If I but the code for the switch statement in the towers and use this ^^ and my condition for triggering it in the first place, it will know its own id, then I can devise a method for displaying the information that belongs to this 'id' for this 'switch' perhaps? I'm like an hour away from being to properly test it all now Guna be a fun night 😎😅 I think i'd previously misunderstood the mouse collision as if to say that I'd be checking for any collisions at all but instead yeah I'd looking for collisions with labels!
    34. Tom Sloper

      GIMP vs Adobe

      necro. locking thread.
    35. Yes, i have the same result on AMD, black texture for GL_RGBA_INTEGER/GL_RGBA8UI and uint4 vali = { 255, 0, 0, 255 }; write_imageui(outputImage, coords, vali); Also, I have some AMD forum posts about OpenCL/Vulkan. You should ask about it on AMD even if you have an invalid result on nVidia/Intel.
    36. kseh

      Frogger Challenge - Update #4

      A bit late with this week's update. Last week was spent looking at trying to do some kind of scoring and also working on some changes to the way I have scrolling. For scoring, I went with using a data field in the tiles to set how many points you get for landing on any given tile. Currently, road tiles are 25 points, tiles close to water are 1 point, and everything else is 0. This week, I think I need to work out some kind of high-score thing as well as level progression, lives, and a game over screen. Maybe some kind of improvement to the main menu I have. A few more levels would be a good idea too. I did want to add in another enemy and maybe some logs but I'm a bit concerned about time at this point. I've had complaints in other projects about the way I had scrolling so I've been spending time looking at that. I had it such that you had to approach closer to the edge of the screen before you could see what's on ahead. Which may be fine for the project that it originated in but is rather annoying in anything with an arcade kind of feel to it. I've got a much nicer smoother scroll now. While looking at this improvement, I found that the code doesn't quite do what I was expecting in general so this is an area that I'll be needing to revisit at some point in other projects. It's good to see the submissions that are coming in from everybody so far. I know there's still quite a few days left but I have to admit I'm starting to wonder if I'm further behind than I realize.
    37. Hi Andrey. Thank you a lot for your help! Have you tried on amd?
    38. You never bunch up ALL bounding box checks into the same check. You should only cycle through what is relevant for that piece of logic. If you have tower bullets shooting objects, they wouldn't be checking against UI buttons for collision, the same applies to checking if the mouse is within the bounds of the UI buttons, you're not putting in objects unrelated into those checks.
    39. Hi @_Flame_, I have no any ideas, try to ask on AMD forum, I think moderator dipak, can help you.
    40. sevenfold1

      SetPixelFormat fails on Nvidia cards

      It's a bad idea to set cStencilBits if you don't need it. Set pfd to the minimum values you need. ChoosePixelFormat() will return the best values, only if they're available. Setting them to the max values doesn't leave much room for choice. So, if you set cColorBits(24), and cDepthBits(16), you will get cColorBits(32) and cDepthBits(24) back if your device supports it.
    41. Now you're starting to feel the Object Oriented Programming vibe. Make it about what object(however you identify it is fine) was clicked and not where you clicked. You may want to begin giving your towers a # or something attached to the name, so you can tell WHICH menus need to be on/off as well. If you wont be using the x,y coords to differentiate them anymore. Though, you could use those as the "identifier" as well, since no two towers could be in the same spot. Lots of options.
    42. Yeah, they are pretty fast. Usually, it is best to wait until the biker is gone and then find a gap between the cars. Use the empty lines in order to wait for a good opportunity to get on a swimming piece of wood before you get hit by a spear. I still think that once you get used to the timings it gets a lot easier. Since a lot of people are saying that the game is too hard I will try to balance the gameplay a bit more at the end of the week and upload a new version. Sadly can't do that until Friday.
    43. Just checking to make sure I know what you mean.. An example is my bullets are in just one object, they've got a value called sprite which equals "gun" by default, when creating a bullet -- depending on which tower type it is, I'm telling it to set sprite = "gun" "flame" or "missile" and then upon whichever this is, it'll set its sprite accordingly so instead of having a bullet, a fireball and a rocket object kind of thing.. but this requires me to label them myself... I could do something like this and label things like name = "tower" name = "enemy" etc and then if collisionObject.name = "tower" would be towers and then it triggers stuff? I think it'll definitely simplify this situation right now because I can then just check if mouse is clicking tower 'or' clicking upgrade object, instead of set coordinates kinda thing... So I'll do invisible upgrade objects Or maybe I can give these their own sprite.... hmmmm Then I could have different sprites based on the state of upgrade so they'll each display different information if you've upgrade once twice three times etc and i'd set the image_index based on that... Dang... Should have just gone with this originally.. For some reason I was genuinely going to have it draw a bunch of different sprites and information together... 'simplify' is an understatement,,
    44. lawnjelly

      Frogger GameDev Challenge Entry

      Works great for me, but darn is it difficult!! I've been trying for 5 mins and haven't managed to cross the 2nd road yet lol. It made me wonder are the cars really meant to go that fast!! Congrats on putting in the options screen too I haven't done that yet. I think a difficulty slider would be good to control the speed of the traffic for players with slow reactions (like myself lol!).
    45. I wouldn't worry about that too much, that's where the case default -> do nothing, or the no matching object in the switch comes in. It can fire the click handler for every bounding box, but it doesn't have to execute code if the bounding box isn't one you are checking against. Can your code return an ID# or a Name, or something unique for the bounding box it hit? If so, just switch based on that. Generally speaking extra objects are only bad where they cause extra processing, or extra confusion/complexity. If they are going to simplify your code/life/everything, then USE MORE OF THEM (that's my philosophy anyhow) Also, if you are switching based on object identifier instead of X,Y position, it frees you to make your object positions more dynamic/not be something you have to keep track of after you handle placement, if you wanted.
    46. I'm wondering now, Would it be worth giving things a value like clickable = 0 and clickable = 1... And then test if clickable = 1 .... I say this because my enemies and bullets will have bounding boxes but shouldn't be clickable.. I was going to 'draw' my entire menu as a sprite and then using a bunch of different X Y cords dictate certain things like highlighting towers, clicking towers depends on X Y of mouse, Displaying the price info only shows if mouse is within a certain area (happens per each 'tower' << Not the actual object tower just a drawn sprite in a certain place).. So i've used X Y quite a bit for the 'important' stuff... I figured this would be better than a bunch of extra objects 😧 Technically only my towers would want to be the 'clickable' things as my upgrade section is just drawn there as a sprite not an object so perhaps I could check if Mouse is clicking/colliding with Towers One Two or Three... I feel like I'm getting this wrong again... Maybe I should do something like !position_meeting(x, y, self); to check if its not clicking itself && !position_meeting(x, y, objUpgrade); and then make a blank object to just place over menu as part of the case 1 & 2 ? So this would be if mouse click not on self and not on upgrade -- deactivate, disable, clicked=false, etc etc and then go back to the use of clicked = true to trigger drawing (I just remembered that if I do this in my 'step' event, I cannot draw anything anyway so I can't draw via the case's as Game Maker demands you use a 'draw' event so I could just use the cases to trigger clicked = true and false, then in draw, if its true I can draw for days, if its false stop drawing, everything else goes like normal... I suppose position_meeting(x, y, self); could be my trigger for the switch entirely IF placed inside the left button pressed event so its like another IF before the big IF I just gotta test it out and mess around, I think I have a better understanding now! The 'switch' stuff is definitely where I need to be.....
    47. Obligatory disclaimer - Yes this is for academic purposes, not for making actual games. I've been employed as a Software Engineer for 2 years but still feel like a beginner when it comes to writing a game engine (and much of coding in general). What little experience I have with writing 3D software from scratch is from super rough university projects (which we called "engine" but that's definitely debatable). Meanwhile, my current job doesn't really take me down this line of learning. This thread is to ask for advice; mainly pointers to good guides, or comments on what structural approaches are considered to be good ones. I'm looking for something that teaches me about how to structure a game engine so that: it's good for learning about writing an engine it's not completely devoid of modern techniques it will be usable for later feature learning; networking, AI, unit testing, etc. (I imagine this criterion is typically a given anyway.) Some things I'm aware of so far (you may want to comment on any of these): https://www.gamasutra.com/blogs/MichaelKissner/20151027/257369/Writing_a_Game_Engine_from_Scratch__Part_1_Messaging.php I also have the book Kissner recommends: Game Engine Architecture by Jason Gregory. From what little I've read of it, it appears more advice than structural guide. ECS was a buzzword back when I was at uni, but the more I google it the more it appears to have become a dirty word. Unreal Engine's source Regarding ECS: For all the flak it appears to generate nowadays, it is at least a structure. If ECS isn't recommended I'm interested in what other general structural approaches there are. Regarding Unreal: I'd love to jump in and learn how Unreal Engine's structure works, but it might be biting off more than I can chew. Language of choice is C++. Thanks
    48. Hello everyone! Now that my submission for this GameDev challenge is complete I want to take the time to write a small Post Mortem for this project. I have never written a Post Mortem before so I don't know if there is a specific format to follow. What went right First of all, I am really happy that I have actually completed my first challenge. As I have said in earlier posts I have never joined a GameDev challenge or other jams before. Since I have completed the project quite sometime before the deadline I am really happy with myself for most of the stuff. Completing the challenge and actually have a submission before the deadline was the most important point for me. Since I am also very new to this community I want to say that I am really enjoying my time here and I am very glad that I actually signed up on this site. Tools and Workflow During the challenge, I realized how comfortable I was with the selection of my tools. I really love Unity and I am pretty sure that I will not switch the engine for the next couple of projects. The more I work with Unity the easier it gets to put things together. Selecting Bosca Ceoil and Bfxr for creating the music and sound effects turned out really good for me again. I highly can recommend both tools to everyone who has no experience in creating music but wants to create retro-styled music and sound effects for his game. Even though my tools for creating art assets were pretty limited I am still happy that I managed to create everything on my own. Yes, the game does not look very good but hey I made it myself. Playtesting I am really happy that a good friend of mine offered help for playtesting. This made me realize how important playtesting is even in the early stages of a project. Because of this, I was able to solve a couple of problems that I did not realize from my perspective. Positive feedback also helps a lot with motivation problems. Usually, this was a big factor in past projects. I usually always lost my motivation at some point. I think for future projects I will try to involve more people into playtesting in order to get more feedback and keeping me motivated. Clean Code Even though I first rushed a lot of things I actually tried to keep my code pretty clean. This really helped me a lot in later stages of the project. For the slow down item, I actually had to redo some stuff in all moving object classes. Since I kept everything in a good order these changes were a lot easier than I thought. This really taught me to keep my code clean even in smaller projects. Writing about my progress I really had a lot of fun writing those little "reports" every week. I think I will try this practice for future projects a little bit more. It really helps to reflect on the progress and also to get valuable feedback from other people. Even though my writing is still pretty bad I hope I can improve on this with time. What went wrong Even though most things during this challenge went pretty smooth, there were still some things that I want to try a different approach in my next project. Moving the Unity project Since I am currently away from home during the week due to work I had to switch systems a lot. Moving projects and reimporting them to Unity twice a week really lost me a lot of time and nerves. For the future, I really need to find a better solution to this. Sadly I have not managed to set up a git repository with Unity. This would make a lot of things a lot faster and easier. Balancing gameplay One with I kinda don't like about Unity is how you control public variables on game objects. For example, every enemy type had a public variable movSpeed that, obviously, controlled the movement speed of the enemy. In order to balance gameplay, you have to switch a lot in the inspector in order to change these settings. Of course, I could easily make those variables private which would only move the problem into Visual Studio. I think for my next project I want to try to place all gameplay relevant variables into one file or a few separated subfiles. This would allow balancing gameplay at one place. I guess this would be a really bad idea if the project gets bigger, but for small projects, this could work a lot better. What's next I am not really sure what I want to focus on now that this project is completed. Currently, I have a couple of ideas for my next project. I will talk about this about this in a different blog that I have planned for the next days. One thing I am certain of is that I really want to improve some other skills than coding. I need to get better in creating art assets. Since I want to stick to my plan of creating all assets for my games on my own, I really need to improve on creating them. I have finally bought Photoshop and currently working through a lot of tutorials. Here is a little preview of a small thing I yesterday: I called this little guy Myps and he might become the main character for my next project idea. I know it is nothing special but compared to my Frogger assets I think this already a good improvement for only one day of practice. I have already tried a few things with animations which I might show in my next blog. I guess that is all I wanted to talk about, sorry if I didn't go too much into details. Thanks for reading! Until next time. - Znippy
    49. Yep, a switch would be a good approach for this problem. Nice @Septopus I'm not sure if you're using actual raw X Y cords for mouse checks instead of a dynamic bounding box setup, but what I've done in the past is set up bounding boxes for everything and if the mouse is clicked but no collision is detected everything toggles off. Since you're checking if the mouse is within an x, y location, I would suggest going ahead is setting up bounding boxes for anything clickable then you can cycle through these options in logic to see if the mouse is actually over an object when clicking or in an empty space.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!