FAQ  •  Register  •  Login

Source: Where are objects stored?

<<

tazinator

Posts: 352

Joined: Fri Jul 05, 2013 7:35 pm

Post Fri Apr 03, 2015 5:49 am

Source: Where are objects stored?

I'm trying to figure out where objects are stored, so I can add my own.

Are they like, sprites? Or is all done with math? If the former, i can't figure out where they are. if the latter, oh boy. i only went up to Algebra 2 in 2011. my math has atrophied since... Vector graphics, doh! How do I make vector graphics :o

p.s. im a noob, i suck at coding, i dont even know if calling them stored or sprites is the right thing
Play my new level! Two different teams fight over a nexus: One mainly defends while the other attacks! is fun
viewtopic.php?f=33&p=21002#p21002
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Fri Apr 03, 2015 10:01 am

Re: Source: Where are objects stored?

No sprites :) Bitfighter uses vector graphics

For objects, it's a little weird: each object is rendered in GameObjectRender.cpp, as in this file tells how objects should look like. You can modify this for each object easily. I'd highly recommend you modify existing objects instead of adding new ones though, it's tough.

All I know though, if you want to add objects you would need to:
- Add it in BfObject.h
- Modify BfObject.cpp to add collisions and stuff?
- Add a renderer in GameObjectRender.cpp (and .h)

But if you want to do this, ask a dev :)
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

watusimoto

Site Admin

Posts: 1558

Joined: Tue Feb 23, 2010 7:07 pm

Location: Quartz's mom's house

Post Mon Apr 06, 2015 10:34 pm

Re: Source: Where are objects stored?

The bad news is you're going to need to compile. The good news is we really have it dialed in, and is probably as easy to do in Bitfighter as any other project out there.

The math you'll need isn't very hard. Is the thing you want to add like anything currently in the game?
<<

tazinator

Posts: 352

Joined: Fri Jul 05, 2013 7:35 pm

Post Tue Apr 07, 2015 10:31 pm

Re: Source: Where are objects stored?

maaaybe? I don't actually know how to compile source, but it should be easy enough to learn. Umm, Xcode was saying i don't have an SDK or something

Anyway Powerups and enemies was what I wanted primarily. I will do experimenting on other stuff (shields, armor, collisions) for my own amusement

To clarify, do I only need to change those three files?
Play my new level! Two different teams fight over a nexus: One mainly defends while the other attacks! is fun
viewtopic.php?f=33&p=21002#p21002
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Wed Apr 08, 2015 2:53 pm

Re: Source: Where are objects stored?

Try compiling first!!!!! You should of followed these:

-Open a terminal
-Set up the compatibility environment by running:
export MACOSX_DEPLOYMENT_TARGET=10.6
change into the 'build' directory within the Bitfighter source
-Run CMake:
cmake ..
-Build with 'make':
make Bitfighter
-The .app will be built in the 'exe' sub-folder of the main bitfighter source directory
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

watusimoto

Site Admin

Posts: 1558

Joined: Tue Feb 23, 2010 7:07 pm

Location: Quartz's mom's house

Post Wed Apr 08, 2015 11:29 pm

Re: Source: Where are objects stored?

Hey look! We have a wiki page on this topic, that even includes some instructions for OSX!

http://bitfighter.org/wiki/index.php/Bu ... Bitfighter
<<

tazinator

Posts: 352

Joined: Fri Jul 05, 2013 7:35 pm

Post Thu Apr 09, 2015 7:47 am

Re: Source: Where are objects stored?

Followed wiki. Downloaded cmake..

so I cd (thats change directory) into the build directory in the source.
cd ~/downloads/bfsource/build/

cmake
And it tells me
-bash: cmake: command not found

then i tried to build from the cmake app, but it told me mac deployment target wasn't set or something. crap. my eyes are pretty worn out bad at this point, so i call it a night. bit fighter is the ONLY site where i can actually read anything without leaning forward or squinting and hurting my eyes. so nice wiki and forums, in terms of legibility it is miles above others
Play my new level! Two different teams fight over a nexus: One mainly defends while the other attacks! is fun
viewtopic.php?f=33&p=21002#p21002
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Thu Apr 09, 2015 2:40 pm

Re: Source: Where are objects stored?

Oh, check this out: http://tudat.tudelft.nl/projects/tudat/ ... n_Mac_OS_X

But, if you are lazy, you can just run '/Applications/CMake.app/Contents//MacOS/CMake' instead of cmake
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

tazinator

Posts: 352

Joined: Fri Jul 05, 2013 7:35 pm

Post Fri Apr 10, 2015 3:30 am

Re: Source: Where are objects stored?

Fordcars wrote:Oh, check this out: http://tudat.tudelft.nl/projects/tudat/ ... n_Mac_OS_X

But, if you are lazy, you can just run '/Applications/CMake.app/Contents//MacOS/CMake' instead of cmake


oh it told me no such found. Which made me realize that I installed it to the applications folder on the hard drive, not my user.aha!

But I have an error new.
  Code:
MACOSX_DEPLOYMENT_TARGET: 10.6
Compiling for OSX architectures: x86_64
Determining system GL provider
Atempting to use standard OpenGL
CMake Error at /Users/taz/Applications/CMake.app/Contents/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /Users/taz/Applications/CMake.app/Contents/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
  /Users/taz/Applications/CMake.app/Contents/share/cmake-3.2/Modules/FindThreads.cmake:204 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:87 (find_package)


Configuring incomplete, errors occurred!
See also "/Users/taz/Downloads/bfsource/build/build/CMakeFiles/CMakeOutput.log".
Play my new level! Two different teams fight over a nexus: One mainly defends while the other attacks! is fun
viewtopic.php?f=33&p=21002#p21002

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests