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 / How to Scroll on DarkGDK 2D Screen.

Author
Message
vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 7th Aug 2011 00:21
Hey guys, i want to know if its possible, in a screen with... 600x600 i reach the X: 100 and Y: 600 and when i go Y:601 it scrolls, or vice versa with X.

Is it possible.

If not how can i make a 2D game but in a 3D space with camera moving only horizontal

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 7th Aug 2011 01:19
To do it 2D, simply have each sprite of the scene move instead of the character, until he gets to the edge of the map.

As far as a side scrolling 3D scene, yes I have done it. You make a 3D scene with objects and move the character along it while the camera follows looking down the Z-Axis. If you want an example, look at:
http://forum.thegamecreators.com/?m=forum_view&t=166885&b=5
it's in DBP, but it still gives you and example. It uses Evolved's Shader for DBP, so you may have to download it to get it to work if you want to compile. Otherwise, the .exe should simply run.

The fastest code is the code never written.
vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 7th Aug 2011 22:37
Well, im pointing to make a game just like yours like a 3D Space but the camera just moves in the X axys and the Y axis when player changes his position in those.

Im thinking using a 3rd person camera code but it will see the player from the side.

Think it will work xD


Question: How did you make the 2D Graphics like the window and stuff?

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 7th Aug 2011 22:55
Quote: "How did you make the 2D Graphics like the window and stuff?"


i think you're referring to a GUI, this could be pretty complex, messy and in alot of situations ends up being slow, it needs to be highly polished, using drawing commands by GDK is impossible, they're too slow, you could either use sprites, which might not provide flexibility, and can still be slow, or, there is a very nice looking GUI written up by Diggsey, i don't think it supports DarkGDK, but you could ask him to support it, you can find the thread on the "Work In Progress" board, it's called "TopGUI"

vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 8th Aug 2011 00:34
Well i was not asking for that but are pretty the same..

Ok so dbSprite wont work?

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 8th Aug 2011 04:24
If you are going to make a "side scroller" using 3D, you have to use 3D all the way (except for menu stuff of course).

@Hassan:
My GUI is pretty fast. You should check it out. I'm currently using it in my most recent project X Flight:
http://forum.thegamecreators.com/?m=forum_view&t=183217&b=8
There are only a few minor quirks with it, but it's fast enough for most games. Let's face it, most games don't use the GUI all the time anyway, and when they do use it, it's when the game is in a pause condition.

About the game vitinho444 is making: The windows of the castle are 3D objects with gaps in them (the window). I simply loaded some objects for the walls and made some for the floor segments and loaded the wall segments with the window and duplicated them as many times as needed. I put them into 3D space the way you would place bricks together to build a house. As the character moved, the camera would move with him until he got to the edge of the map.

The fastest code is the code never written.
vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 8th Aug 2011 11:14
Yes but if i can ask you..

How can i make this camera movement with character? im getting problems xD.

About your GUI i already knew that you had it but it's just too good and im trying to give my best around here xD

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 14th Aug 2011 01:03
Moving the camera is simple. Assume you are moving your character in the XY plane, position the camera at the character's X and Y coordinates and make your camera's Z coordinate something like -50.0 or whatever gives you a good look at the scene. Each frame, reposition the camera and *poof* you are moving with the character. When you get to the edge of the map, make a condition that doesn't let the camera move beyond that X value (so you don't see a blank area beyond the map).

The fastest code is the code never written.
vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 14th Aug 2011 10:52
how did you make the room / level

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 15th Aug 2011 01:01
Pick a method..... This one I used a text file to give me the data. I had certain letters to mean floor and other letters to mean monster. I did it this way so that I could quickly make levels. I don't recommend using this because it's limited in the size. I would make an editor to place all the objects in the level and keep track of what is where. Have an interface to give you the ability to choose what objects go where and then when you are done, save the info so that your game can take that info and make a level. The editor is recommended because it will make level making much faster.

About the editor. Make it as simple as possible. Use the arrow keys to move your camera in the XY plane and have a dummy object at the focal point (where the object would go). I recommend "snaping" the objects like walls and floor blocks so that they only exist within a 10x10 (for example). I would make a simple selector for the objects like cycling through them each time you pressed the [spacebar] and puts them in place when you press the [enter] key. Once you have the objects of your level placed, save the level in a way that can tell your game how to make it.

The fastest code is the code never written.
vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 22nd Aug 2011 00:24
well, i like the idea of a editor.. but to make one at the begining is harder than make the game it self xD


but thanks for the ideas.

Just asking.. how to make that file thing system?

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 22nd Aug 2011 04:57
Just look at the file-- it's a text file. You have to look at the source code to understand what each of the letters do. Basically the letters represent objects in the level. When you load the level, it reads the file and makes the different objects. It's VERY rudamentary, so it has almost no flexibility. Making an editor is a really good idea if you plan on having several levels. I do an editor for all my level based games-- except that one because it was my first one in DBP.

I even made a GUI editor so game making is easier and faster.

The fastest code is the code never written.
vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 31st Aug 2011 22:42
well, i think im not that kind of pro to make a Editor... but thanks anyway

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5

Login to post a reply

Server time is: 2024-10-02 19:18:17
Your offset time is: 2024-10-02 19:18:17