[QUOTE=Night-Eagle;33694370]Change "if x and y" to "if !x or !y", sell. You would require a 1,000 page document to adequately define "unmodified", and then no one would be arsed to use your software from fear of litigation. Also, a lawyer would probably rip that license up as it is written. You give rights "without restriction", and then you apply restrictions to those rights?
There is already a license for this intent, and it's called the GPL. If someone wants to make a full-blown game based on your work that you're afraid of getting stolen, they can contact you and obtain special permission under a separate license agreement. The GPL would be perfect in this scenario.
Not trying to be mean, but the law is very unforgiving from what I can tell. I'd hate for someone reading this thread to have a Lugaru pulled on them.
If art assets can cover your ass, however, then go for a full-blown MIT license.[/QUOTE]
Taking this into consideration and writing a much better version.
Well this fucking IDv3 library has never heard of null-termination, and doesn't want to provide a length of the string.
[IMG]http://img802.imageshack.us/img802/7761/audiophilia201112121947.png[/IMG]
[QUOTE=Yogurt;33695469]I'm thinking of packing this up and releasing it for general use. I feel like a UI library for XNA is needed 'round these parts.
Want Y/N[/QUOTE]
yes
[editline]12th December 2011[/editline]
[QUOTE=thisBrad;33695564]Well this fucking IDv3 library has never heard of null-termination, and doesn't want to provide a length of the string.
[IMG]http://img802.imageshack.us/img802/7761/audiophilia201112121947.png[/IMG][/QUOTE]
Shift all text in the song area to the right by ~2 pixels
What's the best way to take keyboard input and write it to a string in XNA? Just make a separate instance for each possible key?
[QUOTE=amcfaggot;33695525]I've never heard of a good reason to use states.[/QUOTE]
Pretty much every game tutorial I've read swears on it. IT'S ALL I KNOW MAN!!
I'll release my UI engine if you guys promise not to look at the source :v:
[QUOTE=Yogurt;33695594]I'll release my UI engine if you guys promise not to look at the source :v:[/QUOTE]
Ok
[QUOTE=ROBO_DONUT;33694957]It matters because I've [i]never [/i]gotten a mono 'port' to actually [i]work[/i].[/QUOTE]
I agree with ROBO_DONUT on this one, it's a horrid experience compared to native.
Example (Vapor in mono):
[img]http://j.mp/sg70sV[/img]
right-click menu is broken, doesn't follow system theme, and doesn't go away when click off of it. mousewheel doesn't scroll, my status is hidden behind "Online" (rendered as a black box), and the window doesn't shrink properly to taskbar. And apparently it's render order is messed up when I attempt to take a screenshot of it.
When it works just fine in windows.
Also I'm gonna need some time to fix this up--it ties into a lot of other stuff in my engine.
[QUOTE=Mr. Smartass;33695587]What's the best way to take keyboard input and write it to a string in XNA? Just make a separate instance for each possible key?[/QUOTE]
You could compare the GetPressedKeys() from the current frame with the one from the last frame and add any characters that are in the current one but not last frames'
[QUOTE=NovembrDobby;33695619]You could compare the GetPressedKeys() from the current frame with the one from the last frame and add any characters that are in the current one but not last frames'[/QUOTE]
I just have a KeyInputManager that I call BindKey() to. I specify a Keys enum, a lambda that should be called when the key is pressed, and booleans that determine whether it's on press or release, whether it's only ON press or constantly DURING press, etc. I like it. A lot.
[QUOTE=Yogurt;33694440]I thought it was you but I wasn't sure. I'm sorry Jookia :([/QUOTE]
that's okay i still love you
[QUOTE=thisBrad;33694525]Anyone know a Character encoding library? GNU iconv doesn't work. I need to convert UTF-16 to ASCII.[/QUOTE]
UTF-16 to ASCII? Well, that's kind of easy, but you shouldn't be doing it. Why? Because Unicode isn't ASCII. It contains tons of languages and gylphs that just aren't in ASCII.
But if you're COMPLETELY AND ABSOLUTE SURE that your stuff only contains letters that are from the ASCII character table, Garry's method MAY work.
You should keep your program Unicode compatible. Personally I store all my strings in UTF-8 which is ASCII compatible, then convert them for API purposes.
But as for a library, iconv does work. If you want me to dig up some code I can, but if you're willing to spend a few more megabytes on library storage, I can't recommend Boost.Locale enough. It deals completely with Unicode, and has code page conversions and code page to Unicode and back functions.
[QUOTE=NovembrDobby;33694595]Because what I've been invited to requires Mac, Linux and Windows versions [IMG]http://fi.somethingawful.com/images/smilies/wink.gif[/IMG][/QUOTE]
:(
[QUOTE=NovembrDobby;33694632]Yeah
It's not official or anything yet though, it depends how C++ goes.[/QUOTE]
Congrats.
[QUOTE=reedbo;33695442]Can anyone else working with SFML2 post the source of an example game working with a state engine? I can't really seem to grasp the concept of a using a state engine for a game and google really isn't helping me.[/QUOTE]
Shameless plug, but I did probably what you want with SFML2 and C++ for the Bacon Game Jam. [URL="https://github.com/Jookia/dplane"]Here's the sources.[/URL]
[editline]13th December 2011[/editline]
[QUOTE=Yogurt;33695594]I'll release my UI engine if you guys promise not to look at the source :v:[/QUOTE]
You could always be open source like Windows is. You know, as long as you license it so you people can't legally modify or redistribute it. Microsoft loves open source (they obviously avoid the term 'free software')
I recently decided to move away from C# and XNA and start using C++ with SFML and and as a first project I decided to rewrite a simple particle system I wrote for XNA.
Probably not the best idea.
For the most part, the transition from C# to C++ hasn't been too hard. I have ran into a problem though and need some help.
What I have is a Particle class and a Particle_System class. The Particle_System class creates a list of particles and adds particles to it with a generate function.
What I want to do is iterate through the list to update and remove any particles that are dead.
I found this when searching and tried out the first answer.
[url]http://stackoverflow.com/questions/596162/can-you-remove-elements-from-a-stdlist-while-iterating-through-it[/url]
This is what I got.
[code]void Particle_System::Update()
{
std::list<Particle*>::iterator it = parts.begin();
while(it != parts.end())
{
*it->Update();
if (*it->life_left <= 0)
{
parts.erase(it);
}
it++;
}
}[/code]
But Visual C++ is giving me the following errors.
error C2678: binary '!=' : no operator found which takes a left-hand operand of type 'std::_List_iterator<_Mylist>' (or there is no acceptable conversion)
error C2440: 'initializing' : cannot convert from 'std::_List_iterator<_Mylist>' to 'std::_List_iterator<_Mylist>'
Thanks.
[QUOTE=Jookia;33695651]
You could always be open source like Windows is. You know, as long as you license it so you people can't legally modify or redistribute it. Microsoft loves open source (they obviously avoid the term 'free software')[/QUOTE]
No it's a joke because it's fucking terrible coding.
[QUOTE=reedbo;33695593]Pretty much every game tutorial I've read swears on it. IT'S ALL I KNOW MAN!![/QUOTE]
There's a joke in this about game developers making tutorials and not games, but I just can't wrap good words around it.
States are pretty awkward if you have any lengthy experience with a large engine prior to working on your own game though.
[QUOTE=Jacen;33695669]But Visual C++ is giving me the following errors.
error C2678: binary '!=' : no operator found which takes a left-hand operand of type 'std::_List_iterator<_Mylist>' (or there is no acceptable conversion)
error C2440: 'initializing' : cannot convert from 'std::_List_iterator<_Mylist>' to 'std::_List_iterator<_Mylist>'.[/QUOTE]
What's the definition of parts?
Don't use states.
Hey, my automerge!
[QUOTE=Jookia;33695651]
Shameless plug, but I did probably what you want with SFML2 and C++ for the Bacon Game Jam. [URL="https://github.com/Jookia/dplane"]Here's the sources.[/URL]
[/QUOTE]
[code]
/*
Somewhere deep down inside, I feel bad for having this if statement.
Maybe it degrades the game's performance by 200% due to operator
overloading? Maybe I could've put a note 'DO NOT USE WITHOUT A STATE SET',
and allowed the program to SEGFAULT. But then my program wouldn't work 100%
of the time. I'd wake up in the night screaming, imaging endless bug
reports of tinkerers forgetting to set the state. Windows sending error
reports of my program to Microsoft, for them to know the crime I'd of
committed.
No.
Not on my watch.
So with all my might, I cast an if statement forged from uninitialized
memory itself, to protect my program from a case that will probably never
happen.
*/
[/code]
:v:
I remember this from multiple WAYWO's ago.
[QUOTE=Yogurt;33695675]No it's a joke because it's fucking terrible coding.[/QUOTE]
I was pouring a little fuel over an extinguished flame war. Just a little.
[editline]13th December 2011[/editline]
[QUOTE=amcfaggot;33695716]Don't use states.
Hey, my automerge![/QUOTE]
I can't seem to wrap my head around not using states. Just have everything in the main loop?
Here's a new version of my license, complete with a special area for terms and a little thing that lets certain people do whatever they want.
[quote]Copyright (C) 2011 by ZenX2
Terms:
the "Software": this software and associated documentation files
the "Author": the creator of this software and all miscellaneous assets
the "Original Files": all files provided by the Author, including this
license, without any changes after distribution by the Author
"Modify": alter or change any of the software or miscellaneous assets
"Modified": files with any differences from the Original Files
the "Unmodified Software": the Original Files
the "User": a person who has obtained a copy of the Unmodified Software
through legal means or directly from the Author
Permission is hereby granted, free of charge, to any User, to deal in the
Software with certain rights, including the
rights to use, copy, and/or Modify copies of the Software, distribute Modified
copies of the Software with the permission of the Author of the Unmodified
Software, excluding the right to sell or otherwise profit from the
Software without the permission of the Author of the Unmodified Software, and
to permit persons to whom the Software is furnished to do so, subject to the
Conditions.
Permission is hereby granted, free of charge, to any User with explicit
permission from the Author, to do as the User pleases with the Software.
Conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.[/quote]
[QUOTE=Jookia;33695709]What's the definition of parts?[/QUOTE]
parts is the Particle list.
Or did you want something else?
[QUOTE=amcfaggot;33695694]There's a joke in this about game developers making tutorials and not games, but I just can't wrap good words around it.
States are pretty awkward if you have any lengthy experience with a large engine prior to working on your own game though.[/QUOTE]
I'd just like to get something working that can draw to the screen and receive key events. I can't wrap my head around it though.
[QUOTE=Jacen;33695753]parts is the Particle list.
Or did you want something else?[/QUOTE]
The code.
[QUOTE=Jacen;33695669]I recently decided to move away from C# and XNA and start using C++ with SFML[/QUOTE]
[img]http://www.facepunch.com/avatar/281559.png?garryis=awesome[/img][img]http://i.somethingawful.com/forumsystem/emoticons/emot-hf.gif[/img][img]http://www.facepunch.com/image.php?u=95045&dateline=1323738619[/img]
[QUOTE=Yogurt;33695634]I just have a KeyInputManager that I call BindKey() to. I specify a Keys enum, a lambda that should be called when the key is pressed, and booleans that determine whether it's on press or release, whether it's only ON press or constantly DURING press, etc. I like it. A lot.[/QUOTE]
That does sound pretty neat but he wants text entry as opposed to keys bound to functions
[QUOTE=ZenX2;33695745]Here's a new version of my license, complete with a special area for terms and a little thing that lets certain people do whatever they want.[/QUOTE]
No offense, but I wouldn't use a license found on an Internet forum made in the last 15 minutes.
[QUOTE=Jacen;33695753]parts is the Particle list.
Or did you want something else?[/QUOTE]
The C++ definition. As in, the declaration.
[QUOTE=Jookia;33695781]
The C++ definition. As in, the declaration.[/QUOTE]
Right, sorry.
This is the declaration in the header.
[code]std::list<Particle> parts;[/code]
[QUOTE=Jacen;33695831]Right, sorry.
This is the declaration in the header.
[code]std::list<Particle> parts;[/code][/QUOTE]
[code]std::list<Particle> parts;
std::list<Particle*> it;[/code]
Simple type mismatch.
[QUOTE=Jookia;33695844][code]std::list<Particle> parts;
std::list<Particle*> it;[/code]
Simple type mismatch.[/QUOTE]
Thanks. It's working now.
I'm gonna put my UI library on github. Anyone interested in contributing?
[QUOTE=Yogurt;33695932]I'm gonna put my UI library on github. Anyone interested in contributing?[/QUOTE]
What language?
Sorry, you need to Log In to post a reply to this thread.