Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / [STICKY] The Posting Competition

Author
Message
budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 1st Jul 2014 01:59
Page++.

Also, just noticed that Virtual Nomad changed his avatar. I wonder how long I've forgotten that he existed because of this.


"Giraffe is soft, Gorilla is hard." - Phaelax
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 1st Jul 2014 02:00
Quote: "Page++"

;
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Jul 2014 02:04 Edited at: 1st Jul 2014 02:05
Was the STL used in MSVC created by Microsoft? I thought it was a joint effort of the C++ standard committee.

budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 1st Jul 2014 02:23 Edited at: 1st Jul 2014 02:26
Quote: "Was the STL used in MSVC created by Microsoft? I thought it was a joint effort of the C++ standard committee."

I think Microsoft use their own version of it, but I could be wrong.

Quote: ";"

\

Depending on the language or implementation, that could be valid syntax, assuming something were after the '.'


"Giraffe is soft, Gorilla is hard." - Phaelax
Yodaman Jer
User Banned
Posted: 1st Jul 2014 04:36 Edited at: 1st Jul 2014 05:11
Comet, I tried your code, but it won't work for whatever reason. This part particularly...



I get all kinds of nasty little red lines. Maybe my interpreter is outdated?

EDIT: Yup, for some reason I was running 2.5.6, updated to 2.7 (and soon I'll upgrade to 3), but that seemed to solve the issue! Forget my silliness before this edit, the code works just fine!

EDIT x2:

I found wxPython. This is how easy it is to use...



Pretty cool. That was about 35 seconds of work, including installation time...


Come check out my new website!
nonZero
15
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 1st Jul 2014 12:05 Edited at: 1st Jul 2014 17:07
<testing>
# Ignore this
</testing>

"I was in nASA before it was cool" -- Original nASA Members (nonZero, DJD and TheComet)
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Jul 2014 13:44
nonZero is obviously writing something that scans threads on TGC

budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 1st Jul 2014 13:46
Or the opposite, writing forums to scan his programs.


"Giraffe is soft, Gorilla is hard." - Phaelax
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 1st Jul 2014 14:02
The C++ standards committee doesn't actually make the STL, they just define it through the ISO C++ standard. They might make(or have made) a reference implementation, but I don't know if they still do that.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Jul 2014 14:36 Edited at: 1st Jul 2014 14:36
Did his forums scan me getting points

The Zoq2
16
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 1st Jul 2014 15:21
Woo, I can now read multidimentional arrays from text files

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Jul 2014 15:52
@People using python as their scripting language in their C++ apps - beware of reference counts!

So I thought I had reliable callback functionality implemented for my python bindings... I wanted a python function/method to register itself to C++, like so:

(python)


Where the "register_callback" function in C++ looks like this:


And the actual call of the callback looks like this:


You'd think that looks pretty clean, right? Wrong!

The "Game" class never destructs, ever. The reason being that m_CallbackList is holding a python object containing an instance of "Game" - a reference to itself you could say. So even when you shut down the python interpreter and try to clean up everything, boost.python will refuse to destroy the "Game" class because there are still references pointing to it.

Well damn.

The solution is obviously to use weak references, but I haven't quite figured out how those work yet.

nonZero
15
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 1st Jul 2014 16:49 Edited at: 1st Jul 2014 16:52
Quote: "nonZero is obviously writing something that scans threads on TGC"

540x960  

"I was in nASA before it was cool" -- Original nASA Members (nonZero, DJD and TheComet)
budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 1st Jul 2014 17:25
There are more pages to this thread than to Geek Culture.


"Giraffe is soft, Gorilla is hard." - Phaelax
nonZero
15
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 1st Jul 2014 17:39
Quote: "There are more pages to this thread than to Geek Culture."

There's probably a fount of knowledge, too.

"I was in nASA before it was cool" -- Original nASA Members (nonZero, DJD and TheComet)
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Jul 2014 19:33
@nonZero - Responded to le e-mail.

Someone should filter all messages containing useful information from The Posting Competition.

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 1st Jul 2014 20:09
Quote: "The solution is obviously to use weak references, but I haven't quite figured out how those work yet."


Weak references do not add to the reference count. If there are no strong references to something then it is deleted.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Jul 2014 20:13
Oh I understand the concept of weak references, I just don't know how to use the Python API to do that yet.

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 1st Jul 2014 20:21
Ah I see, I'm completely useless then.
budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 1st Jul 2014 20:24
I'm completely points.


"Giraffe is soft, Gorilla is hard." - Phaelax
Yodaman Jer
User Banned
Posted: 1st Jul 2014 20:48
I am 24 minutes too late for points.


Come check out my new website!
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 1st Jul 2014 21:56
@TheComet
Something I dug up with a quick Google: StackOverflow question regarding weak Python references.

Apparently you need to go into the CPython API.

Yodaman Jer
User Banned
Posted: 1st Jul 2014 22:01
T3hForumz wrote: "Your Post Count
To date you have posted:

5255 Forum Messages
198 Forum Threads"


Damn! I do need a life, I guess...


Come check out my new website!
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 1st Jul 2014 22:20
@Yodaman Jer
What's the link for that again? I always forget.

budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 2nd Jul 2014 02:09
http://forum.thegamecreators.com/?m=post_count


"Giraffe is soft, Gorilla is hard." - Phaelax
Seditious
12
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 2nd Jul 2014 04:55
Yo, Yodaman Jer, I have exactly one more thread than you do.

6899 Forum Messages
199 Forum Threads

Flash is falling out of... Flashion.
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 2nd Jul 2014 05:14
Hmm, only .68 days. Not too bad considering how long I've been here. Of course, it takes me a lot longer than 20 seconds to write a message.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Jul 2014 06:20
Quote: "Back to top"


I keep forgetting this is even there, anybody else even realise it was there?

Needs to be in the middle, hopefully on the new forum ;

Hmm thinking about it, we could totally use a Scroll to Bottom link at the top, viewing 100 posts is getting tiresome but sadly the only way to follow some threads that get very active!

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 2nd Jul 2014 07:00 Edited at: 2nd Jul 2014 07:03
Quote: "viewing 100 posts is getting tiresome"
Hence the idea I posted in the Beta thread a little while ago, which noone has commented on yet.

Flash is falling out of... Flashion.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Jul 2014 07:45
Quote: "Hence the idea I posted in the Beta thread a little while ago, which noone has commented on yet."


I agreed with it but maybe forgot to say... apologies sent...

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 2nd Jul 2014 07:50 Edited at: 2nd Jul 2014 09:48
Lol, it's all good!

Posts loading from the bottom, upward, would look a little odd, to be fair. But it would be efficient!!

I have a handsome face to show you all:



Flash is falling out of... Flashion.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jul 2014 11:02
9081 Forum Messages
400 Forum Threads

easter bunny
13
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 2nd Jul 2014 11:17
1680 Forum Messages
92 Forum Threads


Audacia Games - Latest WIP - AUTOMAYTE 2.1, AppGameKit one click deploy to Android
"When you've finished 90% of your game, you only have 90% left"
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Jul 2014 13:16 Edited at: 2nd Jul 2014 13:20


Problem with this is, it assumes you only visit the forum and post and close the forum...

Taking a quote from my FB Wall...

Quote: "
I LOVE 1471!!!

These CreditSafe Ltd people rang apparently on this number, add it to your blocked list!

02920886500
"


Got a cold call from them earlier, they are listed ironically as pest callers on the web [Just search for the number] so any UK\'ers in here wanting to add it to their blocked list, here you go

Got a call with some woman asking for me by first name [Did not inform whether it was me or not, which you should never do], tells me her name is [REMOVED NAME] and then when I ask what it is about, says \"Do you have to be so rude\" and slams the call on me...



Called them to inform them of what happened, best to be polite as the person on the switchboard is not the same person that called you.

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 2nd Jul 2014 14:01
Quote: "best to be polite as the person on the switchboard is not the same person that called you."
I am very glad to hear that people, such as you, understand this principle. There are so many people out there who don't, and they take their anger out on anyone merely associated with the company.

Flash is falling out of... Flashion.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jul 2014 14:37 Edited at: 2nd Jul 2014 14:50
Okay, using weak pointers actually doesn't solve my problem. Long story short, there is no solution to my problem because it's impossible to know when the class that registers a callback is destroyed.

I made a work-around that would simply erase the list of listeners as soon as the game shuts down.

For completeness' sake, here's how you get a weak reference to a callable object:

Registering a python callback as weak reference:


Calling the object referred to and automatically removing any broken weak references:


MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Jul 2014 14:43
Quote: "
I am very glad to hear that people, such as you, understand this principle. There are so many people out there who don't, and they take their anger out on anyone merely associated with the company.
"


I know, You should come to the UK and visit a store called Primark [I never shop there for specific reasons] and just buy a pack of popcorn in advance and stand by the all day long, long queue that is there every time I get dragged in there... it is interesting, and they might as well start a TV show about it too...


Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 2nd Jul 2014 14:57
TheComet, do you have a link to a tutorial on how you'd even begin to start using python as a scripting language for C++?
budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 2nd Jul 2014 15:02
7g


"Giraffe is soft, Gorilla is hard." - Phaelax
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jul 2014 15:16 Edited at: 2nd Jul 2014 15:17
Quote: "TheComet, do you have a link to a tutorial on how you'd even begin to start using python as a scripting language for C++? "


The Boost docs were very helpful on that front. I recommend using Boost.Python to wrap your C++ functions and only use the python API if you really really need to.

They wrote a tutorial on how to use Boost.Python here:
http://www.boost.org/doc/libs/1_55_0/libs/python/doc/tutorial/doc/html/index.html

The reference becomes useful once you have a grasp on how Boost.Python works:
http://www.boost.org/doc/libs/1_55_0/libs/python/doc/v2/reference.html

And obviously I'm here as well.

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 2nd Jul 2014 15:25
Great, thank you very much.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jul 2014 15:30
Are you embedding the interpreter into your C++ application, or are you just writing a python extension module?

Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 2nd Jul 2014 16:19 Edited at: 2nd Jul 2014 16:22
I wonder how Boost.Python would work with Qt's signals/slots? I guess I'll have to fiddle around with it as it seems to be quite a niche use-case.

EDIT: Turns out there's a sweet library called PyQt that integrates tightly with Qt. I'll have to see there's any performance issues, but so far it looks awesome!

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jul 2014 16:29
It'd be good to know more closely what you're doing. I see you're using Ogre to draw into an SDL window, and now you're using a GUI library minus the GUI part of it.

Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 2nd Jul 2014 17:15
@TheComet
Yes, I was using Ogre to draw into an SDL window but as I was implementing a system to propagate input/window events, it just got really clunky when it came to passing user-defined events around. As I would like the majority of my game's logic to be event-driven that would become a big headache later on.

I have some experience using Qt from work and really liked how it implements the observer pattern while being allowing user-defined connections easily. So I'm going to replace SDL entirely with Qt which allows me to use all of Qt's goodies without losing any cross-platform compatibility. And hopefully with my exclusion of the vast majority of the Qt GUI(except perhaps message boxes and other minor items that would be used for configuration dialogs and the like), it will be fast enough to not be a burden on game logic.

I may keep developing the SDL side just for benchmarking comparisons, but I think Qt would be better in the long run.

All in all, I'm kinda just dropping libraries in and seeing how my architecture is gonna play out.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jul 2014 17:45


Finally this crap is done. Oh my god.

Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 2nd Jul 2014 18:26
Looks complicated. Electronics stuff?

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jul 2014 19:02
Yeah, it's a PCB providing high voltage signals for explosion tests.

I'm having fun trolling s_i on the DarkGDK forums.


The Zoq2
16
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 2nd Jul 2014 19:09
Im having fun getting points in the geek culture board

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy

Login to post a reply

Server time is: 2026-07-26 08:32:07
Your offset time is: 2026-07-26 08:32:07