Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1055887 Posts in 42878 Topics- by 34816 Members - Latest Member: Religue

October 22, 2014, 05:50:07 AM
  Show Posts
Pages: 1 [2] 3 4 ... 66
21  Developer / Technical / Re: Compiler Linking Help on: March 12, 2014, 08:05:13 PM
The 'correct' way to handle multi-platform development, however, is to use something like cmake (there are plenty of alternatives, though), and use it to generate Makefiles, IDE projects, etc automatically.

"Correct" or not, it's not as hard as you might think to write a Makefile that works on all platforms you target. It's how I do all of my work, and my toolchain is basically identical to 0x1dea's. Vastly better workflow than any IDE I've ever used.

Yes, once you get beyond a certain experience level, IDEs hurt more than they help.

I've been in software development professionally for almost 10 years now, and you can pretty consistently identify the developers who know what they're doing if you look for the ones not using IDEs.

It's also worth mentioning that when project reaches a certain size, most IDE features become essentially unusable.  Granted, most projects on this site will never reach that size, but I've worked on a couple big projects that had.

Dropping IDEs and going to vim+make was one of the best things I've ever done.
22  Developer / Technical / Re: Programming turn based system like in Frozen Synapse on: March 10, 2014, 05:19:23 PM
Hi guys. I am currently trying to make a small game, but am having trouble trying to figure out some of the programming logic. Basically, I am trying to have a turn based system like in frozen synapse. How would you program the timing system? I've only ever worked on real time games, so this is a bit foreign to me.

I would assume that you need to store the initial variables of the entities (position, velocity, etc), and when going forward in time, you simulate the physics multiplied by the time you want to display. Is there anything else you think I need to keep in consideration?

Not everyone has played the game you're referring to.  It would help if you would describe your problem in more detail.  I could probably answer your question, but I have no idea what you're talking about.
23  Developer / Technical / Re: What are your digital workspaces ? on: March 04, 2014, 05:17:47 AM
vim, make, gcc, gdb, and gprof.

If it ain't command line, it ain't worth doing.
24  Developer / Technical / Re: Discussion: SteamOS, the SteamRuntime and third party libraries on: January 19, 2014, 08:03:34 AM
If not, then these libraries will need to be distributed with the game, how is that usually achieved?

On Linux, this is not true.  The traditional way to distribute for Linux is to create packages for your target distributions.  Most Linux package managers allow you to speciify dependencies, and these will be installed by the package manager when you attempt to install your project.

Shipping your own dependencies is possible, but frowned upon by a lot of Linux users.
25  Developer / Technical / Re: Version control for your games on: January 04, 2014, 09:03:05 PM
I use SVN. I do like the TortoiseSVN interface, and miss it sorely under Linux.

Tortoise (or any GUI interface to version control, for that matter) seems great until you have to do anything complicated.  Then it just becomes an enormous pain in the ass.  I stick to the command line, Tortoise just seems really flaky to me.
26  Developer / Technical / Re: Converting between enums on: January 04, 2014, 08:53:36 AM
Let:
Code:
enum Type
{
TYPE_UP     = SDLK_UP,
TYPE_DOWN   = SDLK_DOWN,
TYPE_LEFT   = SDLK_LEFT,
TYPE_RIGHT  = SDLK_RIGHT,
TYPE_RETURN = SDLK_RETURN,
TYPE_ESCAPE = SDLK_ESCAPE,
TYPE_SPACE  = SDLK_SPACE,
TYPE_A = SDLK_a,
TYPE_B = SDLK_b,
TYPE_C = SDLK_c,
TYPE_F = SDLK_f,
TYPE_M = SDLK_m,
TYPE_N = SDLK_n,
TYPE_S = SDLK_s,
TYPE_V = SDLK_v,
TYPE_W = SDLK_w,
TYPE_Z = SDLK_z,
TYPE_COUNT = 17
};

Problem: TYPE_COUNT (amount of values in the enum) will need to be defined manually. If one does not map the enum to SDL's enum, the TYPE_COUNT is set automatically to the amount of values.

Maybe the answer to your problem is to switch to a language that handles enumerations more gracefully than C or C++ does.
27  Developer / Technical / Re: Converting between enums on: January 03, 2014, 05:17:14 AM
This looks like one of those "How do I do X?" questions where the right answer is "Don't do X, fix your design,"

Why in the world are you doing so much converting between enums?  I can't ever think of a time where I actually had to do this, and I use a lot of enums.  An enum is supposed to be a distinct type.  If your types are that malleable, perhaps enums are not the answer.
28  Developer / Technical / Re: PC Joypad equivalency question on: December 30, 2013, 06:53:28 PM
Like most people, I use a wired 360 pad for development on PC

Is this really what most developers are doing?  That's kind of depressing.
That wouldn't surprise me. Most use windows, 360 controller isn't bad at all really other than the dpad.

I use a Saturn controller.. But that means no analog sticks and such, which are commonly used now a days.

I also use a Saturn controller.  I really don't understand what anybody sees in those 360 pads.

Alas.
29  Developer / Technical / Re: PC Joypad equivalency question on: December 30, 2013, 05:52:16 PM
Like most people, I use a wired 360 pad for development on PC

Is this really what most developers are doing?  That's kind of depressing.
30  Developer / Technical / Re: headers in c on: November 15, 2013, 05:48:17 PM
I love to have everything organized in their logical include files, plus one Game.h that includes all other includes. All .c/.cpp files only include Game.h. This not just makes things easy, but it also allows the use of precompiled headers, which increases compile times a billion.

that sounds good, maybe i'll steal that. Wink

Thanks everyone.


This seems like an incredibly poor approach to me.  It makes every single one of your source files sensitive to changes in every header.

I bet you'd get better results by dumping the monolithic header and only including what you need in each source file.
31  Developer / Technical / Re: headers in c on: November 14, 2013, 01:03:06 PM
I mean, I can stick headers in stdafx, and it all 'works', but either way my engine takes 40+ seconds to do a full compile, and that's after I've done a ton of work to bring it down.

That's really not a long compile.  My release builds take at least 5 minutes.  When I worked on MS Office, it took about 6 hours.

You're probably fine right where you are.  Besides, how often do you do full builds?  Should be relatively rarely.
32  Developer / Tutorials / Re: Implementing a tile engine, Tiled on: November 01, 2013, 09:42:33 PM
Code:
    ~TileMap()
    {
        created_tiles.clear();
        tilesets.clear();
    }
};

This class is leaking memory.  Clearing those containers (which is entirely unnecessary, by the way) doesn't delete the objects that the pointers in the containers refer to.

Since you're using C++11, consider using std::unique_ptr in those containers.  Alternatively, you might be able to just store the objects by value instead dynamically allocating them.  You also really ought to implement a copy constructor/assignment or supress those operations to prevent further problems.
33  Developer / Technical / Re: Software design, client-server architecture, and game state on: October 30, 2013, 04:27:01 AM
It's difficult to answer this question in detail, but in a broad sense it sounds like you're over object-orienting things.

When it comes to networking, one of the things I do is to make the game always behave as if it were networked.  Even in the offline modes, the logic operates by sending messages to a server and receiving responses.  When it comes time to actually be networked, all you have to do is change where the messages are going.

This is difficult to do unless you plan for it from the very beginning.
34  Developer / Technical / Re: Gamepad HAT switch, how does it work? on: October 21, 2013, 01:03:11 PM
This is probably a dum question, but how do HAT Switches on gamepads work (The D-Pad if you're not familiar)?

Just in case you don't know, the vast majority of d-pads are not hatswitches.  The XBox 360 pad is the only one I'm aware of.  This is part of the reason why that d-pad generally sucks for fighting games.

can you elaborate? Do you mean internally they return non-discrete values?

Most d-pads are implemented as four contact points and report as two axes with three positions each (high, low, neutral).  There is no 'diagonal' input from the pad, diagonal is just a combination of two independent axis values.

The 360 d-pad actually reports diagonals as a separate input because it's a true hat switch.

Quote from: InfiniteStateMachine
yeah I'm not exactly sure about that. Gamepads in general are bad for fighting games but the dpad is the best option (except for the 360 dpad which is an abomination).

The Sega Saturn pads were fantastic for fighting games, better than sticks for many games.  A lot of serious fighting gamers like myself consider them to be the finest pads ever made.  The 6-button Street Fighter layout helps too.

The reason hats suck for fighters is that it's usually more difficult to hit a diagonal on them.  With a sticks it usually isn't a problem, but for pads it's actually really annoying.
35  Developer / Technical / Re: How to develop unmaintainable software on: October 21, 2013, 08:46:05 AM
These pieces are, to me, just as vital to the game as its music, graphics, or play design.  They are part of the product that I want to ship.

okay, but then in the framework of "what is the best for me to become more efficient at producing software" you are definitely acting in an irrational way, don't be surprised if you have to explicitly state your point of view.
The original post/article/thing is talking about actual code written as a tool, if you write (part of) your code for your own entertainment his assumptions are still valid.

No, this is wrong.  I've provided several examples from real world projects where 'reinventing the wheel' is the ideal, and quite often the only rational choice.  Now, maybe it's because I come from a critical systems-type background where third-party code is an unacceptable risk, but these types of situations are not uncommon in other areas as well.

It's about short vs. long-term thinking.  Learning to do something yourself provides long-term benefits that don't come from relying on other people's work.
36  Developer / Technical / Re: How to develop unmaintainable software on: October 21, 2013, 08:14:29 AM
- that it'd take several weeks to do, time which would be better spent adding cool stuff to your game
- that writing one would be operationally identical to copying and pasting one, that there is no advantage to a game to having written it yourself

You know what, I think I finally have this figured out.

Your points all stem from an incorrect assumption, namely that everyone has the same goals.

You see, my goal is not just to write Game A.  My goal is to write Game A that uses my own image loader, gamepad code, etc....

Not doing this work does not save me any time.  It changes the project.  I am now working on something different, something that I do not want to write.

These pieces are, to me, just as vital to the game as its music, graphics, or play design.  They are part of the product that I want to ship.
37  Developer / Technical / Re: Gamepad HAT switch, how does it work? on: October 21, 2013, 04:43:23 AM
This is probably a dum question, but how do HAT Switches on gamepads work (The D-Pad if you're not familiar)?

Just in case you don't know, the vast majority of d-pads are not hatswitches.  The XBox 360 pad is the only one I'm aware of.  This is part of the reason why that d-pad generally sucks for fighting games.
38  Developer / Technical / Re: How to develop unmaintainable software on: October 21, 2013, 04:41:08 AM
- that it'd take several weeks to do, time which would be better spent adding cool stuff to your game

Image loaders are cool stuff.

- that writing one would be operationally identical to copying and pasting one, that there is no advantage to a game to having written it yourself

No, it is not.

My image loader prepares data in exactly the format I need it in.  This is a very important point that you seem to have missed.  I do a lot of things with image data apart from displaying it (shader tricks, mask generation, etc...).  The performance overhead that would be introduced by having to convert someone else's format into what I need is extremely significant, especially for large images.

also, you are again assuming that everyone codes as fast as you claim you can code. my position earlier was that coding an image loader would take the average programmer 2 weeks

If it takes you 2 weeks to write an image loader, you're either an inexperienced programmer or you're using a terrible image format.

The thing that you don't seem to understand is that image loaders are trivial.  They are not difficult to write. 

These are rules you've defined. Many authorities also say a golden rule is "dont reinvent the wheel".

They're not my rules.  I'm talking about the platform's rules.  Programs got away with a lot of crap back in the 90s (writing wherever the hell they wanted to, etc.) and games seem to be the last ones that are finally getting with the program.

And I loathe the "don't reinvent the wheel" crap.  It's such a terrible metaphor.  Improvements in wheel design are some of the most important technological advancements in history.  The movement from solid to spoked wheels changed civilization.  Reinventing the wheel is good, both literally and figuratively.  That's how you get better wheels.
39  Developer / Technical / Re: How to develop unmaintainable software on: October 19, 2013, 06:36:59 AM
i already said i understood that, and i agree with it when it comes to other things. but specifically when it comes to image loaders, i don't feel that it's a worthwhile use of time to write one.

I and feel that it is worthwhile to write it yourself, for the numerous reasons I've stated.  The only justification you've provided is that you could be using the time for other things, which is a useless tautological statement.  I could literally say that about anything and be correct.  It's a worthless point.

You know what?  The time you're spending doing other things could be spent writing an image loader.  See how that works?  That's not an argument, it's stating the obvious.

The idea that games are somehow "special" is also maddening to me.  Software is software.  Do it right or don't do it at all.

I'm sick of games thinking that they don't have to play by the rules.
40  Developer / Technical / Re: How to develop unmaintainable software on: October 18, 2013, 06:29:29 PM
i can understand how a car works, but that doesn't mean it's easier to build my own car than to understand how it works,

Building a car is not a comparable metaphor.  Henry Ford proved long ago that you can build a car without understanding how it works.  Engineering a car, perhaps.

and it doesn't mean that i don't have control of that car when i drive it if i didn't build it myself

Once again an irrelevant metaphor.  Driving a car is not the same kind of control.  Driving a car is analogous to using a library, not controlling it.  People used to have control over their cars, back when it was easily possible to work on every aspect of them.  Modern cars take a good deal of this control away.

i also don't know why you would have to understand it. for example, back in the 90s when i used to code in qbasic, i wrote my own .gif loading script (never did jpg). but i never actually use that understanding of the .gif format at all today, and i would not again ever write a .gif loading script because others do it much better than i could do it

You know, you are completely missing the point of this whole discussion.  It's not about image loaders.  It's about the fact that there are damn good reasons that people might want to implement things themselves and not use outside libraries.  What part of this are you not understanding?
Pages: 1 [2] 3 4 ... 66
Theme orange-lt created by panic