Speed tradeoffs

SGDK only sub forum

Moderator: Stef

Post Reply
metalforever
Newbie
Posts: 4
Joined: Wed Jul 04, 2018 7:04 pm

Speed tradeoffs

Post by metalforever » Sat Jul 28, 2018 4:12 pm

I was doing some researxh regarding development options. It seems unclear what sort of speed tradeoffs (if any) i will be looking at by going with C instead of assembly for a homebrew game. Is the difference significant?



Sarah

Miquel
Very interested
Posts: 514
Joined: Sat Jul 30, 2016 12:33 am

Re: Speed tradeoffs

Post by Miquel » Sat Jul 28, 2018 7:58 pm

Hey! Somebody else is approaching to the mega station!

It really depends on how much you know about programming in both languages, and how much experience developing a game, but lets suppose you are very good at both, assembler should be something like twice as fast. It's crazy how much you can optimize in assembler doing bizarre things sometimes.
HELP. Spanish TVs are brain washing people to be hostile to me.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Speed tradeoffs

Post by Chilly Willy » Sun Jul 29, 2018 2:02 pm

Depending on the game, it may make no difference at all. In most games, you would determine which routines would be best done as assembly and only code those. Rare is the game where most of it needs to be done in assembly. These days, devs do something totally in assembly mainly because they like working in assembly, not because they have to. If you're comfortable in assembly, go ahead and do the whole thing that way. If you aren't, start with 100% C, then replace routines as necessary. Mixing C and assembly is easy, so don't worry about it.

Post Reply