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.

DarkBASIC Professional Discussion / errors in Bm_tutorial_4

Author
Message
Shadow Legacy
15
Years of Service
User Offline
Joined: 20th Nov 2010
Location: Infront of my computer
Posted: 29th Nov 2010 13:17
http://www.thegamecreators.com/?m=view_product&id=2030&page=bm_tutorial_4

a total noob here, but I know enough to see basic errors so I'm doing this tutorial and will paste any errors I find


1.


should say





more to come soon I'm sure

DBPro noob here
Skype = Shadow-Legacy
http://shadow-legacy-script.webs.com/
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Nov 2010 13:31
Well spotted.

Shadow Legacy
15
Years of Service
User Offline
Joined: 20th Nov 2010
Location: Infront of my computer
Posted: 29th Nov 2010 15:24
isn't this bit of code and information a really bad thing to tell pure new coders? because this can be setup using the dbpro .exe setup, and so its just extra useless code?



http://www.thegamecreators.com/?m=view_product&id=2030&page=bm_tutorial_9

DBPro noob here
Skype = Shadow-Legacy
http://shadow-legacy-script.webs.com/
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Nov 2010 16:56
Not really. It's worth being aware of this command as it gets new users thinking about how their game might be displayed and some newcomers might not be aware that you can do this with code (as opposed to using the IDE settings).

Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 29th Nov 2010 17:25
That command allows us to change the resolution at at any time. If you want to give the users an option on what resolution to use you can change it in the middle of the program.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Nov 2010 17:36
Yes but it's worth noting that any Media you have loaded will be lost if you set the display mode mid-game! Make sure you either re-load or re-start the game afterwards...

Shadow Legacy
15
Years of Service
User Offline
Joined: 20th Nov 2010
Location: Infront of my computer
Posted: 29th Nov 2010 18:33
cool thanks, also grog you know my basic knowledge of this language maybe you do to bax I don't know, what should I try to make next?

DBPro noob here
Skype = Shadow-Legacy
http://shadow-legacy-script.webs.com/
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th Nov 2010 10:25 Edited at: 30th Nov 2010 10:26
I started making a game early. I learned a lot from trying to finish a game completely, but try to keep it simple or there's more of a chance you'll get stuck or bored.

Try to think of the kind of game you'd like to make and then start with the basics...

[Plan your game]
-Style (IE.2D or 3D, platform, shooter...)
-Objectives (How does the player win?)
-Scoring (How does this work?)
-Bonuses (What added incentives might there be?)

[Plan your code]
-Setup
--This is where you load objects and set up arrays etc.

-Menu
--This can be simple to start with like:


-Game loop
--This is where your actions take place. Try to break it up:
---Get user input
---Move player according to input
---Move enemies
---Move other stuff IE.environment
---Display HUD
---Display results (IE.sync)

-Functions/subroutines
--These are handy to keep simple and generic, for example:


[Take it one step at a time]
Don't try to have a finished game right from the start. Get your game engine working well first using boxes and spheres (maybe coloured red for enemies if necessary). One mistake I often make is to start with the media rather than the engine. I've made dozens of sets of media for game engines I've never got working properly!!

Shadow Legacy
15
Years of Service
User Offline
Joined: 20th Nov 2010
Location: Infront of my computer
Posted: 30th Nov 2010 13:34
thanks for that baxslash, nice mini tutorial there, well I've been trying to think on this, and I think I'd like to build a small 3d rpg game, based on the middle ages (old idea I know) because that would teach me about 3d, text commands, modelling, sound commands, player input, and many other things, I've made a very basic camera, that works really well, I'd need to make modifications to make it work for a rpg, but its still a nice bit of code, so I think I'll start on that


camera code:


//load image "media\terrain.bmp",1
//prepare matrix texture 1,1,4,4
commented this out for the sake of if you use it

DBPro noob here
Skype = Shadow-Legacy
http://shadow-legacy-script.webs.com/
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th Nov 2010 13:53
Looks like you're getting stuck in already. Well done.

One small thing that might help keep your games running quickly is to store some values as variables (if you are using functions you might need to make some of them global).

One example of this is "screen width()" and "screen height()". I almost always start my code with something like this near the top:

That way I'm not calling the functions every time I want to paste a sprite or some text on screen.

I do the same for mouseclicks/mousemove/keystate etc.

Shadow Legacy
15
Years of Service
User Offline
Joined: 20th Nov 2010
Location: Infront of my computer
Posted: 30th Nov 2010 14:26
ok, what will I need to do this project? I've used the examples in DBP to make a camera suitable for this, but how can I make the maps and things? I have no clue where to start with that

DBPro noob here
Skype = Shadow-Legacy
http://shadow-legacy-script.webs.com/
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th Nov 2010 14:42
Since you're going the 3D route I would start by looking at collision systems (I always use sparky's dll/plugin as it is fantastic, free and much better than the native commands). If you haven't got it already get it and some good examples here:
http://forum.thegamecreators.com/?m=forum_view&t=95770&b=7

Have a play!

Shadow Legacy
15
Years of Service
User Offline
Joined: 20th Nov 2010
Location: Infront of my computer
Posted: 30th Nov 2010 14:50 Edited at: 30th Nov 2010 15:00
will do thanks

is their any free programs you'd recommend? to make it easier to do this, because I had a look at a height map, and don't have a clue how I'd do that with paint lol

DBPro noob here
Skype = Shadow-Legacy
http://shadow-legacy-script.webs.com/

Login to post a reply

Server time is: 2026-07-21 13:38:47
Your offset time is: 2026-07-21 13:38:47