Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411321 Posts in 69331 Topics- by 58384 Members - Latest Member: Winning_Phrog

April 03, 2024, 05:00:19 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
  Show Posts
Pages: 1 ... 7 8 [9] 10 11 ... 26
161  Developer / Technical / Re: The happy programmer room on: December 02, 2011, 01:49:33 AM
Can you be happy and depressed at the same time? Or some kind of anxious relief?

Anyways, just uploaded a new version of Mysterious Castle to the iTunes App store and IndieDB. I feel good, but now I'm having panic attacks about possible bugs, and instead of relaxing, I feel like I need to keep working. I just crammed for the last 3 weeks and feel like I 'should' want a break, but instead I'm anxious to keep working.

It's a nice privilege to worry about such things, so overall I'm happy Smiley
162  Developer / Business / Re: Why Bundles and Steam Sales Aren’t Good for Most Indies on: December 01, 2011, 06:20:23 PM
Fortune favours the bold. My personal opinion is that if you're trying to satisfy an external criteria before satisfying the internal ones, you're destined for mediocrity, at best. If you want to create, you must derive energy first and foremost from your creative urge. That urge can (indeed must) derive inspiration from the outside world, including your audience, which will be transmuted inside of you into passionate energy, which is the only fuel for artistic creation.

Note that 'making money' is orthogonal to all of this. You can be a drug dealer, or you could be a fine chef creating amazing culinary experiences, and either one could end up rich or broke depending on their ability to sell their product, which is not really related to how they acquire/made it in the first place.
163  Jobs / Portfolios / Re: DON'T READ THIS POST if your game need good audio on: November 30, 2011, 11:02:56 PM
Very compelling ad Smiley
Nice website too.
164  Developer / Technical / Re: Lua scripting implementation in C# on: November 29, 2011, 08:38:45 PM
What follows is 'my way' and by no means 'the right way'(TM).

lua_newthread
lua_resume
lua_yield

Those 'r the C interface functions you can use.

You'd likely run the script in a single coroutine, and pause with yield whenever you need to. The trick is to remember to stay 'paused' until you've got the input you desire. IMHO the best way to manage that is with a stack of 'events'.

Code:
function Message (text)
  MessagePanel:set_text(text)
  MessagePanel:show_modal() -- This func doesn't 'return' until it has your input.
end

Then in your C++ (err... C#) code you'd do something like this:

Code:
int Message_panel_show_modal (lua_State * ls)
{
  luaL_checktype(ls, LU_TUSERDATA);

  Window * window = (Window*)lua_touserdata(ls, 1);
  WaitEvent * event = new WaitEvent;
  window->setHideCallback(WaitEvent::done, event);
  event_stack.push(event);
  return lua_yield(ls, 0);
}

Here you create a wait event and tell the window to end the event when it hides through the use of some presumed GUI event callback mechanism. An event is just an object that does something and says when it's done. So a script event might be:

Code:
class RunScript : public Event
{
public:
  bool run ( )
  {
    lua_pushthread(LUA, _myscript);
    return lua_resume(LUA, 0) != LUA_YIELD;
  }
};

Which as you see will only say it's done when the script is finished and not paused.
Then in your game loop somewhere:

Code:
// ...
while(rungame))
{
  // Render
  // GetInput
 
  //HandleEvents
  if(!event_stack.empty())
  {
    if(event_stack.top()->run())
      event_stack.pop();
  }
}

To summarize, here is the stack of events:

- NONE

Then put a 'run script' event on top of the stack:

- Run Script

It calls into your script which in turn calls into MessagePanel.show which puts a 'wait' event on top of the stack.

- Wait
- Run Script

Then the function yields, which allows the rest of your C# game loop to run. The next time that the event handler gets reached the top element is 'wait', which will keep returning 'false' (not done) until your MessagePane is hidden activating the callback which sets the event to done. When that time comes the 'wait' event is popped off the stack and it looks like this:

- Run Script

Which continues from where you last yielded, which was where you got input... etc, etc.

In practice there are a few more subtleties to consider, such as if an event is done very quickly you'll probably want to process more than one per render/input cycle. This can be managed by the run loop or maybe events themselves can tell us how to best run them.

That's the gist of it. Good luck.
165  Developer / Technical / Re: OpenAL locks on '__lll_lock_wait' on: November 27, 2011, 06:27:28 PM
I should release my audio engine when it makes some progress.  Tongue

Lockfree, granular, pipelined software DSP.  Just really feature-sparse at the moment.  (I'll probably add some spatialization/IAD processors soon)

Do that and lets make it a community effort. I'm writing such a library right now although I really just want to release my game for windows.
166  Developer / Technical / Re: alSourceUnqueueBuffers (iOS 5 + OpenAL) on: November 26, 2011, 10:38:25 PM
Ugh. I'm just in this thread to Shit on OpenAL...  Cool

No seriously, do submit bug reports, but don't expect them to be resolved in a timely fashion. You may wish to consider using AVAudioPlayer in the meanwhile, it's 'stupid' easy. If you need positioning for your continuous stream, then you may need to implement it yourself.

PS. I stumbled upon an open source (zlib or bsd style) audio library with an emphasis on separation of data and process a while back. It looked really promising, supporting many useful things out of the box including 3D position, but I can't for the life of me remember what it's called and haven't been able to google it. Anyone?
167  Developer / Technical / Re: OpenAL locks on '__lll_lock_wait' on: November 26, 2011, 03:59:48 PM
I just had a terrible experience with SDL_mixer and have been looking for alternatives for a while. I've come to the conclusion that I need to write my own. I really can't find anything reasonable and liberally licensed. I'll post here if I ever do, please share your search results too.

Good luck.
168  Developer / Technical / Re: The grumpy old programmer room on: November 26, 2011, 03:53:32 PM
imo SDL_mixer is quite easy to use and i've yet to find a bug there

Stupid interface, only one music channel (why?), crashes, crashes, crashes, popping and clicking, broken autoconf can't find anything. What a turd. I sunk 2 days into bugfixes only to discover that the output is clicking and popping and there is a crash somewhere in the audio thread. I could have written my own engine in that time.
169  Developer / Technical / Re: The grumpy old programmer room on: November 26, 2011, 03:44:54 AM
First I was like  Undecided
Then I was feeling  Lips Sealed
Later I was totally  WTF
Then I was like  Addicted
After I was like  Crazy
Then I was like  Epileptic
Later I was like  Angry
And now I'm just  Tired

FUCK YOU SDL_mixer! YOU WIN, I CANNOT FIGHT YOUR ABSURDITY ANY LONGER, PLEASE SPARE THE WOMEN AND CHILDREN, AND GO TO HELL AND DIE.  Screamy
170  Developer / Technical / Re: How to program Interpolation on: November 25, 2011, 06:45:20 AM
Nice.  Gentleman
171  Developer / Technical / Re: The grumpy old programmer room on: November 24, 2011, 06:46:26 AM
ZMzmamzZ!

Code runs nicely on OSX, iOS, and Ubuntu. But on Windows... ZMAMAGAGAAKJHGA!

First I spend a day getting SDL 1.3 to compile under mingw and recognize xaudio2. Fail. Then I download Visual Studio Express and build SDL under the VC++ compiler. Success. A bug in the D3D renderer causes some wonky errors, select OpenGL renderer instead. There is no OpenGL renderer. Fail. Hack SDL_config.h and rebuild. Success. Build game and run, texture not found. Fail. Use SDL_GL_SetAttribute. Success. In windowed mode there is video memory garbage interleaved in the display. Fail. Try running under software renderer. Fail. Time to sleep but I keep thinking about fucking video drivers. Fail.
172  Developer / Technical / Re: What's your favorite Python IDE? on: November 23, 2011, 03:50:46 PM
komodo edit is nice.
173  Developer / Technical / Re: Resources for learning C++ on: November 21, 2011, 06:28:42 AM
Quote
The whole thing (or rather the 5 sections that I've read) is an OP ed piece
And the FAQ isn't?

Despite it's haughty arrogance, the purpose of the FAQ is to provide answers. This document raises only problems, sometimes ones with trivial solutions and even going so far as to raise the occasional strawman, and never takes a moment to address possible solutions. There are plenty of real problems with C++, but this guy goes berserk suggesting that since const can be const_cast'ed around, it's 'useless'. There is never a genuine effort to address a problem with an eye for a solution, unless that solution is to not use 'disgusting' C++.

Quote
They're out of context, but there is no correct context for insults.
Heaven forbid he should hurt C++'s feelings.  Criticism doesn't have to be polite, and interpretations don't have to be charitable.  The tone is beside the point (I think it works quite well here, and makes the document rather more engaging than it otherwise might be - evidently it's more of an issue for you).

The tone indicates to me that has no intention of honestly presenting a point of view, but rather wishes to persuade me by any means necessary to come to his position. In technical (and most other) matters, a strong logical foundation for an argument makes vitriol and attack extraneous and even counterproductive. His tone signals to me that his emotion may override any good technical sense he has, and it frequently does throughout the document.

Quote
That you and I gained a lot of information from the article is incidental to the author's purpose, which is slander and FUD.
For FUD, sure, it's trying to persuade people of a point.  But informed uncertainty is surely better than ignorance?  slander specifically refers to the spreading of false statements, which isn't the case here.
Slander is perhaps the wrong word, but he certainly makes enormous leaps of logic that I find to be deeply flawed, by finding one flaw in a mechanism it leads him to conclude that it has no use whatsoever. Here is a sample of what he has declared 'useless' or 'creating more complex problems than it solves':

templates, constructors, destructors, exceptions, references, const, inline functions, private variables, protected variables, inheritance, multiple inheritance, operator overloading, function overloading.

I haven't even read the whole thing because I don't trust him. I read what he says about one topic, see that what he says is patently untrue (in regards to alias optimization of const variables for instance) and the rest of his points take on a dubiousness that makes it hard to swallow. I would find it a much more useful if he played devils advocate well, because he does raise some very valid points, but they're blurred out and dampened by the aggressive and shallow shots he takes at virtually everything in C++.

Quite simply he's so biased that I can't trust him. I have enough experience with C++ that I'm able to filter out much of the nonsense from the interesting valid points, but a beginner should not read this document as anything other than propaganda.
174  Developer / Technical / Re: Resources for learning C++ on: November 21, 2011, 02:21:54 AM
The FQA's tone is noticeably harsher and the content itself has statements that border on insults and ad-hominem attacks. I'm not denying that there is valuable information contained therein, but the author takes great pains to magnify the tiniest faults of the language and shows no sincere effort at educating the reader so that they can make an informed decision The whole thing (or rather the 5 sections that I've read) is an OP ed piece that has an agenda of dissuading you from using C++. That you and I gained a lot of information from the article is incidental to the author's purpose, which is slander and FUD.

EDIT: Here are some choice quotes that indicates the authors hostility. They're out of context, but there is no correct context for insults. BTW, they were found in only 2 or 3 sections in a matter of minutes.

Quote
Today C has inline functions (the FAQ probably doesn't consider the current C standard "straight", I wonder why). AFAIK they were back-ported from C++ together with const and other useless things.

Quote
Clearly people who don't understand the underlying implementation issues won't survive to live the miserable life of competent C++ developers

Quote
Maybe you can't expect more consistency from the promoters of a language than there is in that language itself

Quote
Not that it's very different from the rest of C++, but the colon syntax is just plain ugly.

Quote
"Theoretically, yes. In practice, no." Quite a nice summary of C++.

Quote
Seriously, C++ exceptions are a leading candidate for the title "the worst way to handle run time errors ever invented".

Quote
Let's have a closer look at this Named Parameter Idiocy.

Quote
If you ever get into the situation of promoting an especially disgusting product, such as the C++ programming language, there are better ways to handle it than get all excited. You can try and find a less disgusting product to center your money-making around, or you can just relax.
175  Developer / Technical / Re: Resources for learning C++ on: November 21, 2011, 01:31:00 AM
Quote

FAQ: In OO software, "the fundamental building block".

A class is a type - a representation for a set of states (much like a C struct) and a set of operations for changing the state (moving from one state to another). Classes are similar to built-in types in this sense (for example, an int holds a bunch of bits and provides operations like + and *).

FQA: That's a correct theoretical definition. It's equally applicable to all OO languages, but they are different when it comes to more specific, practical aspects of their particular implementation of classes.

How do I create objects? And what happens when they are no longer needed? Is it my job to figure out which ones are unused and deallocate them? Bad.

What happens if I have bugs? If I have a pointer to an object, can it be invalid (be a random bit pattern, point to a dead object)? It can? The program will crash or worse? What about arrays of objects and out-of-bounds indexes? Crash or a modification of some other random object? You call that encapsulation? Bad.

What happens if I change/add/remove a private value, without changing the interface? All code using the class has to be recompiled? I bet you call that encapsulation, too. Bad.

I don't like C++ classes.

This entire "FQA" is written with vitriol and an agenda of discrediting C++. There is nothing but snarky attitude on page after page. Obviously C++ has major problems, but whoever wrote this has no interest in anything other than slander.
176  Developer / Technical / Re: The happy programmer room on: November 20, 2011, 01:12:30 AM
FTGL does this interesting thing of simply rendering all the letters in the font into one big texture, then making each character a poly into that texture when it's time to draw text.

Why is that interesting?  I thought that was how everybody did it.

I render individual letters stored in static byte arrays.
177  Developer / Technical / Re: OpenAL locks on '__lll_lock_wait' on: November 19, 2011, 04:25:08 PM
Now it sometimes goes into a lock through alIsSource(). Seems like something bad happens somewhere and the next openAL call after that causes it to go crazy. Looks like I will have to put error checks after every single call.

And BEFORE every call too. This bit me very strangely too. I built a very solid game audio engine library over OpenAL with impeccable error checking habits, and yet some very strange errors popped up that 'shouldn't happen'. The error condition was checked after every OpenAL call and throw an exception if something was wrong, so I had no way of ignoring it. Still, strange things were happening. So I started checking the error condition before every call as well, and... WTF!?!?!?! Yes, errors were happening between calls to OpenAL.

It's a really shitty system overall, missing some key features, such as the ability to be notified on an event (ie. sample playback finished).

Anyways, look out for errors, and when instantiating the device, use the AL extension interface to find ALC_DEFAULT_DEVICE and ALC_ENUMURATION_EXT to make sure your getting a proper device.
178  Developer / Technical / Re: OpenAL locks on '__lll_lock_wait' on: November 19, 2011, 04:49:25 AM
There's definitely going to be at least one render thread to feed audio to the driver, I just don't know how you can deadlock on that. Smells like fishy shit to me, you shouldn't even have unbounded operations like mutex's on realtime priority threads.

Linux OpenAL has two implementations: ALSA and OSS. You might try using the other and see if that effects anything. Also try keeping extra close tabs on the OpenAL error state, I've had some weird error conditions magically pop out of a magical rainbow monkey's ass. Litter your code with calls to alGetError + alGetString, especially before you try modifying the listener. Another thing to ensure is that the context is not suspended.

In short, suspect everything, it's all out to get you...
179  Community / DevLogs / Re: Mysterious Castle - Party Based Roguelike on: November 19, 2011, 02:51:27 AM
That's a really nice feature.

How is the user interface coming along? That was the only major disappointment for me when I played one of your earlier versions (it was also a source of much confusion).

The interface is certainly much improved, in function if not appearance Tongue

Today I balanced a few spells, added pick-pocketing and lock picking, added elementals and angels, did a ton of playtesting and worked on a few minor bugs. Now comes the scary part. I'm backing up my system to 2 external disks + several redundant backups of critical source code and other creative efforts, wiping my macbook and installing OSX and Windows side by side.

then....

It looks great so far and I really hope you released Mysterious Castle for PC soon after the release Smiley

Time to port to Winblows.
180  Developer / Technical / Re: OpenAL locks on '__lll_lock_wait' on: November 18, 2011, 05:44:31 PM
OpenAL is retarded. While I'd normally recommend suspecting your own code if any problems arises, after a couple of weeks with OpenAL, I'm convinced it's a complete turd sandwich/giant douche.

Sorry for the bitterness, I hope you find some solution.

EDIT: I'm trying to think of reasons that AL would lock on that call. Seems like  it's updating something that the render thread is using, perhaps you should check to make sure that the render thread is not being interrupted anywhere? Are you streaming buffers in your own thread? Do you only access OpenAL functions from the main thread?

Also please tell the system you are running under. Considering pthreads, I'd guess Mac or Linux.
Pages: 1 ... 7 8 [9] 10 11 ... 26
Theme orange-lt created by panic