Page 1 of 2

MapFusionC app that loads map in C++ with tut & source

Posted: Mon Jul 24, 2006 6:42 pm
by 0mfc0
Ok me and DarkMetal decided to learn c++ a few days ago so we made a little app that loads map in c++

We also decided we should share this knowledge with everyone so we made a tut. We are still working on it so there are going to be updates.

Post if you think we should add anything
:D :D :D

Credits:
Anthony
LuxuriousMeat
and any one else that helped us

Source Included

Posted: Mon Jul 24, 2006 6:50 pm
by T1xAnton
tutorials submissions lol.. Looks good.

Posted: Mon Jul 24, 2006 6:57 pm
by xbox7887
You must be pretty smart with all of that "knowlage" :?

Posted: Mon Jul 24, 2006 6:59 pm
by IRONMAN.
xbox7887 wrote:You must be pretty smart with all of that "knowlage" :?
OMG, that tickles my tummy

Posted: Mon Jul 24, 2006 7:00 pm
by 0mfc0
Lmao, i was in a rush i fixed it though

If this is supposed to be in tutorial submissions please move it there. :wink:

Posted: Mon Jul 24, 2006 7:03 pm
by Devilshadow934
Map Fusion C++ wrote:This application failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
Yes, I redownloaded, no it didn't work.

Congrats

Posted: Mon Jul 24, 2006 7:06 pm
by 0mfc0
hmm... well all i can say is follow the tut and do it your self :( . The app is just what is should look like when done

Posted: Mon Jul 24, 2006 7:27 pm
by Devilshadow934
We shouldn't have to follow a tutorial to open a map in an editor that is inferior to what we currently have.

Posted: Mon Jul 24, 2006 7:30 pm
by LuxuriousMeat
how could you know if its inferior if you cant open it? ad it isnt a map editor moron its for learning C++ i mean the topic has tut in the topic name

Posted: Mon Jul 24, 2006 7:55 pm
by killingforfun
a tutorial is not to make the best app out there.. its to give a basic understanding of the language and its application to the subject (in this case Halo programming)..

This will be a very helpful tutorial for anyone lookin for a start in C++ HAlo Prorgammin.


---KFF

Posted: Mon Jul 24, 2006 8:06 pm
by TheTyckoMan
This belongs in Tutorial submissions....I'll let it stay here 24 or so hours...I'll have to take a look at the tutorial, thanks for taking the time to write one up =)

Posted: Mon Jul 24, 2006 8:51 pm
by slayer410
Devilshadow934 wrote:
Map Fusion C++ wrote:This application failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
Yes, I redownloaded, no it didn't work.

Congrats
Whatever, this works fine for me. Maybe you just have a crappy computer. :roll: Haha jk. :wink:

Posted: Tue Jul 25, 2006 12:08 am
by Trulife8342
Good job on this man.

Posted: Tue Jul 25, 2006 2:10 am
by r4nd0m
slayer410 wrote:
Devilshadow934 wrote:
Map Fusion C++ wrote:This application failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
Yes, I redownloaded, no it didn't work.

Congrats
Whatever, this works fine for me. Maybe you just have a crappy computer. :roll: Haha jk. :wink:
I had the very same problem with my clients, i could make and run the application fine, but when i gave it out to people they got that very same error. It all boiled down to that they didnt have C++ installed. ON installing C++ you get dll's which allow you to run these applications.
this gives a bit of info on the subject http://msdn2.microsoft.com/en-us/library/ms235291.aspx

Posted: Tue Jul 25, 2006 7:16 am
by Nikolas_
Great job! </sarcasm>. When making tutorials, including a source for an example program is usually a good idea. And just so you know, Windows isn't the only OS in the world. And C++ is not only used on Windows. What you're using is VC++.NET which is Windows only.

"Ok first things first C++ is not the easiest language out there so you might want to know a little about the structure and format of a C++ program." Bawahahaa. When introducing the C++, you might want to start on a simple command line application. Many of you should be familiar with the following:

Code: Select all

#include <stdio.h>

int main(int* argc, char* argv[])
{
   printf("Hello world!\n");
   return 0;
}
Also, you seem to read MetaSize and MetaOffset the wrong way arround. I think that MetaOffset is before MetaSize in the IndexItem struct (Or H2Tag as you call it). You might want to check out my docs on the map structs that I started to gather up, because I couldn't find any on the internet. You can find my docs from http://koti.welho.com/plahtin6/files/h2mapformat.xml. They're mostly gathered from Ch2r and libhalo2, and they might contain wrong information. If someone spots something that is not correct in the docs, please let me know.

And by the way, MetaSize and MetaOffset are only 4 bytes (32 bit) long each, so you don't need 8 byte (64 bit) variables for them (Int64), but instead you should use unsigned int (uint32, defined: typedef unsigned int uint32; ).

Also, correct punctuation would be nice. :wink:.
r4nd0m wrote:I had the very same problem with my clients, i could make and run the application fine, but when i gave it out to people they got that very same error. It all boiled down to that they didnt have C++ installed. ON installing C++ you get dll's which allow you to run these applications.
this gives a bit of info on the subject http://msdn2.microsoft.com/en-us/library/ms235291.aspx
C++ is a programming language. Are you reffering to .NET runtime libraries perhaps? Visual C++ might also need some runtime libraries.

Posted: Tue Jul 25, 2006 7:45 am
by 0mfc0
I did not write the "Before You Begin" document Tain7ed did. And i also update it too Nickolas's liking :roll:

It has Source included too. :wink:

Posted: Tue Jul 25, 2006 9:54 am
by DarkMetal
Ok before you guys move this to Tutorial Submissions, we're going to redo alot, and try to fix up some of it. (By the way, thanks Nick, that's some very useful information)

Sorry... it was releassed before I knew :?

Posted: Wed Jul 26, 2006 4:18 pm
by Shalted
Well, I though I'd take a look at it, because I'm a connoisseur of C/C++ (Although I'm not a big fan of microsoft's convoluted version of it, although I do perfer it's inline ASM syntax). You guys have chosen probably the worst way of opening a map in C/C++. You could have defined a structure full of all the values in the header, Initialized a variable and pointed the Br to read 2048 bytes to the variable's memory location. Which can be done for every structure in the game(Err... almost). And due to the inorginazation of the project, Strictly MS code is mixed with Map code, although there is very little map code, reducing portibility.

Not to mention the whole .Net DLL library issue, and it tapping into Visual Basic Functions, which further reduces portibility.

I'm not saying don't program at all, I'm just saying to make an actual attempt at learning the language first, before you go releasing any source code, or binaries for that matter.

PS. Nikolas, do you have much expirence programming in C/C++?

Posted: Thu Jul 27, 2006 4:25 am
by Nikolas_
Shalted wrote:PS. Nikolas, do you have much expirence programming in C/C++?
Yeah, I know C/C++ well enough to make useful programs.

And, 0mfc0 and dark|metal, please, Nikolas or Nik, not Nick.

Posted: Thu Aug 10, 2006 4:34 pm
by Nikolas_
Okay, since only moderators can reply to threads in the tutorial submission section, I'll just post here. I see that you've made an other tutorial ( http://files.halomods.com/viewtopic.php?t=55869 ) and I'm sorry to tell you that that one is lame too. First of all, C++ it not a program, as suggested here "First open up C++, Now goto File->New Project.". C++ is a programming language. You are most likely refering to Microsoft's IDE (Intergrated Developement Environment) called Visual C++. Second, your tutorial has loads of spelling mistakes, and it has a ridiculous formatting. Third, it lacks many useful things like detailed explanation of subroutines and other essential C/C++ tasks. It's not too wise to first introduce a Hello World application and right after that jump into Microsoft's jungle of namespaces and other ridiculous gizmos that Microsoft calls Visual C++.

Also, this is bad:

Code: Select all

#include <stdio.h>
void main()
{
	printf("Hello World\n");
} 
This is good.

Code: Select all

#include <stdio.h>
int main()
{
	printf("Hello World\n")
	return 0;
}
Why not just link to a real, non-bloated C++ tutorial like this: http://www.cplusplus.com/doc/language/tutorial/