[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Is there an easy way to do program games in assembly?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /v/ - Video Games

Thread replies: 30
Thread images: 6
File: awoo unrelated.jpg (266 KB, 1733x2000) Image search: [Google]
awoo unrelated.jpg
266 KB, 1733x2000
It sounds fun to try and program games in assembly, starting out with extremely simple stuff working pixel-by-pixel, but I suspect the hard part of it will be getting the code to interact with the OS. Just creating a process and a window sounds like a nightmare.
How hard is it really, and is there anything that can make it easier?
>>
>>330410456

Learning how assembly works is cool, but I have a feeling you've fallen into a common trap of trying to make a video-game using the lowest-level technology you can find.

Is the project to have fun hacking with assembly or to make a video game?
>>
I frankly don't see why you'd start learning to program that way, but interaction with the OS will be the easy part since you're using the API it provides to interact with it

Look at MASM and any documentation on the Win32 API if you want to write assembly programs on Windows
>>
>>330410727
To have fun with assembly.
I'd never try to make a big game with assembly until I understand a huge amount of low level code and can start to make my own levels of abstraction.

>>330410778
I have no idea what an API is.
All I know is that apparently FASM is better than MASM but that can hardly be called "know" since that's just the opinions of people on the internet.
>>
File: 1455949775753.jpg (283 KB, 1200x1200) Image search: [Google]
1455949775753.jpg
283 KB, 1200x1200
awoo
>>
Have you had any experience with programming? Do you have interest in programming in general or just assembly?
I ask this because since assembly is very low-level, you will have to invest a lot of time and energy to achieve simple graphical outputs. Struggling to get results from your project will probably just get you frustrated and ending up scrapping the project (or killing your intrest in the topic).
If you still want to code at a lower level, you could try your hand at C, or you could try something like OpenGL if you don't mind going more high-level.
>>
>>330410456
>How hard is it really
It's fuck-off hard as balls.

>is there anything that can make it easier?
Use a higher level language, that's what they're there for.
>>
>>330410456
Programming big programs with assembly is only a good idea if you do it out of interest. It's going to be a tremendous amount of work though.

Just keep in mind that a program like that is likely to perform worse than the same written in c/c++.
>>
>>330413146
Yeah, but the high level languages are tedious to work with because you have to learn the way the language does each particular thing, and have to find messy-looking workarounds all the time.
While assembly would probably be even slower to work with, it's much more satisfying when you know exactly what you're doing.
Also, I've always found the graphical outputs of high-level languages to be ugly, I have a certain fondness for the rustic graphics of GUIs made from scratch.
>>
Wasn't Rollercoaster Tycoon programmed in assembly?
>>
>>330410456
Awoo's awoo anon! Now you have to pet my ears!
>>
Just play TIS-100.
>>
Sounds as tedious as making a Source map with Notepad.
>>
>>330413938
Yes.

>>330414054
>the anon lightly grabs the awoo's ears, rubbing them between index fingers and thumbs

>>330414202
That's cool!
What's with the boxes though?

>>330414442
I've made sounds in Notepad before, it was pretty fun.
>>
>>330413585
Unless you are secretly a CPU, i think you will find assembly's operations much more counter-intuitive than something like C's syntax, or having to occasionally google some references on built-in functions of the language.

And even if you get used to developing in assembly, you would get plain bored having to repeatedly code complex and long subroutines to execute a relatively simple function, which could be done in a few lines in other languages.

Try reading an assembly program more complex than a hello world, throughly examining each instruction to understand what it does, and you will find it's pretty convoluted.
>>
Yes, just yell out "awoo" and it'll all come to you.
>>
>>330410456
Awoo~
But seriously, for what fucking reason would you start programming in assembly? Low level programming is useful for operations than need to be very well optimized but I really doubt vidya comes as such with modern day hardware.
>>
>>330415162
It's really just for fun, and assembly instructions are actually much more intuitive than more abstracted instructions because there's no unexpected bugs or restrictions when you know exactly what a function does.

Also, posting "don't use assembly!" in a thread where I'm just wanting to talk about assembly is pretty annoying. It's impossible to talk about assembly without a dozen people jumping in and interrupting because apparently it's a hard language.
The only person I've talked about assembly with who actually used to be an assembly programmer (not that there was a choice back in the day) didn't discourage it.
>>
File: 1456825815719.gif (218 KB, 584x720) Image search: [Google]
1456825815719.gif
218 KB, 584x720
AWOOO!

If you plan to code a game in assembly, don't even try to make anything more serious than the games from early 90's.

You shouldn't code anything in assembly, unless you absolute must to because there is no other way to do it. It's just too tedious and counter-productive with anything big.

Unless you have 20 years of experience with asm like Chris Sawyer, who coded RCT in asm because the game needed tricks and raw power to run without any hiccups on the old computers.
>>
alright so to actually work with low-level code like assembly is a terrible idea as a beginner.

look into learning how to program all sorts of languages (i recommend Python, Java, lua, and C — not all at once, though) to further your knowledge of programming.

if i were to make a game, i'd suggest you take a look at PICO-8.
PICO-8 is a little virtual console that you program with lua and a built-in sprite editor to produce cartridges and make games.
this is very much like how older computers would be, such as programming the Commodore 64 with BASIC
>>
>>330417256
Yeah, I've learned C and Java as well as an assortment of other languages, now I want to try assembly.
Literally all but one response to this thread talking about assembly is saying "Don't use assembly!". Can't I just have a thread about assembly for once where less that half the responses are saying to not use assembly?
>>
>>330417605
i understand your frustration.
that said, what more could you expect from this board, or even 4chan in general?
>>
>>330417605
then go to /g/, fuck
>>
>>330418328
>going to /g/
>ever
>>
>>330418452
Don't use assembly.
>>
File: 1452994871010.png (450 KB, 1000x1000) Image search: [Google]
1452994871010.png
450 KB, 1000x1000
>>330417605
>Is there an easy way to do program games in assembly?
>No
>How hard is it really, and is there anything that can make it easier?
>It's really hard. You use Win32 API for OS interactions
>Bwaa why do I get "ITS HARD" responses

For the right answers, ask the right questions.

If you refuse to accept any "its really hard, shouldnt use it" answers, then just go and find out yourself already. You said you would have fun, so what are you waiting for?
>>
>>330416010
People are telling you this because assembly is not intuitive at all. Using prebuilt functions and operators to manipulate variables is much more intuitive than manipulating registers and memory addresses. A decent language (not PHP) have very little issues/bugs. Think C or Java.

If you want to program assembly for fun, then go right ahead. I recommend looking up how NES games and the like were made, because I'm fairly certain they used a type of assembly.
>>
File: 1346626670285.jpg (25 KB, 350x295) Image search: [Google]
1346626670285.jpg
25 KB, 350x295
>>330417605
Just write your program in C and compile it to asm. Congrats now you're an assembly programmer.
>>
>>330417605
That's like posting a thread to /g/ about that you want to know what apple product to buy and then complaining that everyone tells you to not buy apple products
>>
You asked if there's anything to make it easier and we're being honest, you're trying to build a city with a spoon, use better tools.
Thread replies: 30
Thread images: 6

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.