#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2011-06-11

Timestamps are in GMT/BST.

00:51:00raptor Quit (Remote host closed the connection)
01:10:00raptor has joined
01:10:00ChanServ sets mode +o raptor
01:10:00raptorok
01:10:00raptornow for some more SDL bugs
01:10:00raptorunless someone else is in the middle of doing them..
01:16:00raptorsam686: the removal of 'main' in in lua-vec make compiling in linux fail
01:16:00raptorthere must be another way to in windows to get the proper main method selected in the executable
01:17:00sam686what error do you get?\
01:17:00raptorerror: /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main'
01:18:00sam686if it is only needed for linux but not windows, put in a #ifndef win32 or similar..
01:18:00raptordid you do a clean recompile in windows without the main?
01:20:00sam686windows visual studio automacically compiles any changes to .cpp and .h, and i did say lua-vec compile the changes..
01:20:00sam686there no problem in windows with main in lua-vec removed.
01:20:00raptorok, i'll add the ifdef
01:27:00watusimoto Quit (Ping timeout: 252 seconds)
01:35:00raptorsam686: i get the black text in linux
01:36:00raptorwith your color change
01:36:00raptorand in windows
01:36:00sam686what are we going to do with black text? use defines?
01:37:00sam686const Color appears to be set at runtime, not compile time, which seems strange when it is a const..
01:38:00sam686that is appears to be set at the beginning of initalizing runtime.
01:41:00raptori wonder if changing it to: const Color red = Color(1,0,0);
01:41:00raptorwould fix it..
01:41:00sam686you can try, i probably won't want to try, where my slower then your computer taker 5 minutes to compiler
01:42:00raptor:)
01:42:00BitfighterLogBot - Commit cad2adf9dba8 | Author: buckyballreaction | Log: Only exlcude LUA main() from vc++ build; Other minor VC++ 2010 changes
01:42:00BitfighterLogBot - Commit d2e49bcc48bb | Author: buckyballreaction | Log: Forgot the vc++ minor changes...
01:42:00raptortakes 30 seconds..
01:42:00raptordoesn't work :(
01:43:00sam686your machine is probably a newer 64-bit, where i am using an old, year 2003 machine.
01:43:00raptori also have 4 cores
01:48:00raptorkaramazovapy: is there a way to disable the star ratings until at least 3 people rate it?
01:48:00sam686one way is to edit the PHP file..
01:50:00raptorand if there is, would you support such a change? I ask because otherwise thread's ratings are skewed because of such a small sample size
02:18:00raptorsegfault on hosting a game - something to do with loading levels
03:23:00raptorso the colors problem is basically a c++ problem - unless we use an integer, we can't guarantee global static initialization of any object without ordering problems
03:23:00raptorwhich kind of stinks
03:26:00raptor Quit (Remote host closed the connection)
03:53:00watusimoto has joined
05:12:00raptor has joined
05:12:00ChanServ sets mode +o raptor
05:13:00raptorgood evening
05:13:00raptorwatusimoto: hosting or starting a game, in or out of the editor, crashes
05:13:00raptorhas something to do with loading levels
05:26:00watusimotolovely
05:26:00raptordoes the same thing in windows
05:31:00watusimotoI'm mired in pointer hell
05:31:00raptorare you oscillating between * and shared_ptr?
05:31:00raptorbecause i was there once...
05:32:00raptorand it wasn't purdy
05:33:00watusimotoyup
05:34:00watusimotoError 1 error C2683: 'dynamic_cast' : 'boost::shared_ptr<T>' is not a polymorphic type
05:34:00watusimotosigh
05:34:00watusimotoany idea how to cast an object wrapped in a shared_ptr?
05:34:00raptoryeah....
05:34:00watusimotomEditorDatabase = *dynamic_cast<EditorObjectDatabase *>(database);
05:34:00watusimotothat's what I want to do
05:35:00raptorjust use .get()
05:35:00watusimotoshared_ptr<GridDatabase> *database
05:35:00watusimoto(database.get())?
05:35:00raptorif mEditorDatabase is an array, then you can't
05:35:00raptorbut otherwise
05:35:00raptoruse database.get()
05:36:00watusimotoEditorObjectDatabase mEditorDatabase;
05:36:00watusimotobut that should probably be a pointer now
05:36:00watusimotothere's a lot of little things that need to be changed around. I wish references were polymorphic
05:36:00raptor.get() returns the natural pointer to the object
05:42:00watusimotohow do I take a pointer and wrap it in a shared_ptr?
05:42:00watusimotomUndoItems[mLastUndoIndex % UNDO_STATES] = eod;
05:42:00watusimotoeod is a pointer, mUndoItems is a vector of shared_ptr
05:43:00raptorshared_ptr<PtrTyp>(eod)
05:43:00watusimototoo easy
05:43:00raptorthat's it
05:44:00watusimotook, that seems to work
05:44:00watusimotook, another issue
05:44:00watusimotoEODatabase is a subclass of Database
05:45:00watusimotoI have a function that takes shared_ptr<Database>
05:45:00raptorok
05:45:00watusimotobut I have a shared_ptr<EODatabase>
05:45:00watusimotoand that's giving me a "no suitable conversion" message
05:45:00watusimotowith regular pointers, that would work
05:46:00watusimotoas EODatabase is a type fo Database
05:46:00raptorah yes - i figured that out once... let me see if i can remember
05:47:00raptorhttp://stackoverflow.com/questions/4764398/how-to-use-boostsmart-ptr-in-polymorphism
05:48:00watusimotothanks!
05:49:00raptorwelcome
05:49:00watusimotothat produces this monstrosity
05:50:00watusimotogEditorGame->setGridDatabase(boost::dynamic_pointer_cast<GridDatabase>(mUndoItems[mLastUndoIndex % UNDO_STATES]));
05:50:00raptorhahaha
05:50:00watusimotobut it just might work
05:52:00watusimotocompiling???
05:52:00watusimotoalas no
05:53:00raptori'm trying to get fullscreen stretch mode working with SDL...
05:53:00watusimotogood
05:53:00watusimotoyou made really fast progress with that conversion
05:54:00raptoryeah - some things are still a bit broken, but you can play in non-fullscreen just fine
05:54:00raptorwith a few quirks..
05:55:00watusimotoI'm trying to make undo work by copying an entire database of objects
05:55:00watusimotothat seems the most efficient and natural way to save a state
05:55:00watusimotoexcept that it's a total pain
05:55:00raptori believe it
05:56:00watusimotowe need copy constructors in the database, and, possibly, in the editorObjects as well
05:56:00watusimotostill trying to figure if there's a way out of that one
05:56:00raptorwhy is it so bad?
05:59:00watusimotojust a lot of work and maintenance
05:59:00watusimotoif you change the object, you'll need to change all the copy constructors
05:59:00raptorblech
05:59:00watusimotowell, it finally compiled
06:00:00watusimotobut immediately crashed
06:08:00zoomber has joined
06:08:00zoomberraptor!
06:09:00zoomberping raptor
06:09:00raptorhi
06:09:00zoomberand hi
06:10:00zoomberive gotten the code to compile up until linking so far. i had to add some #includes in source files though as it was not working when I added a search header
06:10:00zoomberif you saw in the logbot or not
06:10:00raptori haven't looked at mac - been focusing on fixing bugs i introduced with SDL
06:10:00watusimotook, how does this one work?
06:10:00watusimotomEditorDatabase = new boost::shared_ptr<EditorObjectDatabase>();
06:10:00watusimotothat's obviously wrong
06:11:00raptorjust do shared_ptr<EditorObjectDatabase>(mEditorDatabase);
06:11:00watusimotodo I need "new"?
06:11:00raptorno need to declare new
06:11:00watusimotoreally?
06:11:00raptornope
06:11:00raptornope
06:11:00raptornope
06:11:00watusimotohrmph.... seems to compile
06:11:00raptor:)
06:12:00watusimotomEditorDatabase = boost::shared_ptr<EditorObjectDatabase>();
06:12:00watusimotothat's what I did...
06:12:00watusimotothat's a tiny bit idfferent than what you said
06:12:00raptorthat migh twork too
06:12:00raptoroh wait
06:12:00watusimotostill crashes, though... maybe I try yours
06:14:00zoombererrrrrr
06:14:00raptoroh duh: shared_ptr<EditorObjectDatabase> mEditorDatabase()
06:14:00raptori think that's the right way
06:17:00watusimotodoes that go in the contstructor, or in the header?
06:17:00raptorum
06:17:00raptorthat is creating a new shared_ptr
06:17:00raptorput it whereever you want?
06:18:00watusimotofor the record:
06:18:00watusimoto mEditorDatabase = boost::shared_ptr<EditorObjectDatabase>();
06:18:00watusimoto TNLAssert(mEditorDatabase, "WTF???");
06:18:00watusimotoprints "WTF"
06:18:00raptorok, yeah; then that works
06:19:00watusimotono, it fails
06:19:00watusimotomED is null
06:20:00raptoryou can try: shared_ptr<EditorObjectDatabase> mEditorDatabase(new EditorObjectDatabase());
06:21:00watusimotoI'm looking at the docs :-)
06:22:00watusimotoshared_ptr<EditorObjectDatabase> mEditorDatabase(new EditorObjectDatabase());
06:22:00watusimotolooks like what you posted
06:22:00watusimotook, testing
06:22:00zoomberOOOOOOOh
06:22:00zoomberi think i remembered something
06:23:00watusimotono more wtf
06:24:00zoomberfound it
06:24:00zoombersorry, i have been vamping to myself
06:25:00raptorno problem :)
06:25:00zoomberhmm, i am getting closer. baby steps
06:26:00zoomberIhazSUccess
06:28:00zoombercrashes
06:28:00zoomberdam
06:28:00zoomberso close
06:28:00zoomberok
06:28:00zoomber has left
06:28:00zoomber has joined
06:28:00zoombersorry
06:28:00zoomberUsage: encode [in file] [out file] [bits file] .....argc = 1
06:29:00zoomberwhat on earth does this mean?
06:29:00raptorhahaha
06:29:00raptorumm, update to head
06:29:00zoomberoh kk
06:29:00raptorI hope Xcode is smart enough to use the proper entry point for the application...
06:30:00zoomberi dont know
06:30:00zoomberi was just trying this from terminal, not xcode
06:30:00raptoryes, but xcode does the linking
06:30:00zoomberthe gdb debugger isnt loading the executable automaticallly again :p
06:30:00zoomberoh, about that
06:30:00zoomberwell hang on, let me update my copy of bitfighter
06:32:00zoomberheads
06:32:00zoomberok
06:32:00zoombergood thing im just starting to get the hang of hg
06:39:00zoomberanyone want to play bitfighter for 5 seconds while i push something?
06:39:00raptormy game is very broken right now..
06:40:00zoomberi am very confused right now
06:41:00zoomberraptor, what recent changes did you do 5 hours ago?
06:41:00raptorthere was a second main() function in bitfighter - used in lua-vec
06:42:00raptorit was being called as the main starting function in the game when it was linked together
06:42:00raptorthe changes i pushed was to comment that out on non-windows platforms
06:42:00raptorbut i may need to skip Mac, too
06:43:00raptorif that's the case, then find the main() method in lua-vec target, file luac.c
06:43:00raptorand comment it out and recompile the framework
06:47:00zoomberok
06:58:00zoomber11"testenc_wb.c":191breakpointkeepy 0x01475bf5in main at /Users/hushahn/bitfighter/build/osx/xcode/../../../libspeex/testenc_wb.c:19
06:58:00zoomberBreakpoint 1 at 0x1475bf5: file /Users/hushahn/bitfighter/build/osx/xcode/../../../libspeex/testenc_wb.c, line 19.
06:58:00zoomberPending breakpoint 1 - ""testenc_wb.c":19" resolved
06:58:00zoomber22"testenc_wb.c":192breakpointkeepy 0x01475bf5in main at /Users/hushahn/bitfighter/build/osx/xcode/../../../libspeex/testenc_wb.c:19
06:58:00zoomberBreakpoint 2 at 0x1475bf5: file /Users/hushahn/bitfighter/build/osx/xcode/../../../libspeex/testenc_wb.c, line 19.
06:58:00zoomberPending breakpoint 2 - ""testenc_wb.c":19" resolved
06:58:00zoomberyours?
06:59:00raptormy what?
06:59:00zoomberhang on sorry im just confusing myself
06:59:00zoomberim doing 3 things at once
06:59:00zoomber= bad idea
07:03:00raptorok, starting to get mad at every coding forum that isn't stackoverflow
07:06:00zoomberok question for you
07:08:00raptorok
07:11:00zoomberok
07:11:00zoomberi see main(int argc, char* argv[])
07:12:00zoomberoh is the second function at the very end?
07:12:00zoomberthe second main() function
07:12:00raptorthere can only be one main() per target
07:12:00raptorthere is only one in all of the zap/ code
07:12:00raptorand there is one in lua-vec
07:13:00raptorsince the migration to SDL, when linking togther bitfighter and all the frameworks(incl lua-vec), the resulting program needs to know which main() to use
07:14:00raptorlinux seems to handle it just fine, but windows failed (and I guess Mac)
07:14:00raptorthe fix is to comment out the main() function in lua-vec
07:14:00zoomberah, i see
07:15:00zoomberthanks for clearing that up
07:16:00zoomberbut pmain() is something different right?
07:17:00raptori have no idea what that is
07:21:00zoomber(test)
07:22:00zoomber(test)
07:22:00zoomberinteresting
07:22:00zoomberi learn something every day i guess
07:22:00raptorand that, my friend, is the purpose of life :)
07:23:00zoomberthis one, apple's ui recorder, which can repeat the actions that i did, like (test)
07:25:00zoomberi shall harness this application's power one day to create a script that shall browse my mail for me, check the forums, maybe even play bitfighter for me :o
07:27:00BitfighterLogBot - Commit 69c9c05a733f | Author: buckyballreaction | Log: Fix mouse movement in the menus
07:28:00raptorok off tobed
07:28:00raptorgood ngiht
07:28:00raptor Quit (Remote host closed the connection)
07:28:00zoomber Quit (Quit: zoomber)
07:52:00watusimoto Quit (Ping timeout: 246 seconds)
11:11:00sam686 Quit (Read error: Connection reset by peer)
11:13:00sam686 has joined
11:13:00ChanServ sets mode +v sam686
15:36:00watusimoto has joined
15:40:00koda has joined
15:43:00raptor has joined
15:43:00ChanServ sets mode +o raptor
15:43:00raptorgood morning!
15:44:00sam686hi
15:45:00raptorstill working on the fullscreen problem...
15:49:00watusimototext is black on the main menu :-(\
15:49:00raptorYES
15:49:00raptorARGH
15:49:00raptorso i did TONS of research
15:49:00watusimotoit just started this morning
15:49:00raptorand basically the consensus is: c++ and global statics don't mix
15:50:00raptorthe solutions are:
15:50:00raptor1. use a function like: Color::red()
15:51:00raptor2. initialize the globals in a .cpp file and hope the linker puts that class somewhere early enough in the resulting binary to be useful everywhere
15:52:00raptorI think we've been spoiled by newer langauges that can handle the globals without missing a step
15:52:00raptorlike java
15:52:00watusimotoyes, java's not all bad
15:52:00watusimotoit does some things right
15:53:00watusimotowhat we need is c++ with a compiler that is as smart as Java's
15:53:00raptorso... port bitfighter to java? then we can run it on that old sparc server in the back room....
15:53:00watusimotonever!
15:53:00raptor:)
15:54:00sam686jave may use more memory, not sure about the speed...
15:54:00raptorspeed it great!
15:55:00raptorjava speed, in my own tests was as fast as c++ (granted I haven't done graphics tests.. just data manipulation)
15:55:00raptorbut memory usage was through the roof!
15:56:00raptorbut anyways - we have a c++ global color problem
15:56:00raptorso I propose we use functions like Colors::red()
15:56:00raptorany thoughts?
15:57:00watusimotowe could also use pointers to the global colors
15:57:00raptorOR we could probably just initialize them in main()
15:57:00raptormain.cpp, i mean
15:57:00raptorwatusimoto: explain
15:57:00watusimotoyes, that might work
15:57:00watusimotopointers would be the hightest performance
15:58:00watusimotono copying color objects to to pass a color
15:58:00watusimotook, got to go for a while
15:58:00raptorok
16:01:00raptorcolors still have to be initialized somewhere...
16:02:00watusimoto Quit (Ping timeout: 240 seconds)
18:21:00karamazovapyI'm testing and rating forum levels if anyone wants to join me
18:23:00sam686i sort of removed drawing GL_POINTS from OpenglUtils.cpp because of line smoothing problems. Do this look right with linesmooth, linewidth 1.5? http://96.2.123.136/bitfighter/016SDL_150.png Here is linewidth 1.49: http://96.2.123.136/bitfighter/016SDL_149.png Here is linewidth 0.01: http://96.2.123.136/bitfighter/016SDL_001.png Here is linewodth 0.01 without dots as that is the way it was for windows GLUT: http://96.2.123.136/bitfighter/016
18:24:00raptorLOOKING
18:24:00raptorlooking
18:24:00BitfighterLogBot - Commit 2e900aeeee5c | Author: sam8641 | Log: Free CPU for asteroids and possibly other moveObjects, can't delete this in constructor.
18:24:00BitfighterLogBot - Commit b3a992c51cdd | Author: sam8641 | Log: Don't draw points for text, add missing gametype idle, fix some errors from NULL game
18:24:00raptorthe glut image link is broken
18:25:00sam686the picture image link or what?
18:25:00raptorthe fourth link you pasted
18:26:00sam686http://96.2.123.136/bitfighter/016SDL_001_NO_DOTS.png ?
18:26:00sam686does it work or did you open link wrong?
18:27:00koda Quit (Ping timeout: 255 seconds)
18:27:00raptorthe GLUT link you pasted was incomplete
18:27:00raptorprobably becaus of IRC line limitation
18:30:00sam686ok, the logbot didn't get that full link either by looking at it..
18:36:00raptorok back
18:36:00raptoras for the GL_POINTS in oglUtils
18:36:00raptori just copied and pasted the code directly from the freeglut sources (with minor modification)
18:37:00sam686i kind of noticed that all linux bitfighter version had the same problem.
18:40:00raptorthat fix makes it much nicer
18:40:00raptorgood find
19:33:00raptorprogress!!!: http://96.2.123.136/upload/snapshot36.png
20:19:00BitfighterLogBot - Commit 3e19faba9ec1 | Author: buckyballreaction | Log: Fullscreen modes working with SDL now
20:24:00BitfighterLogBot - Commit 14a5e64a566e | Author: buckyballreaction | Log: Rename master 'main' class to 'master'
20:54:00BitfighterLogBot - Commit bbbfe464a0d9 | Author: buckyballreaction | Log: Try and use hardware graphics first
21:09:00BitfighterLogBot - Commit 742cdbe350fe | Author: buckyballreaction | Log: Forgot to check in the hardware state addition for the ScreenInfo header
21:35:00raptorlater
21:35:00raptor Quit (Remote host closed the connection)
22:35:00watusimoto has joined
22:47:00raptor has joined
22:47:00ChanServ sets mode +o raptor
22:54:00raptorso ive noticed a slight CPU increase in linux since migrating to SDL
22:55:00raptori think it has to do with the SDL polling loop, but i'm not sure
23:02:00sam686one thing i found is that the same ending of someone hosting might freeze for about 1000 millisecond, might be the sqlite.. I haven't run into the problem because of i have it using mysql (not sqlite) in a seperate thread so as to not freeze the main thread.
23:03:00raptori think the database writing should occur in a different thread
23:03:00raptorhowever, i don't know how to do threading in c++
23:04:00sam686i don't know how for linux / mac..
23:04:00raptori bet boost has something..
23:04:00raptorohyeah! boost::thread
23:04:00sam686there is gametype.cpp line 1080 that does the seperate thread for mysql windows.
23:04:00raptorwait
23:05:00raptormight not be cross-platform..
23:06:00sam686no one complaining as BF_WRITE_TO_MYSQL is not enabled by default bitfighter compile
23:08:00raptori'm looking to see if boost::thread is cross-platform..
23:13:00raptorok, looks like boost::thread is portable
23:13:00raptorgood
23:14:00sam686i am getting an error: \zap\ui.h(182) : error C4716: 'Zap::ScreenInfo::setHardwareSurface' : must return a value
23:14:00raptoroh oops
23:16:00raptorwant me to commit the fix?
23:16:00sam686ok yes.
23:16:00watusimoto Quit (Ping timeout: 268 seconds)
23:16:00raptorpushed
23:17:00raptorlooks like TNL has a thread class
23:18:00sam686yes, but i don't know how to use it, it not used anywhere..
23:19:00raptorhttp://www.boost.org/doc/libs/1_46_1/doc/html/thread/thread_management.html
23:20:00raptornice big instructions for boost::thread
23:20:00BitfighterLogBot - Commit 0f4d4dc24288 | Author: buckyballreaction | Log: Method return type should be void

Index Search ←Prev date Next date→

These logs were automatically created by BFLogBot on irc.freenode.net.