11 February 2015, 22:00 | #41 | |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
Quote:
Yes if you want to write something as fast as possible, asm is the natural choice. But there is really nothing wrong with writing in C for, for instance, productivity software, or games with less focus on fast action. |
|
12 February 2015, 00:26 | #42 |
Registered User
Join Date: Apr 2013
Location: .
Posts: 250
|
There is so many Programming language out there!
Free one like Blitz 3D Blitz Plus FreeBasic(bit more advance!) GLbasic NAALAA 6(It got tilemap build in to design own plaform game and it also got own doom build in that if you want to design it) For Old school programming language like Amos Pro(I love them) Blitz 2.1 Amiga C Turbo C (Yup, it is work on Windows 8.1...just make sure you got Dosbox installed in! You can create own Graphics) Right now, Number one programming langauge is C believe it or not! You can check out all the Basic programming langauge right here http://basic.mindteq.com/index.php?i=popular Last edited by AF2013; 12 February 2015 at 00:50. |
12 February 2015, 01:28 | #43 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
|
|
12 February 2015, 03:10 | #44 | |
Banned
Join Date: Dec 2014
Location: Montreal
Posts: 129
|
Quote:
Few people would use assembly to write a very large software which needs to be maintained and evolved over time, which is the case for most productivity programs. Moreover, yes, it is indeed a coincidence. The Amiga arrived a bit before the beginning of the period when games coders started the transition between assembly and C. For 8 bits computers there was no way out of assembly, the CPUs were so limited that you had to crank out every single cycle out of the machine to get decent results. The Amiga is at least one order of magnitude faster than the fastest 8 bit home computers of that time and allows for much more latitude in language choice but alas the inertia of the existing pool of coders meant that most early games were written in 68k assembly. So necessarily most good games would be too. The causal effect is the reverse one. Dungeon Master is 95% C (if not 100) and it's a fantastic game. Sure it could be a bit smoother at times but most of the time this is not necessary. Writing it in C gave the coders way more time to concentrate on gameplay and the ergonomics of the UI and the game is a textbook example of good user experience design. This couldn't have been done using assembly: modifications of the control flow and/or data structures takes way too much time, in C it's much easier. It's pretty clear that this was an advantage: when it arrived, there were no other games like it. RPGs were static ugly things with mostly 2D graphics and limited game world interaction but DM offered consistent and very sandboxy like interaction with the game objects: something that you get via C typing system and is doable but hard in assembly. So yes, it's a coincidence: had the Amiga arrived 5 years later this would have been much different. |
|
12 February 2015, 04:29 | #45 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
|
|
12 February 2015, 05:40 | #46 |
Banned
Join Date: Dec 2014
Location: Montreal
Posts: 129
|
Re-reading I realized that I should have added "with the same amount of effort/time", without that my sentence is indeed very false. So I thank you for pointing this out.
However you are too harsh to conclude my sentence is nonsensical as I gave enough hints aside from that sentence to let understand that it's not what I meant especially when I add a little bit further "[...] is doable but hard in assembly." Refactoring in C is an order of magnitude simpler, this makes an enormous difference. I love the 68k assembly language, it's well designed, the instruction set is much more harmonious than its contemporaries and I like using it when needed but the productivity it offers cannot be meaningfully compared to C. Only its efficiency/performance can. When you refactor in C, you do not have to worry about: - register re-assignment, re-use, trashing, etc. since you use variables - data structure modifications: modifying a struct inside a struct inside a struct does not require any code to change, nor offsets to recompute, no indirections to update - proper typing: variables and pointers are typed, no need to be careful about mistyping (well, less need), the compiler will tell you when you are mistaking an int for a pointer or if you are not using an indirection when one is needed or vice versa - control flow changes: add conditions to an if/else or an additional embedded branch, change a loop from do/while to for... - etc. On a micro scale, these things are all perfectly doable in assembly. On a macro scale, they are terribly hard especially if you have tuned register allocation to minimize ram bandwidth: add a variable and you have to rethink several levels of functions. This work is worth it on some parts of a program, but on the ones where you need high productivity and lots of rework the use of assembly is a drag. On DM they did an extensive amount of work on the user experience and there are very interesting interviews with Doug Bell where he explains that they iterated an enormous amount of times. Doing it in C rather than assembly gave them an enormous edge, it's undeniable. Hope that was clearer this time. My apologies again for my original incorrect blanket statement. Edit: Oh dear, and now I'm pushing us even more into Off topic territory. Sorry! Last edited by Nekoniaow; 12 February 2015 at 06:06. |
12 February 2015, 06:59 | #47 | |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
|
Yes, that was too harsh, sorry about that.
Quote:
Example: Code:
incdir "asminc:" include "exec/types.i" STRUCTURE struct1,0 ULONG struct1.foo ULONG struct1.bar LABEL sizeOf_struct1 STRUCTURE struct2,0 ULONG struct2.foo STRUCT struct2.struct1,sizeOf_struct1 ULONG struct2.bar LABEL sizeOf_struct2 STRUCTURE struct3,0 ULONG struct3.foo STRUCT struct3.struct2,sizeOf_struct2 ULONG struct3.bar LABEL sizeOf_struct3 a lea data,a0 ; points to structure 3 lea struct3.struct2(a0),a1 ; points to structure 2 inside structure 3 lea struct2.struct1(a1),a2 ; points to structure 1 inside structure 2 move.l #"foo3",struct3.foo(a0) move.l #"bar3",struct3.bar(a0) move.l #"foo2",struct2.foo(a1) move.l #"bar2",struct2.bar(a1) move.l #"foo1",struct1.foo(a2) move.l #"bar1",struct1.bar(a2) rts data dcb.b 1024 Wouldn't call it hard, just more time consuming and a potential pain in the back side. I don't think assembly language is really any harder than C, it's just more work to get things done, and requires more thought in order to keep things from turning into a mess. Last edited by Thorham; 12 February 2015 at 07:12. |
|
12 February 2015, 07:35 | #48 |
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,771
|
I wasn't including the OS in that statement. I would have thought that was obvious.
As for productivity software, the best and most popular one has to be Protracker. And guess what that was written in? How many of the best games are written in anything except asm? How many demos? Of course anyone with half a brain cell knew exactly what I was trying to say by my previous post. Obviously you just felt like having an argument. |
12 February 2015, 08:03 | #49 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
It isn't. Compiled code is much too slow on a plain 68000 A500 so if you want speed you go for asm, not necessarily 100% asm but all the speed-critical parts. Disassemble any compiled C code and you'll see what I mean.
Most Amiga games were coded in asm for reasons mentioned above. It was like this until C= (and hence the Amiga too) died. Action games = asm. Adventures/RPG's = C (or any other HLL). |
12 February 2015, 15:44 | #50 | ||
Banned
Join Date: Dec 2014
Location: Montreal
Posts: 129
|
Quote:
I had a feeling assemblers could have such a feature when I wrote that line but my memory of Devpac is a little hazy. Quote:
Hard is not the proper term, time consuming and tedious is more appropriate. C being higher level (but I would not call it high level, to me it's a typed assembly with automatic register assignment) it lets you concentrate on your algorithms and architecture first which is what really matters if you want to produce a good game. When this is set in stone you can go for the kill and convert the critical path parts to assembly. StingRay is correct that C compilers produce code that is quite less good (although this depends a lot on the scope and how you choose your C statements) than kitten written assembly but it is supremely easy to transform C to assembly once you have prototyped your gameplay and settled on the game features. Speed is important and necessary but that's not the sole thing you want to tune in a game. Gameplay is the part you want to be able to quickly iterate on and modify constantly during development, optimizing can come later and is specific to lower level routines: no need to optimize code which runs one a frame and controls the character if on the other hand you have a bob drawing routine which is called thousands of times. The former is best written in C for easy tuning and modifying, the latter of course should be assembly. C and assembly are tools which serve different purposes. Both useful. |
||
12 February 2015, 16:11 | #51 | |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
Quote:
Of course it isn't entirely a coincidence that many of the best games were written in asm, because many of the best games are trying to get the most out of the hardware. But to say that to learn anything else is a "waste of time" is just plain ignorant. In fact, i'd urge anyone to learn C before they touch asm for so many of the reasons brought out in these arguments. Asm code is very difficult to maintain if you write in a naive way. Writing in C makes you think in a more structured way, and then you can go back to Asm and impose the same standards of discipline on yourself. You can write Asm that looks a bit like something a good optimising compiler might produce--in fact with a sufficiently good style and use of macros, you can make it seem more like a higher-level language. The Asm books i learnt from in the early days taught me some very bad habits, but coding professionally in C++ for a few years has completely changed my outlook. |
|
12 February 2015, 16:24 | #52 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
|
To Nekoniaow:
You have some good points. The only good reason to do everything in assembly language is because you enjoy programming in assembly language as a hobby. If not, then it's a waste of time and should be kept to a minimum. |
12 February 2015, 22:59 | #53 | |
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Quote:
What do animals have to do with programming? For what it's worth, when I write code in ASM now the first thing I do is write pseudo-notes before I start coding the main loop, or even some of the subroutines. For example: Code:
; / detect button press (Joystick or cursor keys) and set animation ; / update UD sprite graphics ; / move UD sprite ; / limit movement based on level layout ; / update enemy sprites ; / generate random number and activate enemy accordingly: ; / get time from registers ; / get seed (time took user to press start on main menu) ; / adjust time ; / add seed to time ; |
|
12 February 2015, 23:11 | #54 | |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
oh yeah kittens love to help their owners do some work! don't believe me, google images "kitten on keyboard"
Quote:
http://eab.abime.net/showthread.php?t=71180 |
|
13 February 2015, 00:13 | #55 |
Registered User
Join Date: Apr 2013
Location: .
Posts: 250
|
How easy is to make Sprites on the screen in Devpac Assembler?
somethings like this Assembler code of drawing Red dot screen ; This is Red dots on the screen Assembler code of drawing Blue dot screen ; This is Blue dots on the screen Because if I am doing write in Assembler then I always put commets next to it otherwise I going get lost in coding! How you guys write assembler without commets next to it to know what is does or it is that bag of experience that help you along the way? |
13 February 2015, 01:25 | #56 | ||
Banned
Join Date: Dec 2014
Location: Montreal
Posts: 129
|
Quote:
Quote:
And apologies to the original poster. It looks like every thread I participate in ends up being wildly off-topic-ed. Last edited by Nekoniaow; 13 February 2015 at 01:31. |
||
13 February 2015, 14:07 | #57 |
cheeky scoundrel
Join Date: Nov 2004
Location: Spijkenisse/Netherlands
Age: 42
Posts: 6,905
|
Its the EAB way, don't feel bad about that. The forum would be quite boring without some nice hefty discussions blowing in all directions I for one have been reading all these posts with great interest and the occasional pang of disgust - it makes you feel alive.
|
18 April 2015, 16:10 | #58 | |
Posts: n/a
|
Quote:
Code:
import os ... # Program in Python ... # Compiled program (as in C language or other programming language which compiles code) os.system("DH0:program.exe") ... # Program in Python ... |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Best stuff to learn C programming for Amiga (plus project idea/questions) | BulletMagnet83 | New to Emulation or Amiga scene | 9 | 30 July 2012 02:36 |
I want to learn about Workbench | mancity | support.Apps | 26 | 21 May 2012 06:14 |
How to start Amiga Programming? (ASM/C) | DBAlex | Coders. General | 11 | 08 April 2010 14:25 |
How did you learn to program | BippyM | Coders. General | 80 | 01 April 2007 19:25 |
command line to start a confil + start the game | Unregistered | New to Emulation or Amiga scene | 4 | 17 October 2004 10:31 |
|
|