Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Help loading object.

Author
Message
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 26th Jul 2007 07:54 Edited at: 26th Jul 2007 08:10
Hello im new to DGDK and C++.

When i run this. Just a solid black screen appears and it freezes and wont load the object. When it freezes i hit the Esc key. About 10% of the time when i hit the Esc key the object will load right as it ends.

If anyone can write me a quick load object example id love them forever.

This does the same thing too.



Learning C++ thanks DGDK
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 26th Jul 2007 15:50 Edited at: 26th Jul 2007 15:50
Hi Crazy Programmer try this:



Chalkey
17
Years of Service
User Offline
Joined: 25th May 2007
Location:
Posted: 26th Jul 2007 16:03
Hey

First of all your for loop is not implemented properly (its missing a bracer - and to load two objects like you have you wouldnt really use a for loop). Also your while loop has two outward facing bracers and your missing one on the void DarkGDK method.

In terms of the DarkGDK the main game loop should look like this...


In terms of your C++ here are a few sites that you should look at to help you on your way.

http://www.cplusplus.com/doc/tutorial/
http://www.cprogramming.com/tutorial.html
http://www.softlookup.com/tutorial/c++/index.asp


Finnaly, try this the code for program. Am guessing bike.x is in the folder media\bike\bike.x and same for bike2.x.


Chalk
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 26th Jul 2007 18:37
Thanks guys, Yalls code didnt work at first when i added this it worked.


Quote: "In terms of your C++ here are a few sites that you should look at to help you on your way.

http://www.cplusplus.com/doc/tutorial/
http://www.cprogramming.com/tutorial.html
http://www.softlookup.com/tutorial/c++/index.asp"


Thanks! Maybe allready knowing DBP will help alot.


Learning C++ thanks DGDK
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 26th Jul 2007 20:32
Crazy Programmer my code works but when you post something in the forum with double slash only one appears...loool

Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 26th Jul 2007 20:42 Edited at: 26th Jul 2007 20:44
Quote: "Thanks! Maybe allready knowing DBP will help alot."


definitely will... also, knowing a lil c++ will help too

when i first looked at your code, my first uestion was, what the he## is he doing, and why is he doing it like this

but hey... i'm no c++ expert either so...

just follow Chalkey's advice and check out a few of those learning resources, if you're really serious... or possibly get a book or two...

c is very much like BASIC... except for the pointer stuff, and a lil syntax difference... should be easy to pick up...

c++ is c with classes... easy to pick up, but it's gonna require a different mindset to really use it effectively...

you've gotta start thinking objects instead of functions...

but for the time being, coding in straight c fashion will get you off to a running start with the GDK... and, doing it this way, you can directly copy code from DBPro, change the syntax, and have it work...

good luck

--Mike
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 26th Jul 2007 21:07
Quote: "you can directly copy code from DBPro, change the syntax, and have it work...

good luck"


Thanks, iv allready got a couple of my programs from DBP converted to DGDK

I have read about 3 C++ books, but when i was reading them i never tried to compile what i was reading. So it never really went into my head, bad mistake.


Learning C++ thanks DGDK

Login to post a reply

Server time is: 2024-11-16 18:10:38
Your offset time is: 2024-11-16 18:10:38