So I've decided to work on a project.
I was thinking of using Unity3D as an engine for a sidescroller digging game. Something similar to, if you've played Dig Dug, you know what the core will be. I'll incorporate some Terraria-esque aspects into the game too.
I'm not looking for anything unique, I just want a project to work on. If it turns out to be successful, I'll port it to iOS and Android, since awhile back I got free full licenses for that.
I'm excited to work with 3D for once though. I might be better off coding my own engine but I'm not 100% interested in that.
[QUOTE=Jookia;36095254]Where's the problem at? Rendering? Encoding?[/QUOTE]
Rendering.
When I define _UNICODE, as soon as I call FT_Load_Char (i think) my program prints some garbage and gets "killed" with a broken callstack (not sure if i used that term right) so valgrind can't pinpoint where it broke, making it incredibly difficult to fix.
[img]http://bit.ly/KtaWOb[/img]
The [code][1;33mxxdata/fonts/gnutypewriter.otfxxxdata/fonts/DidactGothic.ttfxxxdata/fonts/Cousine-Regular-Latin.ttfx[/code]
is the garbage data that's actually being printed from my program. Most likely from freetype; it doesn't print anything when _UNICODE is undefined.
NFace::GetGlyph starts at line 214 and ends at 225, so valgrind reporting the end of the file (516) is really unhelpful.
I'm having a really hard time pinpointing the problem; the whole engine is [url=https://github.com/naelstrof/Astrostruct]github'd[/url] and [url=http://farmpolice.com/astrostruct/]heavily documented.[/url]
The whole unicode implementation comes from a bunch of macros in [url=https://github.com/naelstrof/Astrostruct/blob/master/src/NEngine.hpp]NEngine.hpp[/url] that let me turn it on and off. With the macros existing in [url=https://github.com/naelstrof/Astrostruct/blob/master/src/NText.cpp]NText.cpp[/url]. Do you mind sifting through it and telling me what stupid things I'm doing?
y'know starting a project with a completely alien program isn't the best thing to do at 2 in the morning
[QUOTE=Naelstrom;36095501]Do you mind sifting through it and telling me what stupid things I'm doing?[/QUOTE]
You seem to be using wide characters. That's no closer to Unicode than non-wide characters are.
You have an option to turn Unicode off? Wat.
But really, I'm looking in to this. I'm not accustom to awful build systems that don't detect when I change files.
Hey Jookia - in GMod for translations I'm using the java .properties method..
[code]new_game=Commencer une nouvelle partie
find_mp_game=Trouver des jeux multijoueurs
options=Param\u00e8tres
quit=Quitter
manage_addons=G\u00e9rer les modules compl\u00e9mentaires
mounted_games=Contenu de jeux externes
demos_and_saves=D\u00e9mos & Sauvegardes
news=Actualit\u00e9s
steam_workshop=Steam Workshop
[/code]
Do you think I'm gonna have any problems in any languages using this method? This is proper unicode right?
I'm parsing ingame to a wstring (and for html I'm parsing into a multibyte char string - which is displaying properly as far as I can tell)
Korean:
[code]new_game=\uc0c8 \uac8c\uc784 \uc2dc\uc791
find_mp_game=\uba40\ud2f0 \ud50c\ub808\uc774\uc5b4 \uac8c\uc784 \ucc3e\uae30
options=\uc635\uc158
quit=\uc885\ub8cc
manage_addons=Addons \uad00\ub9ac
mounted_games=\ud0d1\uc7ac \ub41c \uac8c\uc784
demos_and_saves=\ub370\ubaa8 \ubc0f \uc800\uc7a5
news=\ub274\uc2a4
steam_workshop=\uc2a4\ud300 \uc6cc\ud06c\uc20d[/code]
That looks pretty much the way to go about it. You're specifying code points. I would be a little worried if you ever wanted to go over FFFF, as there's [url=https://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Planes]higher planes[/url], which generally cause stuff like wchar on Windows to use a surrogate. Something like 𧀕 is U+27015. I'd also like to know if combining characters work. "T̅̿" is 3 code points.
I'm, pretty sure you can also do
\uxxxxxxxx (or maybe that's \Uxxxxxxxx ?)
Ah, then it sounds fine.
[QUOTE=garry;36095899]Hey Jookia - in GMod for translations I'm using the java .properties method..
[/QUOTE]
Won't Valve let you use Steam Translation Server?
Learning OpenGL is going well!
[IMG]http://i48.tinypic.com/bj71op.png[/IMG]
The actual achievement is impossible to tell from the picture alone. After tinkering for hours, I managed to get an FPS style camera working. You can move forwards, backwards and strafe using wasd and look around with the mouse!
[QUOTE=Naelstrom;36095501]Do you mind sifting through it and telling me what stupid things I'm doing?[/QUOTE]
Alrighty, I will now never second guess my rad C++ skills.
[cpp] #define _T(x) L"x"[/cpp]
You're making all string literals 'x'. That's not useful if you want to use text in your program. Unless you just call everything 'x'. Do this:
[cpp] #define _T(x) L ## x[/cpp]
I now get
[code]FREETYPE WARN: Failed to load data/fonts/gnutypewriter.otf!
FREETYPE WARN: Failed to load data/fonts/DidactGothic.ttf!
FREETYPE WARN: Failed to load data/fonts/Cousine-Regular-Latin.ttf![/code]
Also you haven't added error handling if Face == NULL, so NText.cpp:280 is segfaulting.
[QUOTE=SteveUK;36096609]Won't Valve let you use Steam Translation Server?[/QUOTE]
I'd rather use some open system like crowdin and .properties files than use STS
What's exactly wrong with STS? It's a pretty good system, every language has at least 2-3 active translators.
Just wondering, atm im creating a vector of vertex, uv and normals and passing these 3 lists to the gcard seperately.
Would there be much/any performance improvement to have a vertex class that holds all 3 values and just create 1 list holding the vertex class and pass that?
[QUOTE=Jookia;36096798]
[code]FREETYPE WARN: Failed to load data/fonts/gnutypewriter.otf!
FREETYPE WARN: Failed to load data/fonts/DidactGothic.ttf!
FREETYPE WARN: Failed to load data/fonts/Cousine-Regular-Latin.ttf![/code][/QUOTE]
Oh no.
[cpp]if (FT_New_Face(FTLib,(const char*)File.c_str(),0,&Face))[/cpp]
I see what's happening: wchar_t is UTF-32 on my platform, so it's trying to pass a path where each ASCII letter is prefixed with tons of zeros. The error doesn't help as it's printing out the wide path, not what FreeType sees.
So maybe there's a wide version of FT_New_Face? Oh. [URL="https://lists.gnu.org/archive/html/freetype/2006-09/msg00029.html"]There's not.[/URL]
That's okay though, because it just calls fopen, and in Unix fopen can just take a converted UTF-8 argument. Everything's going to be okay I guess- Oh. Windows doesn't do that?
Microsoft don't support Unicode filenames with the standard fopen. It only accepts ASCII. Good news, that code you have would work on Windows if you had _MBCS defined.
This is just my opinion but I would not base my unicode code off of windows wide char is utf16, otherwise it's ascii setup. There's no reason to be one or the other, just be specific about what encoding your strings are in when you're passing them around. I've actually been doing this recently and I went with utf8 everywhere's example, converting to utf32 to send to freetype and only worrying about utf16 right next to windows code. I think you're going to have to go non standard to open files with unicode names with windows, so do that elsewhere and load your font with freetype from memory. I try to use utf16 windows functions explicitly but I define UNICODE anyway to make sure, but don't use UNICODE in your own code.
Yeah, that's what I thought, but then I did this in a portable way:
[img]http://i.imgur.com/N3hZz.png[/img]
(Excuse the bad font, I was trying to find ANYTHING that supported Japanese.)
Hopefully I'll get the code cleaned up in a bit, then send it off.
[QUOTE=Kopimi;36092689]waywo: marketing and advertisement
be sure to check out my pipboy wallpaper on the android market everyone. so far i'm getting mostly positive reviews and it seems that everyone who has a chance to use my app enjoys it![/QUOTE]
I don't get you.
I ASKED him how the app was doing and he gave a good response.
Do you enjoy being a jerk that much?
[QUOTE=Jookia;36096999]Oh no.
[cpp]if (FT_New_Face(FTLib,(const char*)File.c_str(),0,&Face))[/cpp]
I see what's happening: wchar_t is UTF-32 on my platform, so it's trying to pass a path where each ASCII letter is prefixed with tons of zeros. The error doesn't help as it's printing out the wide path, not what FreeType sees.
So maybe there's a wide version of FT_New_Face? Oh. [URL="https://lists.gnu.org/archive/html/freetype/2006-09/msg00029.html"]There's not.[/URL]
That's okay though, because it just calls fopen, and in Unix fopen can just take a converted UTF-8 argument. Everything's going to be okay I guess- Oh. Windows doesn't do that?
Microsoft don't support Unicode filenames with the standard fopen. It only accepts ASCII. Good news, that code you have would work on Windows if you had _MBCS defined.[/QUOTE]
tl;dr UTF-8 is the bomb, Unicode in Windows is a ghetto
[QUOTE=Richy19;36096953]Just wondering, atm im creating a vector of vertex, uv and normals and passing these 3 lists to the gcard seperately.
Would there be much/any performance improvement to have a vertex class that holds all 3 values and just create 1 list holding the vertex class and pass that?[/QUOTE]
What do you mean you're passing these 3 lists separately?
Made simple division-based perspective projection.
[img_thumb]http://i.imgur.com/LEbIb.gif[/img_thumb]
[QUOTE=Overv;36097763]What do you mean you're passing these 3 lists separately?[/QUOTE]
As in passing each as a different attribute
Null I just realized that my catapult made it into your promo video :v:
[img]http://puu.sh/x5gc[/img]
[editline]1[/editline]
..This one is also mine
[img]http://puu.sh/x5gk[/img]
[editline]1[/editline]
[img]http://puu.sh/x5gy[/img]
...
[QUOTE=Richy19;36097899]As in passing each as a different attribute[/QUOTE]
Do you mean you're creating a VBO and copying each attribute list to it one by one, like this?
[img]http://puu.sh/x5ky[/img]
If so, the performance difference is negligible.
[QUOTE=GameDev;36098052]Null I just realized that my catapult made it into your promo video :v:
[img]http://puu.sh/x5gc[/img]
[editline]1[/editline]
..This one is also mine
[img]http://puu.sh/x5gk[/img]
[editline]1[/editline]
[img]http://puu.sh/x5gy[/img]
...[/QUOTE]
Yup, your shit is awesome!
Someone made a set of crazy contraptions yesterday, keywords: entry delta world
[editline]27th May 2012[/editline]
An important feature coming in an update is going to be a more detailed level browser, with screenshots and descriptions at the very least, and possibly comments, etc.
[QUOTE=icantread49;36098218]Yup, your shit is awesome!
Someone made a set of crazy contraptions yesterday, keywords: entry delta world
[editline]27th May 2012[/editline]
An important feature coming in an update is going to be a more detailed level browser, with screenshots and descriptions at the very least, and possibly comments, etc.[/QUOTE]
You should have authors or 'made by', I want to be famous :v:
Also I made a pinball machine, it sucks but ill make a video anyway
[thumb]http://i.imgur.com/6Ut9D.png[/thumb]
Well, that was surprisingly hard.
I think lounging in the sun with an iced drink is making me lazy and incompetent, because it took me hours to get anything to show up at all.
With open.gl and some help from Overv, I finally got openGL drawing triangles.
Then this happened:
[img]http://s.horsedrowner.net/NANO/Desktop/201205271734387035-1280x720.png[/img]
I've got a bit of a break from exams at the minute, so I thought I might as well learn some javascript. Currently writing a Lisp interpreter:
[IMG]http://i.imgur.com/m6vaY.png[/IMG]
Bear in mind that I currently know neither Lisp nor javacript, so this may not go too well.
[editline]27th May 2012[/editline]
I'm not even sure if that's valid Lisp, I'm just going off Wikipedia for the moment.
[QUOTE=horsedrowner;36098881]With open.gl and some help from Overv, I finally got openGL drawing triangles.
Then this happened:
[img]http://s.horsedrowner.net/NANO/Desktop/201205271734387035-1280x720.png[/img][/QUOTE]
I'm not trying to be offensive, but I scrolled down for this, and just had some urge to say "Fuck you." to my computer screen upon seeing that image.
Sorry, you need to Log In to post a reply to this thread.