Page 1 of 2
Caution: Extreme noobishness.
Posted: Thu Feb 19, 2009 9:09 pm
by ibly31
Okay, so I am really new to C++ in general, but I am not a noob to programming in general( I have done VB,TIBASIC,javascript,actionscript, and even... Assembly!). I found this API set called DarkGDK, ever heard of it? Well, it plugs in to directx/direct3d. It's helpful and easy, but it just doesn't have what I need. I like to dive in over my head(my first c++ project was gonna be a GTA clone.) the functions are very bad if you want to do collisions in 2D/3D. My question is, does anyone know of a good library for VC++ that is runs on directx? Should I stick with DarkGDK?
Re: Caution: Extreme noobishness.
Posted: Thu Feb 19, 2009 9:50 pm
by MarauderIIC
What about the DirectX SDK? Isn't that a possibility?
Re: Caution: Extreme noobishness.
Posted: Thu Feb 19, 2009 9:56 pm
by ibly31
Yeah, I had to download it for DarkGDK to work. What language does it use? 'Cause I would like to stick with C++, is there a way to integrate C++ with directx?
Re: Caution: Extreme noobishness.
Posted: Thu Feb 19, 2009 10:25 pm
by wtetzner
DirectX works natively with C/C++.
DirectX SDK
Re: Caution: Extreme noobishness.
Posted: Fri Feb 20, 2009 6:34 am
by ibly31
I heard it's really hard, like 30 lines of code to make a cube rotate. Is it powerful enough? Are there functions like... CheckIfInIntersect() where it checks if two objects are intersecting?
Re: Caution: Extreme noobishness.
Posted: Fri Feb 20, 2009 9:30 am
by Joeyotrevor
No, you have to do that yourself.
Re: Caution: Extreme noobishness.
Posted: Fri Feb 20, 2009 12:21 pm
by MarauderIIC
So you're looking for a DirectX
wrapper? Well, not many wrappers I've heard of do collisions, although there might be one out there somewhere.
Hmm... lots of questions, lots of tutorials, though
(google).
Re: Caution: Extreme noobishness.
Posted: Fri Feb 20, 2009 1:31 pm
by Falco Girgis
ibly31 wrote:I heard it's really hard, like 30 lines of code to make a cube rotate. Is it powerful enough? Are there functions like... CheckIfInIntersect() where it checks if two objects are intersecting?
It's only "hard," because it's powerful enough to do anything. The libraries that are easy and do things for you are
not powerful by definition and characteristics.
Compare the easiness of learning to use a scripting language to the power of using something like C/++. Your analogy is off.
Re: Caution: Extreme noobishness.
Posted: Fri Feb 20, 2009 2:42 pm
by ibly31
I guess. To do 2D sprites, do you actually have to reverse engineer the viewport to display the sprite properly? With your project(@GyroVorbis) are you doing C++ with a library, to do the graphics?
Also, I've done assembly, for a calculator, so I understand the hardware and memory addresses, but I don't get the concept of pointers... If it's pointing to the value, why not just call a function on the value itself itnstead of a pointer to the value?
Re: Caution: Extreme noobishness.
Posted: Fri Feb 20, 2009 4:05 pm
by MarauderIIC
Because passing-by-value makes another copy of the object on the stack. So not only does it use more memory (especially if you have a large class or array), but you also can't directly modify the original value. Related: Why use pointers instead of references? You can reseat a pointer (make it point at a different object of the same type), which you can't do with references, hence references are safer, but more limited (general rule: use reference instead of pointer if you don't need a pointer).
Also, no, we don't have to reverse engineer the viewport. It's actually drawn in 3d but from the top down, Z-axis determines draw order.
Edit: Although if you want to pass an int or other basic type and do some calculations on it or with it and return a value, pass-by-value is just fine.
Re: Caution: Extreme noobishness.
Posted: Fri Feb 20, 2009 8:36 pm
by ibly31
Oh, my dad explained alot about it, like how if you use the direct object, it will make a new empty version of it on the stack, copy the values into the new object, and lets you muck about with that, so your not actually messing with the object. He also explained memory leaks(allocating memory for a object with "new" and not deleting it).
I have a few questions. How do you link up a game system to the computer to make games for it? Wheres the software to make homebrew games? Can I make games for the GameCube? And can the dreamcast do 3D?
Re: Caution: Extreme noobishness.
Posted: Fri Feb 20, 2009 10:36 pm
by MarauderIIC
ibly31 wrote:Oh, my dad explained alot about it, like how if you use the direct object, it will make a new empty version of it on the stack, copy the values into the new object, and lets you muck about with that, so your not actually messing with the object. He also explained memory leaks(allocating memory for a object with "new" and not deleting it).
I have a few questions. How do you link up a game system to the computer to make games for it?
Depends on the system. DC you use either a coder's cable, a broadband adapter, or burn some CD's.
Wheres the software to make homebrew games?
On the internet :) Check Google, I couldn't tell you. I just make changes and hope they work with the DC version.
Can I make games for the GameCube?
Probably. Might require a mod chip and a LAN adapter (I don't recall, did they come with one?)
And can the dreamcast do 3D?
Yes. Quite well.
If there's somebody here that does homebrew for the GC they might be able to help you more.
Re: Caution: Extreme noobishness.
Posted: Sat Feb 21, 2009 12:12 pm
by ibly31
hmm. What exactly is a coders cable, and what language are GC games programmer in?
And, since you are an admin, I'm guessing you are part of the team. Which one are you? Marcel? Peter?
Re: Caution: Extreme noobishness.
Posted: Sun Feb 22, 2009 12:49 am
by MarauderIIC
I'm Alex. That's okay, nobody really knows me due to my no video apperances.
http://elysianshadows.com/project/team
I'm 22 though, not 21, just haven't gotten it updated yet :)
A coder's cable is essentially a serial cable from PC to DC. As for GC homebrew, no idea, probably C. Maybe someone else can help you (but I don't know of any of our members who have GC homebrew experience).
Re: Caution: Extreme noobishness.
Posted: Sun Feb 22, 2009 8:43 am
by ibly31
Yeah, I'll probably end up looking up to you more than any one else, cause you are the only one who really answers... :D
I'm so excited, I figured out how to use arrays, they are annoying because they are heavily typed. In lua:
MyArray = {1,2,"ibly",iblyObject, anotherArray}
In c++:
objectname arrayname[] = {object, object2}
I also have yet another question, how do you embed LUA into your games, for debugging use? Like if I have an item I'm testing, and It takes too long to walk across the map, I could open up the lua prompter in game "makeItemAt(400,200,2)"