Skip to main content
GameDev.net gamedev.net
🔒 Locked

Example for 3D RPG?

Started by Ripiz Aug 29, 2009 at 7:04 AM 20 replies 4.8k views
Original Post
Ripiz
Ripiz
Hello. I've been learning C# for a bit, however it can be easily decompiled so I decided not to do it, till I find a way to protect my work, but doubt there is fully safe way. So I decided to switch to C++ (VC++, but I think it's same thing). Could anyone link me to some game source, example, demo or etc. where I could learn how to load model, draw scene, detect collision with terrain and etc. Also if someone could give live support on IM would be nice too. Thank you in advance. P.S. Please don't link to books/tutorials, they don't help me =/ EDIT: DirectX9 preferably
Smurfwow
Smurfwow
Quote:
Original post by Ripiz
P.S. Please don't link to books/tutorials, they don't help me =/


I don't understand. if not them, then what are you looking for?

Ripiz
Ripiz
A small source of game, where I could trial and error. Maybe comment or two.


I red same tutorial 10 times, I only used to get "read again from people" but I wasn't able to do a thing mentioned in tutorial, they simply don't help me, however simple "Q&A" in IM helps
Erik Rufelt
Erik Rufelt
Switch back to C#, and you can use these: http://creators.xna.com/en-US/education/starterkits/. Full source code for simple games (and some not so simple), with comments.
Here is a direct link to an RPG (full source code): http://creators.xna.com/en-US/starterkit/roleplayinggame, though it is not in 3D. (It doesn't matter, you can learn 3D from one program, and RPG from another, and then combine them when you have learned how they work).
Here are 3D game examples (full source code): http://creators.xna.com/en-US/education/catalog/?devarea=6.
And here is a direct link to collisions with heightmaps in 3D (full source code): http://creators.xna.com/en-US/sample/collision3dheightmap.
Ripiz
Ripiz
C# Can be easily decompiled. That's the reason why I don't want to use it...
C++ hardly gets decompiled, so it's almost safe to use it
MeshGearFox
MeshGearFox
Switch back to C# and decompile an existing 3D RPG, then?
eedok
eedok
Quote:
Original post by Ripiz
C# Can be easily decompiled. That's the reason why I don't want to use it...
C++ hardly gets decompiled, so it's almost safe to use it

just wondering why is decompiling such a big issue? C++ code can just as easily be disassembled, and from experience if you want to hack something it's not difficult to find the area to modify.
Ripiz
Ripiz
Disassembled, not decompiled. It will be only ASM code, which is much harder...

MeshGearFox, I don't want to be thief
Captain P
Captain P
Quote:
Original post by eedok
it doesn't answer the why question, as ASM isn't that much harder to hack than MSIL, also if I remember correctly there's a lot of ASM->C converters out there, which would make it no harder to hack than obfuscated MSIL

Indeed... I think that worrying about this is not only useless, it's also hindering your progress as a programmer. The real dedicated hacker/cracker/whatever will have automated these things anyway, so MSIL or ASM or whatever wouldn't really matter.

Either way, for what it's worth, you can look into obfuscation tools. We've used them with Java (but mostly to compress .jar files, not because of security concerns).
Ripiz
Ripiz
I still want to learn C++. Could anyone contact me to help me out with 3D DirectX programming?
nerd_boy
nerd_boy
Right, not wanting to continue derailing the thread about how people go about disassembling/decompiling/reverseing C++ code, but here goes.

If you're using VC++, I'm presuming you're using VC++.NET. .NET can be disassembled/decompiled/whatever. Have a look-see at Reflector. It can often be useful to look at someone else's work to see how they did something, without 'stealing' their work. If you really want to 'protect' it, there are obfuscators out there for .NET that you could use, not sure how well they'd work, though.

I'm not sure your concerns about protecting your work are warranted. If you're concerned about the project as a whole, then you'll have various IP rights to it or whatever(country of residence depending). If you're more concerned about protecting a unique manner of implementing a bubble sort or what have you, I definately state that your concerns are unwarranted. Other than for security purposes, I see little reason for 'protecting' ones work in this fashion.


Getting back on topic, as for source code for games, I don't have any one site/source to suggest. You could check out this list of open source video games on wikipedia, or browse SourceForge for some there.

As for live support, you can always go to the IRC channel. Either #gamedev@AfterNET or select the Online Chat from the Community menu above.

Best o' luck.
Ripiz
Ripiz
Found few which I'd like to check out. However I'm having problems compiling them =/
It says Cannot open include file: 'world.h': No such file or directory", however it's included in header files =/
Lord_Evil
Lord_Evil
You could still have a look at software written in another language (like C#, Jave, Python etc.). True, the syntax is sometimes very different, especially for low level tasks, and different frameworks are often used but the general algorithms still apply.

From a high level, the language doesn't matter, but the algorithms and concepts do. Language and frameworks just provide a way to implement those. You should try and learn the concepts first, which is a thing that you can achieve looking at programms written in any language you are familiar with.
If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!
Ripiz
Ripiz
I did small game using C#, but I don't want to attempt anything bigger, as it can be decompiled easily, C# differs a lot from C++ in my eyes...
JParishy
JParishy
What, may I ask, is the big deal if your code is easy to decompile? You should be more focused on learning the core programming concepts that any language can provide you than worrying about some stupid kid that might look at your source. You are still learning, it isn't like you are going to produce a AAA game and have to worry about people stealing your trade secrets.

Also, it could take months to fully understand the source code for a large project that you didn't create yourself (or have a hand in). Attempting to go through an entire full game in order to learn basic concepts is going to be very difficult. More so than sitting down and just getting the most that you can out of a tutorial or book. They exist to help explain things to the reader. The full source code to a game isn't going to help you much if you don't already understand the concepts somewhat. You might not be able to even recognize them in the code. Seriously, I would suggest giving tutorials and books another shot.
jtagge75
jtagge75
No offense, but judging from your posts I don't think any code you produce at this stage in your career anybody is going to want to steal anyway. If you really can't learn from a book/reading you are going to find its going to be quite hard to ever get a job. If source code is the only thing you can use then XNA and its game packages are going to be about your best bet.
Ripiz
Ripiz
Asking people works too.
Ebooks I've red usually had 1 line of code per 10 pages of reading, in average. While reading doesn't teach you anything. Code with few comments helps me the most, as I can see how to write the code, and comments help me to understand what's going on and what it does
c_olin
c_olin
The text between the code examples are just as important, but perhaps not as exciting to read. I would encourage you to give some books another chance and keep an open mind. Source code from other projects (even professional games) are not good learning material.

And while you are still learning, protecting your code is the least of your worries.
Ripiz
Ripiz
There is community www.byond.com People can make 2D games there using it's own programming language. I learned it only by playing with other people's work. Tutorials didn't help me

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.