[QUOTE=Rohans;33915693]Can some of you test this for me? [url]http://dl.dropbox.com/u/675786/wat.zip[/url][/QUOTE]
[img]http://j.mp/tjicMF[/img]
Doesn't work on linux. :(
[QUOTE][IMG]http://i.imgur.com/BYqRC.jpg[/IMG][/QUOTE]
Switched over to SDL and C++
[QUOTE=Kepler;33916761]Switched over to SDL and C++[/QUOTE]
You should use SFML with C++. It's much better.
[QUOTE=sim642;33916840]You should use SFML with C++. It's much better.[/QUOTE]
Hmm, nah, let me just check th-
[B]-Can handle four joysticks with up to 7 axes and 32 buttons[/B]
Oh my goodness, that's what I've always wanted. I should make a NSMBWii clone so my friends can play.
[QUOTE=Kepler;33916761]Switched over to SDL and C++[/QUOTE]
rule 1 of c++ is don't use c libraries in c++
[QUOTE=swift and shift;33916919]rule 1 of c++ is don't use c libraries in c++[/QUOTE]
What is wrong with C libraries? If there was a better library you would use that one instead. C++ can use C libraries just fine.
[QUOTE=swift and shift;33916919]rule 1 of c++ is don't use c libraries in c++[/QUOTE]
Lua is a C library.
Guess the makers of LÖVE have done f*cked up!
[QUOTE=ief014;33917074]What is wrong with C libraries? If there was a better library you would use that one instead. C++ can use C libraries just fine.[/QUOTE]
[cpp]
void foo()
{
throw 123;
}
void bar()
{
blah_blah_t* ptr = allocate_some_resource_from_the_c_library();
foo();
clean_up_resource(ptr);
}
[/cpp]
[QUOTE=swift and shift;33917235][cpp]
void foo()
{
throw 123;
}
void bar()
{
blah_blah_t* ptr = allocate_some_resource_from_the_c_library();
foo();
clean_up_resource(ptr);
}
[/cpp][/QUOTE]
Some kind of smart pointers could be used here, but still it's better to use C++ libraries in C++ if they're available.
[QUOTE=swift and shift;33917235][cpp]
void foo()
{
throw 123;
}
void bar()
{
blah_blah_t* ptr = allocate_some_resource_from_the_c_library();
foo();
clean_up_resource(ptr);
}
[/cpp][/QUOTE]
If there isn't a C++ binding or a better alternative I don't see the issue.
[QUOTE=swift and shift;33916919]rule 1 of c++ is don't use c libraries in c++[/QUOTE]
Oh god I've been doing it all wrong... I'm using OpenGL in C++!
[QUOTE=swift and shift;33917235][cpp]
void foo()
{
throw 123;
}
void bar()
{
blah_blah_t* ptr = allocate_some_resource_from_the_c_library();
foo();
clean_up_resource(ptr);
}
[/cpp][/QUOTE]
Thats the reason why you always wrap your c resources in c++ objects, not why you don't use c libraries.
Has anyone had a look at [url=http://8bit.neverdaunt.com/]N8[/url]? It is shocking, he's a worse programmer than Notch is made out to be, personally I can't see how he can even navigate the source anymore.
[quote][url=http://i.imgur.com/RGqUq.png][img]http://i.imgur.com/RGqUq.png[/img][/url][/quote]
He writes everything to the network as [b]strings[/b] and there's absolute no standard naming conventions.
Attach a packet sniffer to terraria and you'll be shocked.
Last time I looked at N8 was written in Visual Basic.
Also only 8 months ago my networking was alot worse, you can still navigate a project like that.
And it looks like it still is.
[URL]http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.compilerservices.projectdata.aspx[/URL]
[IMG]http://puu.sh/bEW8[/IMG]
Yay, GUI :D
(I think I'm on the omegle blacklist. Each time I connect I have to enter a captcha. Annoying.)
[QUOTE=TVC;33917540]Has anyone had a look at [url=http://8bit.neverdaunt.com/]N8[/url]? It is shocking, he's a worse programmer than Notch is made out to be, personally I can't see how he can even navigate the source anymore.
He writes everything to the network as [b]strings[/b] and there's absolute no standard naming conventions.[/QUOTE]
Problem navigating that source?
Bitch please, I have 520 almost undocumented lines of assembly in my project, using magic numbers every 2 lines and I can navigate that
Reminded me I should probably disable interupts before using protectected mode
[IMG]http://i.imgur.com/eCtTE.gif[/IMG]
Added a player sprite, movement, collision, wall climbing and the little jump he takes every step.
[QUOTE=TVC;33917540]Has anyone had a look at [url=http://8bit.neverdaunt.com/]N8[/url]? It is shocking, he's a worse programmer than Notch is made out to be, personally I can't see how he can even navigate the source anymore.
He writes everything to the network as [b]strings[/b] and there's absolute no standard naming conventions.[/QUOTE]
Still, more of a completed game than minecraft.
[QUOTE=Lexic;33917454]Thats the reason why you always wrap your c resources in c++ objects, not why you don't use c libraries.[/QUOTE]
yeah exactly. You don't just use a c library straight, which is what i was meaning by that comment
[editline]27th December 2011[/editline]
and I don't see raii or any of that crap in the code i was originally replying to:
[quote][img]http://i.imgur.com/BYqRC.jpg[/img][/quote]
This morning I realized I wrote Steam API bindings for HL2:SB fucking ages ago, so I'm pretty much just gonna move that over to lopensteamworks and extend it.
70's p. king
[QUOTE=TVC;33917540]Has anyone had a look at [url=http://8bit.neverdaunt.com/]N8[/url]? It is shocking, he's a worse programmer than Notch is made out to be, personally I can't see how he can even navigate the source anymore.
He writes everything to the network as [b]strings[/b] and there's absolute no standard naming conventions.[/QUOTE]
Yo, i've been working with the creator of N8 for a while now (i host their forums and i'm also the tech support, and I even helped run the booth at IGF last year), and the code in that client is horrible as fuck, not gonna lie. But that's also because it's been 3 different projects up until now (Neverdaunt -> Monster planet -> Neverdaunt:8bit*), yet it surprisingly has very little "bugs". I've been slowly teaching him various design techniques to help improve the infrastructure, and when we try porting the entire game over to unity sometime next year i'll help him with a full rewrite of the code.
(I've never gotten a decompile of the N8 client working correctly. It's coded in such a way that it creates thousands of errors whenever I try :v:)
[B]A little more info about how "fucked up" some of the things behind the scenes really are:[/B]
* Every entity on the server is classified as an "item", and shares the same table in the database
* * This means that everything in the game shares an ID list (i don't know how it even works)
* All equipment is a "hat", with the only thing separating different types is a mount point specified at the end of the file.
* If your windows installation has ever had a virus, N8* probably won't run. That's how dependent it is on various windows libraries.
[B]one thing that is done right in my opinion:[/B]
* All models are stored in plain-text behind an automatically created png thumbnail, which is used as the model's display in the inventory
and the [url=http://8bit.neverdaunt.com/wiki/index.php?title=Tronics_(Guide)]in-game electronic programming[/url] is always fun.
[t]http://i.imgur.com/SL6vO.png[/t]
I believe that function is an idiot-proof NPC that sells/buys fish for a price that's dynamically chosen at the beginning of each day, that can communicate with any amount of users simultaneously.
If you want to know anything else about it, feel free to PM me as i'm pretty knowledgeable about N8.
[QUOTE=HeroicPillow;33918588][...] the code in that client is horrible as fuck, not gonna lie. [...][/QUOTE]
mother of god
Added gravity and jumping.
[IMG]http://i.imgur.com/xa5MN.gif[/IMG]
On a roll but the code is a mess.
[QUOTE=swift and shift;33918110]You don't just use a c library straight, which is what i was meaning by that comment[/QUOTE]
I think you're overgeneralising here. POSIX's C API is brilliant and doesn't require any C++ wrapping.
I just realized something
In my memory manager, when a lot of pages needs to be allocated, with how it works now its a lot faster to allocate them in bulk
However
I would need to allocate memory to store the addresses of all pages ...in the memory allocation function [img]http://www.facepunch.com/fp/emoot/psyduck.gif[/img]
Working on Bowser behavior.. there's a lot to test with the original rom.
[img]http://i.imgur.com/sVgNn.gif[/img]
Ha-hah!
Well, I found out that setlocale has a habit of freeing its old locale's memory when a new locale is set.
Thought I'd just post my work here, too. YouTube vid because I still need a better recorder.
[video=youtube;Ix_BwV5_GiE]http://www.youtube.com/watch?v=Ix_BwV5_GiE[/video]
It's a simple platform racer where you need to get from the start to the exit.
It's highly customizable as you can change almost everything, from graphics to tile mechs. (Even tho there are no tile mechs yet.)
Also, [URL="http://www.novaember.com/br/"]here[/URL]'s the site. (Gonna redesign it later)
PS. This is actually the map editor.
Revision 2 of my [URL="https://gist.github.com/1521650"]mingw package installer[/URL] script.
[php]#!/bin/sh
(env sed --version &> /dev/null || (echo -e "GNU sed not found, attempting to install package:\n";\
(exec 3>&1 4>&2; sed_error=$( { mingw-get install msys-sed 2>&4 1>&3; } 2>&1 ); exec 3>&- 4>&-;\
if ($sed_error); then echo "Could not install GNU sed, aborting.."; exit 1; fi))) && sed_ver_str=\
$(env sed --version) && sed_ver=$(echo $sed_ver_str | sed -n 's/.*version \([0-9\.]*\).*/\1/p') &&\
echo "GNU sed is already installed. (version $sed_ver)" && mingw-get update && PACKAGES=$(mingw-get list\
| sed -ne "s/\(^Package\:\)[[:blank:]]\?\([[:alnum:][:punct:]]\+\).*$/\2\\n/p")\ && echo -en \
"\nInstalling packages:\n\n$(echo $PACKAGES | tr ' ' '\n' | sort -d | pr -3 -atT)\n\n" && echo -en\
"Package Count: $(echo $PACKAGES | tr ' ' '\n' | wc -l -- | tr -d '[:space:]' && echo)\n\n" && read\
-p "Press return to install" -s && mingw-get --verbose=2 install $PACKAGES[/php]
I found out that mingw-get always returns 0 as its exit status no matter the result, which is unfortunate because I had to do a shit load of stream redirection hacks to detect if it outputs a message on stderr, sigh.
I also just noticed that I spent all of last night working on a feature that I don't need. I already had it install all packages, and that check for sed wasn't that crucial to begin with.
I really need to reconsider my habits.
Sorry, you need to Log In to post a reply to this thread.