Game Maker's Garage Forum

Game Creation => Other Languages & Tools => Topic started by: GabrielCA on February 20, 2010, 08:30:15 PM

Title: Moving up...
Post by: GabrielCA on February 20, 2010, 08:30:15 PM
After using GameMaker for approximately 4 years, I moved on to METAL Basic (which I still think is pretty good and recommend to anybody), briefly experimented with Flash and finaly settled to C.

I believe the main difference between GameMaker and more advanced game creation tools is its lack of double buffering (for sprites, etc.) and of direct screen access.
Title: Re: Moving up...
Post by: Gan on February 20, 2010, 08:41:22 PM
Hey, and awesome. :)
Going to just pure C or maybe an off-branch like Obj-C or C++? Also what IDE would you use? I tried going to pure C a while ago and found little success getting a good IDE.


-Gan
Title: Re: Moving up...
Post by: GabrielCA on February 20, 2010, 08:49:30 PM
For a while I used Apple's old MPW (eventually with SDL)
I now use Apple's (old) ProjectBuilder (or, alternatively, Code::Blocks on Windows) and SDL. In both cases, I stick with pure C.

Oddly enough, both Microsoft and Apple have their own variants of C (respectively, C# and Objective-C)
Title: Re: Moving up...
Post by: Gan on February 20, 2010, 08:52:35 PM
Oh, that's cool. I hear that they have a beta Code::Blocks for mac. Anyways, can you compile to 10.4-6 with ProjectBuilder?


-Gan
Title: Re: Moving up...
Post by: GabrielCA on February 20, 2010, 08:56:37 PM
I have no idea... I've only recently 'migrated' from Mac OS 9 to Mac OS X (old version)

Macintosh forward compatibility...
I've managed to run a test application both in System 6 and Mac OS 9. Everything was identical except for the fonts, colors and GUI.

Is the forward compatibility as good in Mac OS X ?
Title: Re: Moving up...
Post by: Gan on February 20, 2010, 09:22:41 PM
Whoa! That's like stone age stuff. Is it worth it to build for older OSes?
No, forward capability isn't so good. Too many new and improved stuff.


-Gan
Title: Re: Moving up...
Post by: GabrielCA on February 21, 2010, 09:10:36 AM
One thing that I find useful about programming on older machines is that as they are slower, they force the programmer to write faster, more optimal code...
Title: Re: Moving up...
Post by: Swamp7hing on February 21, 2010, 12:11:27 PM
^ Oh, and welcome to the GMG. :)
Title: Re: Moving up...
Post by: Gan on February 21, 2010, 01:03:51 PM
Quote
One thing that I find useful about programming on older machines is that as they are slower, they force the programmer to write faster, more optimal code...
So very true. I only just realized this morning that my app can take up to 200 mb of memory if played for 2 min. Yeah, now I'm hard core researching into memory management. Wouldn't have noticed it if I hadn't tried to port it to mac. I can definitely see from your view point, having a too powerful machine can hide issues you'll have later.


-Gan
Title: Re: Moving up...
Post by: GabrielCA on February 21, 2010, 03:24:47 PM
Quote
^ Oh, and welcome to the GMG. :)
Thank you, Swap7hing

The challenge of writing optimized code is probably one of the main differences between computer programming today and programming about 20 years ago, when often assembly was the only solution
Title: Re: Moving up...
Post by: WarHampster on February 21, 2010, 05:05:15 PM
Welcome ;)

If you're into intense optimization look into homebrew programming, I think that the Gameboy Advance is a lot of fun, but you can always go DS if you want something more modern. Programming handheld consoles (particularly older ones) is a challenge because you really need to work with the hardware and manage memory very efficiently. For example, on pretty much any handheld or retro console you use the vertical blank as a timer, and need to be really careful about how much you put in video RAM.

BTW, do you know any assembly? I keep trying to learn but get discouraged at the lack of "beginner friendly" tutorials, and the fact that everyone who actively programs ASM seems to be over 50.
Title: Assembly
Post by: GabrielCA on February 21, 2010, 05:14:13 PM
I don't really know assembly, although I tried to make 6502 programs for a short period. I did find very insightful and begginer friendly information, understood the basics, but failed to find a good development environment...

In the end, I made up an assembly-like language and challenged myself to program it... this forced me to be 'creative'.
Title: Re: Moving up...
Post by: Silverwind on February 21, 2010, 05:29:22 PM
Why on earth would anyone want to program in assembly?
Title: Re: Moving up...
Post by: WarHampster on February 21, 2010, 05:29:40 PM
Wait, you made a language? Elaborate  :o
Title: Re: Moving up...
Post by: GabrielCA on February 21, 2010, 05:33:55 PM
Quote
Wait, you made a language? Elaborate  :o
Yes, a few years ago...
It was rather primitive, as at the moment of its conception I had little knowledge of assembly, etc. I wrote an assembler and later a macro-assembler in BASIC, and wrote interpreters in BASIC and in C... Its primitive design made programming the system somewhat complex, so I sort of challenged myself to make programs for it. To this date, the best I have managed to get done is a BREAKOUT clone...
Title: Re: Moving up...
Post by: GabrielCA on February 21, 2010, 05:38:01 PM
Quote
Why on earth would anyone want to program in assembly?
Because it once was a standard, because it allows to control things in a more direct, immediate manner, because it represents a challenge (to quote Sir Edmond Hillary, first man to climb the Everest, "I climbed it because it was there"), because many great games were presumably made with it, etc.
Title: Re: Moving up...
Post by: Silverwind on February 21, 2010, 06:16:08 PM
It's the programmer's equivalent to Irish politicians: it's completely unnecessary.

Quote
because many great games were presumably made with it, etc.
Not even Rogue was written in assembly. ;D
Title: Re: Moving up...
Post by: GabrielCA on February 21, 2010, 06:25:52 PM
To the best of my knowledge, it is, indeed, totally unnecessary by today, but certain people such as me (and this is strictly our point of view, our opinion) believe it is interesting to program assembly, because it tends to be more challenging.
Title: Re: Moving up...
Post by: WarHampster on February 21, 2010, 06:45:02 PM
1. You learn a lot about how computers work.

2. You directly manipulate registers, so you have unparalleled efficiency.
Title: Re: Moving up...
Post by: Gan on February 21, 2010, 07:25:50 PM
My interest is piqued. Do you have any example code you could post to satisfy our nerdy desires?


-Gan
Title: Re: Moving up...
Post by: GabrielCA on February 21, 2010, 07:40:06 PM
Quote
My interest is piqued. Do you have any example code you could post to satisfy our nerdy desires?
Why, yes, although I must warn you I designed this system when I was about 13...
This is probably the first thing I ever programmed for this virtual system

Code: [Select]
;Print out the first 16 Fibonacci numbers
Do 1 10 1 1 ;x=1
Do 4 10 1 1 ;y=1
Echo 1 ;print x
Do 5 10 1 15 ;timeout=15
PtrTo 6 ;store location to myrepeat
Do 5 30 1 1 ;timeout-1
Do 1 20 2 4 ;x=x+y
Do 2 10 2 1 ;ox=x
Do 3 10 2 4 ;oy=y
Do 4 10 2 2 ;y=ox
Do 1 10 2 3 ;x=oy
Echo 1 ;print x
BoolDie 5 ;exit if timeout<0
PtrFrom 6 ;goto myrepeat
Note that "Do" is an operation that is used for all types of arithmetic.

[EDIT] As I have previously said, the most complex thing I managed to program was a BREAKOUT clone; it took approximately 550 lines of macro-assembler code plus the development of a primitive tile graphics "library"
Title: Re: Moving up...
Post by: Gan on February 21, 2010, 07:45:51 PM
 :o
It's like trying to read Japanese... so foreign.


-Gan
Title: Re: Moving up...
Post by: GabrielCA on February 21, 2010, 07:51:19 PM
As with Japanese (or 6502 assembly, or English, for that matter), it is a matter of practice (or of having designed that silly system)
Title: Re: Moving up...
Post by: Connors on February 26, 2010, 09:57:07 PM
Nice... even Gandolf looks impressed by this. (lols)
Title: Re: Moving up...
Post by: Silverwind on February 27, 2010, 02:41:19 AM
My dad had to use Assembly all the time back in the days of Kobalt, Fortran and... well... Assembly. It's way too time consuming to be practical. It's a nightmare to do anything you could do simply in anything else.

Quote
1. You learn a lot about how computers work.

2. You directly manipulate registers, so you have unparalleled efficiency.
I wouldn't build apps in assembly for efficiency anymore than I'd build a TV for efficiency.

Quote
ertain people such as me (and this is strictly our point of view, our opinion) believe it is interesting to program assembly, because it tends to be more challenging.
Well if that's what drives you, let nobody stand in your way. :)

Just don't expect to finish your first app before you're 70! ;D Hehehe...
Title: Re: Moving up...
Post by: WarHampster on February 27, 2010, 10:23:23 AM
Why are you even arguing about this... it can be fun to play with outdated stuff that is useless by today's standards.
Title: Re: Moving up...
Post by: j on February 27, 2010, 10:41:01 AM
Different people are interested in different aspects of development. Some coders continue to script within engines, others go on to write those engines. I'd imagine there's some appeal to the latter interest group in learning and working with something in Assembly, for all the reasons they've previously argued.
Title: Re: Moving up...
Post by: GMG Mike on March 18, 2010, 01:21:11 AM
Quote
I have no idea... I've only recently 'migrated' from Mac OS 9 to Mac OS X (old version)

Macintosh forward compatibility...
I've managed to run a test application both in System 6 and Mac OS 9. Everything was identical except for the fonts, colors and GUI.

Is the forward compatibility as good in Mac OS X ?


Kind of an old thread but stuff like this interests me.

The easiest and perhaps strictest interpretation of backward/forward compatibility would be to write a strictly Carbon C or C++ program, adhering only to the "CarbonLib 1.6" specification and not using any exclusive OS 9 or OS X features. This program, compiled as CFM PPC would technically run on anything from a Power Macintosh 6100 (1994) to a brand new Mac Pro with Snow Leopard and Rosetta (2010), using only a single binary. You would need to use CodeWarrior.

It may then be possible to compile the same project in Xcode. You could then produce an Intel binary so that Intel Macs will be able to run the program more efficiently.

Supporting very early OS X versions (10.0, 10.1) usually isn't worth the time. Mac OS 9 probably has more daily users than those versions of OS X.

Tiger is the most universal version of the Mac OS, running on anything from a Power Macintosh 7500 (with at least 604 processor, using XPostFacto patches) (1995) to various Intel Macs released in 2007, with only a few rare exceptions. Leopard, in theory, could run on a Power Macintosh 7500 with a G4 processor, but no one has attained this feat. Leopard can run on anything from a Power Macintosh G3 (with G4 upgrade) (1997) to various Intel Macs released in 2009, but there are numerous exceptions (all G3 laptops and G3 iMacs and any other Macs not upgraded to a G4 processor)

System 7.5.3 is the most universal version of the Classic Mac OS, running on anything from a Mac Plus (1986)  to various Macs released in 1996, possibly some Macs released in 1997 exclusive of G3s.
Title: Re: Moving up...
Post by: GabrielCA on March 20, 2010, 10:49:19 PM
Wow, that's a lot of information !
Very interesting, thank you.

What about the "FATCarbon" module, or compiling a program as a combination of fat binary and Carbon ?
Title: Re: Moving up...
Post by: GabrielCA on April 02, 2010, 09:24:58 AM
Quote
Wait, you made a language? Elaborate  :o
BTW if this still interests anybody, I am now making a limited pseudo-C compiler for my VM system.
Here is the new way to write the Fibonnaci numbers test (it compiles and works !) :
Code: [Select]
#define QUANTITY 20
int x = 1;
int y = 1;
int ox;
int oy;
int remainingNumbers=QUANTITY;

Echo(x);
remainingNumbers--;

sub loopPoint:
x+=y;
ox=x;
oy=y;
y=ox;
x=oy;

Echo(x);

remainingNumbers--;

if(remainingNumbers>0){
goto loopPoint;
}
Title: Re: Moving up...
Post by: GMG Mike on April 08, 2010, 03:53:16 PM
Quote
Wow, that's a lot of information !
Very interesting, thank you.

What about the "FATCarbon" module, or compiling a program as a combination of fat binary and Carbon ?


I forgot about FATCarbon.

It's a little bit harder (because you must stick to APIs that are common over 20 years of Mac OS history, or write small bits of separate code) - but you could use FATCarbon to create an app that runs on any color Mac with System 7 - the oldest being a Macintosh II (1987). I suppose even in theory you could get it running on the black and white compacts, too, as long as they have at least System 7, so minimum a Mac Plus (1986).
Title: Re: Moving up...
Post by: GabrielCA on April 17, 2010, 11:39:54 AM
If OS X bundles (Mac OS 9 "packages") were supported on all old Mac OS versions, it would be possible to make a bundle containing both a 68k executable (for all versions of the classic Mac OS, even the oldest) and an OS X executable (possibly "Universal")
Title: Re: Moving up...
Post by: GabrielCA on July 15, 2010, 04:02:55 PM
My script interpreter can be found here :
http://sites.google.com/site/bl0ckeduserssoftware/projects