Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

159 Neutral

About isbinil

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. hello let's say i have a table with columns, each are subdivided into 4 subcolumns. i can get which subcolumn (the 1st, the 2nd, the 3rd...) is hovered by the mouse by doing : int subcol = ((int)mouse.x / SUBCOL_WIDTH * SUBCOL_WIDTH ) % 4 however, if i have, let's say, the 4th column bigger than the 3 others. How do i modify this line of code to handle that ? Of course i could do it with conditions, four IFs checking the mouse position. But i'm looking for an elegant solution. Any ideas ?
  2. Hello I'm making a platformer in C with SDL. I really like C, but nowadays any non-AAA game should be playable in a browser, exe are annoying to download and the user usually have to deal with Window's SmartSreen and other software blocking the program execution. While i like the power of HTML5 (already far more powerful than SDL for the graphical part...) i'm not sure about the future. Will i have to re-develop my game a few years after the release because the browsers will have changed too much ? I wonder about perenity. Even more if i use a framework like Phaser... I don't like working hard then losing everything because the current hyped technology has changed. I think i have two 'reasonable' choices : - keep C and release the game as standalone (.exe) and web through emscripten - go for HTML5 and release the game for the browser and standalone .exe with [forgot the name] some packaging tool Which choice is better to you ? Does emscripten works well enough to provide an enjoyable experience ?
  3. isbinil

    Which engine to pick?

    Make your own.
  4. isbinil

    2D Advice on color and general feeling

    It still looks like programmer graphics, hiring an artist Will bring another level of quality if you plan to make a commercial game. Currently the colors and shapes arent very appealing to the eye.
  5. Many thanks to all of you, for some reason i though every app on linux had to come with source code to be compiled (to have a working binary for every distribution (Debian, Ubuntu...))
  6. isbinil

    Code quality at work

      I think it's a very good practice ! It may feel a by annoying to have every single line verified by someone else (less "its my code i am proud of it" feeling) but it can only leads to better code in overall...
  7. Don't you feel when you're working on your games, that you make high quality code compared to the shit you see everyday at work ?   I'm a PHP developer and literally EVERY project I worked on had suber-shitty code, with retarded useless/duplicated/unreadable parts. I feel so bad for the developers who made that. I know sometimes the deadlines are shorts and you must rush it. But it feels really tiring to see the same shit after working in 5 different companies.   Don't you think it happens because of employers thinking developement can be done by any beginner ? Developer is often associated with "code monkey" (at least in France) and employers doesn't seems to understand that there are huge quality differences between the complete noob who made his personal website and professionnals with 5+ years of experience...
  8. Hello   I wanted to know, if i have a game i want to make available on Linux, do i have to make it open source ? Or can i create some sort of linux executable ?
  9. isbinil

    Language decision crisis

    Love your mallocs and they'll Love you
  10. isbinil

    Language decision crisis

    Don't tell me it's too hard to do free() if you EXPLICITLY make your function return prematurely... It's not even hard to think about, your productivity won't suffer that much.   Talking about shittiness, I'm really more worried about people making overall shitty code than people doing low level stuff if they know what they're doing. I'm a web developer, my main prog language is PHP and you won't believe the level of code retardness i have to handle on most of the projects i work on, even if they were using super-magic-all-automatic frameworks !!! Such a waste of time trying to understand and rewrite code...
  11. isbinil

    Language decision crisis

        Good point... if only there was some way to access C libraries from C++!         I know, right?! I mean, it's like a gun... they only have one button... no way that could cause trouble if you don't know what you're doing!   :rolleyes:     people get told C memory alloc is evil so they think it is. It's not harder than the concept of constructor/destructor. Wanna create something ? => malloc/calloc Delete it ? => free Check if pointer isn't null before using it when you're unsure about its state and you're fine... I've never had much problems with it. Sure it crashes if you're doing stupid things, but you can't be a good programmer if you don't know what you're doing, the problem is just reported elsewhere if you don't have to handle memory management ...
  12. isbinil

    Language decision crisis

    Go for C. Clean, fast, simple to learn, powerful and straight-forward... plus you have access the widest range of libraries.   C++ gives me headaches, while i love C.   Don't listen people saying "ommg in C you have to do yourself your memory management", really it's only 2 functions (malloc & free), nothing to worry about...
  13. They will be always some limitations, you just can't have several millions entities interacting with each other at the same time, usually what applications do is disabling the entities that doesn't impact too much the final result (are they far away the player, do they move slowly... ?) or pureling don't create them until they are needed. We have too few information about what you're willing to do to estimate anything.
  14. I decided to use this way of storing the objects after analyzing the disassembly of Sonic on Genesis, which is quite an achievement for its era. All objects take 64 bytes in ram, they have common attributes and a free area that every object can use to store its specific data.   I'm doing a similar thing : most of the attributes in Object struct are somewhat generic (mostly graphical related) and could be needed by everything : alive, type, subtype, x/y speed, angle, animationId, framecount, currentframe... + those additional "free usage" values to be used the way the object wants. The player releated variables are handled outside the object struct since it's very specific.   If i use separate arrays for every object type, i may end with heavily duplicated code. Should i really have 40 structs if i have 40 objects types, each having 80% of common attributes?
  15. Thanks, i'll use union to save memory   For the variable names, should i declare them all in the unions (so I have to decide here which can overlap, all the variables names for all objects will be declared into unions... ) like this: union{ int playerLifes; int platformSpeed; float something; float otherthing; }; union{ int levelId; float gravity; }; union{  ... , or should i keep the union generic like : union { int i; float f; } data[10]; // each object can have a maximum of 10 variables of mixed types and go with the pointers to get more readable names?   I guess the whole purpose of the thing is to use the 1st method, but I feel weird putting the mixed stuff of all objects here.
  • 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!