Мы в Telegram
Добавить новость
Январь 2010 Февраль 2010 Март 2010 Апрель 2010 Май 2010
Июнь 2010
Июль 2010 Август 2010
Сентябрь 2010
Октябрь 2010
Ноябрь 2010
Декабрь 2010
Январь 2011
Февраль 2011 Март 2011 Апрель 2011 Май 2011 Июнь 2011 Июль 2011 Август 2011
Сентябрь 2011
Октябрь 2011 Ноябрь 2011 Декабрь 2011 Январь 2012 Февраль 2012 Март 2012 Апрель 2012 Май 2012 Июнь 2012 Июль 2012 Август 2012 Сентябрь 2012 Октябрь 2012 Ноябрь 2012 Декабрь 2012 Январь 2013 Февраль 2013 Март 2013 Апрель 2013 Май 2013 Июнь 2013 Июль 2013 Август 2013 Сентябрь 2013 Октябрь 2013 Ноябрь 2013 Декабрь 2013 Январь 2014 Февраль 2014
Март 2014
Апрель 2014 Май 2014 Июнь 2014 Июль 2014 Август 2014 Сентябрь 2014 Октябрь 2014 Ноябрь 2014 Декабрь 2014 Январь 2015 Февраль 2015 Март 2015 Апрель 2015 Май 2015 Июнь 2015 Июль 2015 Август 2015 Сентябрь 2015 Октябрь 2015 Ноябрь 2015 Декабрь 2015 Январь 2016 Февраль 2016 Март 2016 Апрель 2016 Май 2016 Июнь 2016 Июль 2016 Август 2016 Сентябрь 2016 Октябрь 2016 Ноябрь 2016 Декабрь 2016 Январь 2017 Февраль 2017 Март 2017 Апрель 2017 Май 2017
Июнь 2017
Июль 2017
Август 2017 Сентябрь 2017 Октябрь 2017 Ноябрь 2017 Декабрь 2017 Январь 2018 Февраль 2018 Март 2018 Апрель 2018 Май 2018 Июнь 2018 Июль 2018 Август 2018 Сентябрь 2018 Октябрь 2018 Ноябрь 2018 Декабрь 2018 Январь 2019
Февраль 2019
Март 2019 Апрель 2019 Май 2019 Июнь 2019 Июль 2019 Август 2019 Сентябрь 2019 Октябрь 2019 Ноябрь 2019 Декабрь 2019 Январь 2020
Февраль 2020
Март 2020 Апрель 2020 Май 2020 Июнь 2020 Июль 2020 Август 2020 Сентябрь 2020 Октябрь 2020 Ноябрь 2020 Декабрь 2020 Январь 2021 Февраль 2021 Март 2021 Апрель 2021 Май 2021 Июнь 2021 Июль 2021 Август 2021 Сентябрь 2021 Октябрь 2021 Ноябрь 2021 Декабрь 2021 Январь 2022 Февраль 2022 Март 2022 Апрель 2022 Май 2022 Июнь 2022 Июль 2022 Август 2022 Сентябрь 2022 Октябрь 2022 Ноябрь 2022 Декабрь 2022 Январь 2023 Февраль 2023 Март 2023 Апрель 2023 Май 2023 Июнь 2023 Июль 2023 Август 2023 Сентябрь 2023 Октябрь 2023 Ноябрь 2023 Декабрь 2023 Январь 2024 Февраль 2024 Март 2024 Апрель 2024 Май 2024
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21
22
23
24
25
26
27
28
29
30
31
Game News |

Age of Empires developer confirms the game is mostly written in low-level Assembly code because 'we could scroll the screen and fill it with sprites as fast or faster' than competitors like Starcraft 'even though we had twice as many pixels'

 Age of Empires developer confirms the game is mostly written in low-level Assembly code because 'we could scroll the screen and fill it with sprites as fast or faster' than competitors like Starcraft 'even though we had twice as many pixels'

Some of the greatest stories about games are simply about how developers made the thing work. Ask any developer for their favourite workarounds and you'll get a full evening's worth of entertainment about how a giant tram is actually an NPC with a hat on, or how rabbits are actually what makes Azeroth work, and so on.

This isn't quite on those lines, but a redditor recently noted that Chris Sawyer wrote Rollercoaster Tycoon 1 and 2 in Assembly language, and apparently Age of Empires was the same: "AoE is written in Assembly: is this actually TRUE?!" It's important to note that this wasn't uncommon back in the day, though it would still be pretty remarkable if an entire game was hard-coded this way. Assembly language, to be as brief as possible, is any low-level coding language that communicates more directly with a computer's architecture than high-level languages like C++.

The question about whether Age of Empires was coded in Assembly language hit gold in the replies thanks to Matt Pritchard, one of the founding members of Ensemble Studios, who's been the coding lead on the series from the very start.

"I guess I can clarify this, since I wrote all the assembly code used in Age of Empires and Age of Kings, along with many other parts of those games," says Pritchard. "There were about ~13,000 lines of x86 32-bit assembly code written in total."

Pritchard goes on to explain that the vast majority of this was in the "drawing core", which was compiled by Microsoft Macro Assembler 6.1 into a .obj file and in other cases Visual C++. In plain English, this was an extremely efficient way for the game to draw sprites, with Pritchard estimating it was around 10 times faster than standard C++ implementations.

"AoE's drawing core was notably faster than competitors like StarCraft, which is why the default resolution 'out of the box' for AoE was 800 by 600, when nearly all our competition was 640 x 480 resolution," says Pritchard. "We could scroll the screen and fill it with sprites as fast or faster even though we had twice as many pixels-ish in the game world area."

The Assembly code remained in use even by the time of Age of Kings: HD edition (a 32-bit game), but Pritchard "re-wrote the assembly functions into C++ for both Definitive Editions, as they are 64-bit programs and inline assembly was never supported by the 64-bit C++ compiler, and the vastly improved register sets and compiler optimizations made it unnecessary. Additionally, sprite drawing in the definitive editions is multi-threaded, and will use up to 4 cores for that task alone."

Part of why such a workaround was required is that both games were being developed at a time when standalone 3D cards were uncommon: "cutting edge was 2D with a separate 3D card like the Voodoo 1 & 2" says Pritchard. He goes into some detail on the technical restrictions of the time, noting that the Pentium 166 CPU in the machines most Ensemble developers were using "had 16K of cache... TOTAL." Or to put it in plainer terms, "You are probably working right now on a PC with more on-CPU Cache Memory than the PC I developed AoE on had in TOTAL." 

Pritchard's had quite the career but clearly has real affinity for Age of Empires, and mentions how the HD edition (not to be confused with the Definitive Edition) came about. "The HD edition came about after I had been knocking on doors at Microsoft for a few years trying to get someone interested, and the contract with Hidden Path (where I was at the time, working on CS:GO for my previous employer Valve) was rather small," says Pritchard.

"Microsoft did not think there was much interest in an all digital download version of a 2D game from the 1990s (the CD-ROM version of the original game was still on store shelves just a year or two prior). HD was done by a great team at HPE on a tiny budget (~5 people, ~ little less than a year), so changes were kept to the realm of 'absolutely necessary' rather than the more aspirational Definitive Editions."

There's also some amusing detail on the various console ports of the games. "Ensemble had nothing to do with the PS2 port," says Pritchard. "Microsoft negotiated the deal by themselves and gave them a code and asset drop on CD and said 'have at it'. Almost the same for the Dreamcast port, though for that one I did spend an hour drawing on a whiteboard and trying to explain graphics details to a Konami engineer who spoke no English while I spoke no Japanese."

Pritchard finishes up by saying, "I am very fortunate to have gotten to play an outsized role in those games from the very beginning and creation in 1996 to being the driving force behind the revival in 2010-11 to modern day, finishing my own journey with it once DE was released in 2019.

"I am both very fortunate to have been part of its creation and humbled to this day at all the enjoyment and more that it has brought to people. I would never have had the great career in game development that I had without all of the fans and supporters of those games."



Читайте также

Король обезьян против гигантских монстров в новом трейлере экшена Black Myth: Wukong

Today's Wordle answer for Sunday, May 19

There are supposedly three Total War games in development, one of them Total War: Star Wars




Game24.pro — паблик игровых новостей в календарном формате на основе технологичной новостной информационно-поисковой системы с элементами искусственного интеллекта, гео-отбора и возможностью мгновенной публикации авторского контента в режиме Free Public. Game24.pro — ваши Game News сегодня и сейчас в Вашем городе.

Опубликовать свою новость, реплику, комментарий, анонс и т.д. можно мгновенно — здесь.



Персональные новости

Азербайджанцев оправдали за убийство спортсмена Евгения Кушнира в Самарской области. Делом заинтересовался глава Следкома РФ А. Бастрыкин

Шапки женские на Wildberries — скидки от 398 руб. (на новые оттенки)

Бухалово и Париж: откуда появились необычные и смешные названия населенных пунктов в России

Лукашенко лоббирует интересы Алиева по изоляции Армении