ID:155707
 
I was wondering to program for Byond is a object oriented coding language. So i was wondering should i learn Object coding or is it ok to go full C++. Also i wanna know can i break up code(i wanna make a action game). For example basic code, attacks, Dmg math, ect....
Something tells me this would be better off in Design Philosophy, but I'll respond in the meantime.

If you've got a handle on DM then you should have no problem picking up the basics of C++. They spawn from the same parent language of C (I believe it was said that DM is derivative of C# but my memory constantly fails me so don't take that to heart).


As for compartmentalizing your code, I suggest (if we're talking about DM) splitting the code up into several core categories. ou don't have to follow this example but to just give you an idea you could manage your code as such:

World
Mobs
Objs
Turfs
Procs
Vars (can be included with their separate parent types)
Verbs (can be included in procs)

This is the context I use to separate my code and it works pretty well, I don't have much trouble finding my way around my code. Give it a try and eventually you'll work out your own management system.
In response to Bravo1
Thanks; Also im doing the tutorial on Byond before i actually start making my own game. Theres a chapter that introduces the group method(Snakes dragon and Winged Beast) but i dont know how to make the same .dmi have different icons. For example they have green red and black dragon, when i dont name the state. The 1st state under dragon goes as its icon, but when i label the states green red and black they either show a Blank space when running or keep the same color as the 1st im onfused what im doing wrong. Do i need to make 3 dragon's. Thx in advance.

mob
var/species_alignment
dragon
species_alignment = .dragon
red
green
black
species_alignment = .black

In response to Snyperwolf
Ah, I see what you're getting at.

when creating multiple icons in the same dmi file it's icon states. to change the icon of an atom you need to use the icon variable, to change the state within that icon you would modify the variable icon_state.

so for example:

Black_Dragon
icon='dragon.dmi'
icon_state="black"
In response to Bravo1
Oh ok i thought if i change the name"Dragon to Black_Dragon" it wouldnt compile. Thx for the help