Jump to content
  • Advertisement

About This Group

Welcome to the For Beginners Group! Where you are new to game development looking for some help navigating the many choices and challenges of the field or if you are a seasoned pro looking to pass on some of your wisdom to the next generation - this is the place for you. Check out the For Beginners forum in the tab. We'll be adding more beginner resources to the group soon!

  1. What's new in this group
  2. I'm under the impression that I need to go out, experiment, and not be too restricted by ECS, so I'll start making my game now. Thanks to everyone for your advice!
  3. I've just started to try and learn how to use ECS (Entity component systems) in games, but I've found it a bit hard to understand. Right now I have two main questions: In an ECS, is it preferable to store a boolean value in a component to flag an entity, and keep that component permanently on that entity, or to add/remove a component to flag an entity? For example, if I want some way of flagging an entity when it dies so it can be removed, is it better to have an AliveComponent with a boolean dead to indicate if it's dead or a DeadComponent that gets added to indicate if an entity is dead. Should adding more types of components, or trying to make a component reusable through its fields be favored? For example, if I'm trying to give all entities a shape for collision detection, should I have a different component for every shape (RectangleComponent, CircleComponent, PolygonComponent), or should I have one ShapeComponent, and in there have a field which is of type Shape, with Shape having subclasses Rectangle, Circle, and Polygon. Also, I couldn't find many good resources on ECS concepts, so if anyone knows any good ones, it would be really helpful. Thanks!
  4. hello! i'm looking for a way to convert xls data to CSV then create a binary from it, where i'm going to read data for my game.. anyone have a good resource where i can learn something? i'm just using google but i'm still confused to how do it
  5. thankàs you for your reply! iàm looking to do it on Unity so C# i'll check out your pseudo code, thank's you!
  6. You can export to CSV from any spreadsheet program or Google Docs. The general routine to parse CSV files is as follows (pseudo-code): string = read_file(csv) // read file into a string lines = string.split('\0') // split by line endings foreach(line in lines) { columns = line.split(',') // split by comma or other separator foreach(column in columns) { // do something with the value here, likely cast it to some type // and/or write it out to another file for a binary format } } Depending on your language of choice this may be easy or less so, for example C++ is terrible at such tasks. Scripting languages such as Python and Ruby are your Swiss army knives here. Learn at least one.
  7. How you do it depends on your game, and has been unique to every game I've worked on. It also matters if you're reusing textures, or sharing them through systems like texture atlases. Sharing textures within a level, sharing within worlds, or being unique to each model, they naturally suggest organization structures by the level, by the world, or by the model.
  8. Hey devs, I am pretty new in the gamedev Topic, but i allready managed to create a bunch of models in Blender. The Models are pretty Low Poly and are using PBR Textures. That means i have a lot of .blend Files and for each of them there are 12+ TIF Files for the Texture, normalmaps, roughness, albedo and so on. Is there a good way to organize them? At the moment i am just drag and drop blend and TIF Files into the Unity Project without a real import/export function. Is this allready enough? Should the blendfile be in a directory with the texture, or can i just have one big texture directory and the Blendfile knows where to search them? I am pretty lost there atm. Thank your for reading 😃
  9. frob

    Portfolio Question

    Decide which job you are going for, the ones you listed are very different. If you're going for a programming job, a portfolio is less critical but can be nice. It should demonstrate that you know how to program and have an interest in games. It is best to have one or more completed games, even if the games are simple. Showcase your best work. If you're going for a level design job, it is best to have working games showing your level design, preferably with videos documenting why you made the choices that you did. Showcase your best work. Unreal and Unity are both great game engines, the experience you've got with Unreal is sufficient.
  10. Bethie

    Portfolio Question

    Hello Everyone, I'm currently in school for game design and was looking for some insight on creating my portfolio. When creating a portfolio is it best to have it focused on your area of interest (programming, design, level design, etc) or to showcase a lot of your different work? Also I'm looking for some advice on becoming more experienced with the different game engines. For school we've used Unreal Engine so that's where most of my experience is. Whats another good engine to practice with? I've been curious about Unity but not sure where to start with it. Does anyone have any tips or links to guides for some of the other engines? Thank you, Bethie
  11. You need to format your code. Indentation will help debugging your curly braces. I removed and added the curly brace to fix the indentation, and there were a few issues. Like the Game::init method seemed a bit weirdly structured. After fixing some of those formatting errors it worked fine for me. But I was only testing with one controller. Oh and this if(SDL_JoystickOpen(i) != 1) SDL_JoystickOpen returns a nullptr when it fails. So change the 1 to nullptr Also, can do this to avoid crashing when trying to use a pad current code int InputHandler::xvalue(int joy, int stick) { if(m_joystickValues.size() > 0) do this int InputHandler::xvalue(int joy, int stick) { if(m_joystickValues.size() > joy)
  12. gdb says I.m getting a segfault in InputHandler::update when I mive the joystick, is it that the if else and for loops in the function are not seperated correctly, where do I need to add or remove french braces? I'm a complete noob and I find nested if else and for loops really hard to debug so any help is greatly appreciated. Thanks InputHandler.cpp and all the other game engine files are included here https://drive.google.com/open?id=1o6nLpkkKs9aafBMv1Q3AXYEmX0a_YkAX
  13. I would recommend to delete the code, and write new code all by yourself instead. It's less fast than copying it from someone, but you will learn a lot about understanding problems and writing code, and you end up with code that you fully understand, and thus can debug. Doing that is a step in your development as a programmer. New programmers often have the idea that it is all about code. That is not the case, the real thing you're doing is to get an understanding of the problem that you have such that you can explain it to a baby in excruciating detail. That baby is very fast in doing computations and understands funny artificial languages only. The code is nothing. If you have the understanding, ie if you know how to explain it to a baby, you can literally reproduce that code in a few hours, or less depending on how fast you can type.
  14. Sorry if this is obvious, but is this your code, or is it from some other source? For me at least the code isn't displaying with consistent indentation, which makes it difficult to analyze. If the code is under your control, that might be worth taking a look at (maybe the code is like that to begin with, or maybe it's due to a mix of spaces and tabs, but in either case it should be fixable one way or another). It would also be helpful to identify the statement or statements that are causing the crash. I see some indexed array access, which could be an issue. Also, this may be tangential, but I'm a little skeptical of m_joystickValues storing Vector2d instances by pointer and allocating them dynamically (are they ever deleted?). That may or may not be related to the problem, but it's probably worth taking a look at regardless.
  15. This is not a Game Design question. Moving to a more appropriate forum.
  16. Net-Ninja

    rotate using sin and cos

    Just in case someone trips over this post in the future, some useful math when thinking about this kind of stuff. sin and cos give you a x or y offset on the unit circle, so if you use both then you have a 2D vector. vec2 dir = { cos(ang), sin(ang) }; Now if you want a vector that is orthogonal to this one you swap the X and Y round and put a negative on one of them. Which one will decide it it's rotated 90 degrees to the left or right. vec2 orth = { dir.y, -dir.x }; Once you have this you can use these you can use them to make a rectangle like so vec2 pos[4] = { {0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f} } vec2 rotated_pos[4] = {}; for(int i=0; i<4; ++i) { rotated_pos[i] = (pos[i].x * orth) + (pos[i].y * dir); } Think this is what you're doing but wanted to try and provide some clarity to the topic.
  17. I am attempting to get a small figure to rotate using sin and cos. here is a code snippet. void drawShip() { glPushMatrix(); glColor3f(1.0f, 0.0f, 0.0f); glTranslatef(50.0f, 0.0f, 0.0f); glBegin(GL_LINE_LOOP); glVertex3f(0.0f+(cos(shipAngle)), 0.0f+(sin(shipAngle)) , 0.0f); glVertex3f(-5.0f+(cos(shipAngle)), -5.0f+(sin(shipAngle)), 0.0f); glVertex3f(0.0f+(cos(shipAngle)), 10.0f+(sin(shipAngle)), 0.0f); glVertex3f(5.0f+(cos(shipAngle)), -5.0f+(sin(shipAngle)), 0.0f); glEnd(); glPopMatrix(); }
  18. If it's about the data structure then you could think of ESC like this. You have a GameObjStruct like so struct GameObj { float health, mana; vec3 pos, vel, acc; vec3 bb_min, bb_max; // etc }; It contains everything a game object could ever want. And you have them all in a giant std::vector<GameObj>. They reference each other by index into the array, and a generation count. Now imagine not everything has health, maybe there's some rocks in the GameObj array. You might benefit from moving that out. You can do this in one of two ways. Either the GameObj can have a pointer to a HealthComponent, or the HealthComponent list can know which GameObj it belongs to. If you do this with all data in the structure then you wind up with no GameObj struct at all, just a bunch of systems that use IDs to say which game object it belongs to. Each system can be responsible for maintaining the pool of a given component type. The physics system can manage all rigidbody components, that way you can just iterate over them when you do your physics step. The problem is when you need to find what other components a GameObj has. So you could have a vector of GameObj still, and do them like this struct GameObj { std::string name; // For debugging maybe? std::vector<Component*> components; } How you look up which entity a component belongs to there's many variations. It's up to you to choose whichever you think is best. My tip would be to think about what you're trying to solve and use that as a guide. Easy to read code is easy to debug, but if you're just messing around go wild and experiment. Think there's a chapter on this on Game Programming patterns, free to read online I think. It's a good book to read. This has been a bit stream of thought but hopefully there'll be some useful info here.
  19. There's dead and dead. Entities getting hurt and telling whether the entity has suffered lethal damage is unquestionably a job for a specific "health" component and damage system, as Danzabarr and BeerNutts suggested, but "killing" entities is not special: there are countless other ways for entities to "die", for example distant scenery that can be culled now and recreated as needed or finished animations, and actually disposing of unneeded entities should be addressed uniformly.by the framework. Entity lifetime bookkeeping can be addressed with a variety of technical means which might or might not involve a "to be recycled" flag inside entities (for example, a specialized data structure like a list of entities or a compact bitmap index might provide better performance).
  20. An idea I recently had was adding a DeathDecay component, because in most games there is a despawn of dead bodies after some time 😉 In general, you are free to use ECS as it just defines how the the systems gears work together, not if one of them is made from wood and the other one fro metal. We have used ECS even different in our gamedesign software and I'm using another implementation in our build tool. As long as you don't violate the atomicity principle (each component and each system in an ECS has it's very special task); for example you have a death-animation system that requires a death animation component to exist and despawns the NPC after playing the animation rather than control anything with the general animation system and let the NPC system control despawn, and didn't double data or implement components just to solve a task that also could be solved by a combination of existing components (component reuse and case composition); for example a colider component and a render component each have a position property, a very-special-usecase component that has properties also covered by more generic components but is used by a very-special-usecase-system exclusively, then anything should be fine and nobody will blame you
  21. Maybe you should just use the Health attribute (in whatever component that is stored in) to determine if something is dead. You may want to have a death animation that plays when it dies, and have it on the ground for a certain amount of time, and then you'd have some kind of timer associated with that component, which, once expires, triggers a removal event, which maybe fades the dead character away. Lots and lots of different ways to do this, don't pigeon hole yourself into on way. Experiment and see.
  22. srphfthnd

    Converting old mmorpg game into android game

    Thank you so much sir!
  23. Hello, I apologise in advanced I'm not really good in English. I'm just new here and I don't know how to start. I'm a fourth year IT student and want to make my favorite old game into mobile game. The game I want to create is base from mmorpg Ran Online which was shutdown 3 months ago. I deeply in love with this game and I want to make it into mobile but I have no idea where to start. I heard about how to reverse engineer the game and create it by using Unity software. I also try to read other forums regarding about making mmorpg in mobile but they just gave me a vague general answer. Please help me I want to know where I should start in this project. I really want this game in my pocket and to be back. I'm not that good but I have knowledge in Java and C++. Any help will be much appreciated.
  24. Shaarigan

    Converting old mmorpg game into android game

    The majority of such a game is the server, you have to rewrite the server software unless you buy a license from the old games guys. Reverse engneering the software is in nearly any case a violation of the EULA and so illegal. What you could do is to design your own game based on this. Try getting as much material from the old game as possible to reproduce their mechanics first, then try starting to create the game client and server software. Unity is a good idea here because you can prototype your game on PC and optimize it for Android in the final phase. However, writing an MMO is difficult for beginners, especially because there is no 10 steps plan to do it. Every MMO has it's own server model: How doesthe server verify player actions How is the server storing user data How is the map managed Does it has a property management (especially for in-game homes etc.) How is the store configured if there exists one Does it use instancing for the world/ dungeons Writing the game client is not much more difficult as in every other multiplayer game. There are plenty of tutorials out there regarding to network gameplay and programming. However, there is a payed asset on the Unity Asset Store I found a while ago that aims to provide a total care package for such people willing to build an MMO. I bookmarked it with the notice "If I would make an MMO one day using Unity, this will be may toolkit to go for" so I share their Youtube channel here for you to have a look at it https://www.youtube.com/watch?v=VLug3Ofmr5k
  25. Moving to the Beginners forum.
  26. Thank you for your great feedback. I will keep creating every asset in Blender and just import the .blend file and the normal/roughness/albedo maps into unity and there will be created the level. I like to have a bigger open world like level, so it feels more comfy to walk through.
  27.  
  • 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!