#1 2015-07-09 02:21:32

Black_Stormy
Member

How deep does the rabbit hole go?

I set up codeblocks last night in order to have a fiddle with the engine and the game, I'm wondering just how much we can modify here?

Is something like adding a double-jump possible? Maybe coding in a grenade weapon or a knife?

And further than that, what about changing the camera mode to third person, or the game genre entirely from FPS to RTS or RPG etc? Menus? Dialogue popups? Inventory systems? Can we activate the mouse during gameplay and stuff like that?

Is the code in the 'src' directory the complete source code? I have been skimming the cube 2 wiki and all it mentions is cubescript which appears to be very arbitrary scripting access. The editor is fun and the game looks sexy as hell, I'm hoping it's easily modded to the point of total conversion...

Offline

#2 2015-07-09 02:38:21

gaya
Member

Re: How deep does the rabbit hole go?

Adding a new weapon is easy. Take a look at these sections:

void shoot()
http://websvn.tuxfamily.org/filedetails … weapon.cpp

struct attackinfo
http://websvn.tuxfamily.org/filedetails … e%2Fgame.h

There are some things related to networking that hard to understand, such as

addmsg(N_SHOOT, "rci2i6iv"

, but you can get help on the forums. You seem to want to do a lot, so, start small. Add a grenade launcher. Then a knife. And slowly iterate. I've been modding for some months now and i only got some small changes.

However, it's not a general-purpose game code. And it's not very well written as well (lot's of global and static stuff, shitload of magical enums and byte shifting, etc). If you want it to be versatile, just delete all the code inside src/game and rewrite from scratch. Use just the engine. And read some of these along the way: http://gameprogrammingpatterns.com/

Last edited by gaya (2015-07-09 02:40:16)

Offline

#3 2015-07-09 13:02:18

Black_Stormy
Member

Re: How deep does the rabbit hole go?

Thanks for the link, that book is interesting. I'm going to have a fiddle in my spare time and see what I can figure out in codeblocks. I get the feeling that cubescript is just for in-game scripting but I'm more interested in modifying the game to something that plays entirely different.

Is there a massive amount of documentation somewhere? A developers notes section? A devblog even?

Offline

#4 2015-07-09 14:33:46

gaya
Member

Re: How deep does the rabbit hole go?

Unfortunately, no. You can find specific help by creating a thread on the forums, but it's a very small community. You'll have to fiddle around with the code. I'm still trying to make a weapon that modifies blocks. 2 weeks trying. =p

If you're looking for better docs and so on, i suggest you try Torque 3D. It's scripting language is well documented and quite easy to use.

Last edited by gaya (2015-07-09 14:34:26)

Offline

Board footer