Jump to content
  • Advertisement
Sign in to follow this  
FantasyVII

Game development with assembly. Where to start?

This topic is 996 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

 

For the past few days I have been learning assembly and I was wondering how to display graphics on the screen.

 

I'm doing this just for fun because I feel like I'm starting to burn out on my main game project and I thought I would do something fun like learn assembly. However displaying text on a console wasn't very exciting for me. So I'm taking it to the next level.

 

So, does anyone know how to start game development with assembly?

 

thanks happy.png

Share this post


Link to post
Share on other sites
Advertisement

...something fun like learn assembly. However displaying text on a console wasn't very exciting for me.


Writing assembly doesn't get much more exciting than that! It does get more tedious and much more difficult, however. You do graphics in the exact same way as you'd do it in C - just with more effort to manage the same data and make the same calls.

If you want to have fun with assembly, you should try reverse engineering and modifying other people's programs instead. Edited by Nypyren

Share this post


Link to post
Share on other sites

I'm not entirely sure about game dev in assembly, but I do know that rollercoaster tycoon was made in assembly except for the parts to interface with windows and directx. My guess would be that you have to do something along those lines.

 

Alternatively, make a game using ascii art?

Share this post


Link to post
Share on other sites

You use the same APIs you would use from C or C++. You'll need to properly prototype the functions you want to call, then call them according to their calling convention. There are some simple examples at this page.

Share this post


Link to post
Share on other sites


I'm doing this just for fun because I feel like I'm starting to burn out on my main game project and I thought I would do something fun like learn assembly. However displaying text on a console wasn't very exciting for me.

 

C/C++ is actually a perfect tool to learn assembly. You may write methods within C++ source using an assembly functions; or write assembly function is separate *.asm file and link with C++ project (need to understand well the convention to transfer parameters). The problems where writing in assembly makes a practical sense is some bit-juggling algorithms where each CPU cycle is absolutely critical to ensure max performance; once you deal with bytes/words etc... the algorithms implemented in C is often more efficient, the more complex algorithm the more advantage C code may have; modern C compilers do a marvelous job to optimize... BUT to write a performance optimal C algorithms you must have a good idea how it is translated to assembly so assembly listing of C++ code is a paramount to have during such performance-critical-development. You may gain a way more performance improving/inventing algorithms; it is a major method to make things run faster. Once algorithm is perfected you may consider to implement/optimize some tiny parts in assembly... Another area where assembly makes sense is to write some performance optimized standard calls; for example, setjump/longjump to return back to root level from a deep recursion can be times faster then standard equivalents (as soon as the compromises/limitations of such fast implementation are well understood). Anyway, writing/understanding in/assembly is really a fun and very useful (actually, it's a critical skill) to get maximum performance; but writing all project in assembly makes no practical sense... 

Share this post


Link to post
Share on other sites

Have you considered old school game programming ie vga based game? Or homebrew development for the GBA?

Another hobby thing you could look into is SIMD coding using intrinsics.

Share this post


Link to post
Share on other sites

Are you trying to learn asm or just take a rest from your project? If this is just for short distraction then try something completely else ( I did that and keep coming back to it, also just for fun) - write something for any of old 8 bit consoles or computers. My favourite is Atari 2600 VCS and 6502 assembler language (look for Stella emulator, it's not only emulator, it's very sophisticated and full featured debugger! If only developers could have such tool in 80s ;)). VCS is very simple in terms of architecture, but because of constraints incredibly challenging (today if feels like solving a puzzle rather than making a game;)). This will not teach you any modern assembler, but will show you basics of ANY asm. For many years rules didn't change, while knowing 6502 you will be able if not write, then at least read modern asm code. It may appear very handy during debugging mysterious issues.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!