Scrolling, collisions, rotation

BlitzMax Forums/BlitzMax Beginners Area/Scrolling, collisions, rotation

zamfir(Posted 2006) [#1]
Ok, I bought BlizMax because DarkBasic seemed a little complicated and I'd heard some great things about Blitz... Perhaps it was Blitz3D I was reading about, because there don't seem to be any rudimentary functions native to all 2D game design, namely tile based scrolling, collision detection, and map rotation (All of which I had already been able to do with DarkBasic.) I asked if anyone knew of these things in another thread and was underwhelmed with the response. We should not have to re-invent the wheel every time we want to do these things, these things should be STANDARD in any "game design" language... Am I crazy? I asked if anyone knew of an example of a scrolling tile-based engine where the environment rotated around the player, and received a resounding "no." This is directed at the whole community. Bueller? Bueller?


H&K(Posted 2006) [#2]
This is a continuing argument. How much should a language have already done for you, and how much should a language allow you to do it yourself.

Let say (For example) that I wan to write a fps in Bmax, now it doesnt have the drop and play ability of FPSC (say), does that mean that it isnt fit for the job?

Some wopuld say yes, some would say no. The basic answer is that Bmax makes you start from a lower level than FPSC. However, that means I have greater control over what can be done with the game.

In the case of a tile engine, there propably are a few already written for Bmax out there, but then I would be tied to whatever the writter of that engine considered useful, and unable to add things simply and easerly.

I dont like DBPro, but it does have a lot of addins to direct you in a certain way, and this is a good thing if the level of entry that you want to programing is that one. I personaly want to write own tile engine, so prefer the bare bones speed of Bmax.

These things should not be "standard", in a game language, they should be standard in a game "engine" which is not the same thing.

Now your tile engine question, it might slow your develompent down from what you were expecting, but could you write it your self? Write down what you want it to do, and stage by satge add to it , until it does all these things?


Gabriel(Posted 2006) [#3]
When these things are STANDARD, these things are bad. We're not all making the same game, so why would we all want our scrolling to work the same way? Why would the hordes of people who aren't using any scrolling want the developers to spend time developing a scrolling tilemap system anyway? If my tilemap doesn't rotate and yours does, do I want mine slowed down checking rotations that I never do?

BlitzMax is a programming language and it expects you to do a lot of programming to make a game. If that's not your thing, that's fine, maybe GameMaker is more up your street.

If no one's written a scrolling tile-based engine and released it already, I doubt anyone is going to write one for you just like that. I'm sure loads of people would be happy to help you with any problems you had if you began writing your own though.


zamfir(Posted 2006) [#4]
If a language is designed for the specific purpose of making 2D games, you can bet your ass I expect tiling, rotation and collision detection standard. Which is not to say you can't do it yourself in a non-standard way but how many times must we invent the wheel? I didn't buy C++ because as a graphic designer (and amateur programmer), I need help with the programming end, particularly in graphics and physics. That's what these sorts of languages are supposed to promise. You may as well tell me to go learn binary and code it myself. That's not particularly helpful.


Gabriel(Posted 2006) [#5]
That's what these sorts of languages are supposed to promise.

That's an interesting choice of phrase, because the language doesn't promise it, so your complaint seems to be that the language doesn't do something it doesn't promise to do but you think it should have promised to do. Oooookay.

Anyway..

What was wrong with Scott Shaver's tilemap module? ( http://www.blitzbasic.com/Community/posts.php?topic=64249#717370 )

Seems like it provided a very good starting point.

By the way, you've only got a couple of dozen posts under your belt and you've only just bought the language apparently. You might want to tone down the "I know what everyone wants from BlitzMax" attitude a little ( EG: the comments in that thread about no one buying BMax not wanting what you want ) because we'd be seeing threads like this all the time if that were the case. This is about what *you* want, and I'm sure people can understand the initial enthusiasm, a new product, big ideas of what you're going to make with it, initial shock at how much work is going to be involved and I think people will empathize a little more that way. We have all been there, although we didn't all want a rotating scrolling tilemap with collisions.


bradford6(Posted 2006) [#6]
Zamfir,

I agree with you on a few of your points.

The Way I see it, programming and Game Development lie along a continuum. on one end are 'raw' languages that allow you to do just about anything you want in a very open and unconstrained environment. Some of these are very powerful (and complicated)

On the other end are the 'click and create' languages, these are usually less "languages" than Applications with a very narrow focus.

BlitzMax, in my opinion, lies closer to the 'raw' language side.

BlitzMax is a very powerful programming Language based on the BASIC language and syntax. It's roots in BASIC make the syntax *very* easy to learn and understand.

IT goes beyong BASICwith Support for Object Oriented Programming (OOP), A Modular Design and multiplatform support.

What Makes BlitzMax a powerful tool for programming games is it's tightly integrated 2D graphics modules.

if you are new to programming and want to create a tilemap with collsions, take a look at this:

http://tilestudio.sourceforge.net/tsbm2.zip

http://tilestudio.sourceforge.net/

remember though, BlitzMax is a Programming Language with modules very well suited for game development NOT a Game Development system.

one thing to keep in mind is this. For many, the purpose of programming a game is not to crank out another derivitive shooter/scroller/fps/whatever or even to earn a bunch of money.

The Purpose is to learn how to program and enjoy the process.


H&K(Posted 2006) [#7]
This is just an example of not reading what it said on the tin.


zamfir(Posted 2006) [#8]
H&K: That was just an example of a snarky and completely pointless post.

bradford6: Thanks, I do appreciate your feedback. I've looked at seemingly all of the tile editors out there, I just don't understand why rotation is so foreign or why collision has to be completely home made. The point I suppose I'm trying to make is that if someone is attempting make a 2D game, there are some things you can assume they'll want, such as collision detection. Now, if they simply want to bask in the thrill of programming, why not buy C++ and download the latest DirectX and several manuals and quit their day job and forego all social engagements and GET BUSY!

Do you see my point?

As far as "You've only had so many posts in these forums, and therefore I can talk down to you." BS, well, no actually, you can't.


H&K(Posted 2006) [#9]
No it wasnt an example of snarky and completly pointless post, it was short and consice. I posted at length over the fact that Bmax was a lowish level language, and you replied with "But it should have all of these, its what I would expect". Hence my reply, read the tin next time.

Any problems with your expectation of Bmax, are just that, problems with your expectation.


Gabriel(Posted 2006) [#10]
As far as "You've only had so many posts in these forums, and therefore I can talk down to you." BS, well, no actually, you can't.

What I actually said was "You've only had so many posts in these forums, it might not be a good idea to talk down to everyone else." Which is entirely different ;)

But you seem to be pretty determined to go that way, so I'm not going to attempt to help you any further.


bradford6(Posted 2006) [#11]
Zamfir,

have you considered Torque Game Builder? it has many of the things you seem to be looking for.

http://www.garagegames.com/products/torque/tgb/


Now, if they simply want to bask in the thrill of programming, why not buy C++ and download the latest DirectX and several manuals and quit their day job and forego all social engagements and GET BUSY!




that is precisely why I like BlitzMax. you can get to (what I believe) are the interesting parts of programming bypassing the 80 lines of convoluted set-up that many languages seem to require just to get something to display on the screen.


Rex(Posted 2006) [#12]
I have to agree with the majority of others on this one. I bought Blitzmax with the idea of creating games and apps easily, which I can do with incredible ease and speed. While I'm still fairly new to bmax - running through docs and code examples to learn more, I find bmax to be a dream program, not only for ease to code, but also allows for your creativity to flair. Ok, so it's not perfect in every sense, but what is? I tell you now $US80 is cheap as chips for what it can do.

Years ago like many others here im sure, I started off with gwbasic, qbasic, moved on to visual basic ect, where you had to program every single thing, even displaying a mouse cursor on the screen was a whole page of code.

Loading and displaying a picture on the screen required you to calculate yourself a formular based on screen resolution, bit depth size ect, and "oh if you got it wrong, you could over write your operating system". How fun was that?

Now i go loadimage and 'bam it's there.

I cant remeber the amount of times I was so frustrated with programs like visual basic ect which promised so much, delivered so little, were so slow, and cost the earth to purchase.

Alright, I'm no guru coder in any sense, but man, Blitz does take away so much of the tedious stuff for you, so you can get on with your game. But yes you do have to code your game yourself.

I've never come across such a high level language with low level execution speed.

I dont think it gets much easier without it taking away your ability to create programs in an original, creative way.
I like a program to have the tools to do what I want, but I do not like to have templates which im forced to work with.


zamfir(Posted 2006) [#13]
There are two sorts of people who buy products like Blitz... There are creative, right brained people like myself, who want to design the world and the plot and the mechanics but do not want to have to puzzle out the entire engine, and there are programmer hobbyists who love to poke around with the code. Neither breed is a lesser form of person.

I started trying to make games on the Commodore 64 and Commodore 128. I moved on to QuickBasic (with Fastgraph) and VisualBasic, Click and Create, Multimedia Fusion, etc. I've been around.

The long and the short of it is, antialiasing, rotation, collisions... It's been done. and done. and done some more.

Why must I be forced to program these things from scratch? It is not a question of forcing the programmer to do things one way, programmers always find ways to do things precisely the way they want. The question is, where do people like myself go? I have a game concept, detailed down to the nth degree, but I made the assumption (yes, I said it) that a language geared toward the game prgramming enthusiast would include simple functions like collision.

I'm not trying to start a flame war, so put away your crucifixion implements. I think in all of this, I have a valid point.


H&K(Posted 2006) [#14]
not want to have to puzzle out the entire engine

I point out again that is a game language not a game engine.

Anyway, Setrotation does the rotation bit.

Why must I be forced to program these things from scratch?


You are not, look in the code achieves, and just cut and paste there stuff, or heaven forbid do a search on the boards. Or buy 2d game creator, from TCG

Also, this should probably be in the general boards


REDi(Posted 2006) [#15]
Antialiasing ... use Loadimage flags FILTEREDIMAGE|MIPMAPPEDIMAGE, and you can use alpha in PNG also
Rotation ... SetRotation
Collision ... CollideImage/CollideRect

The functions are there and whatever you want to do can be done, dont give up!
If you ask questions nicely and dont slate the Blitz products in the process, most of us here are more than willing to help ;)


Grey Alien(Posted 2006) [#16]
BlitzMax is great, it has everything you need to make a pro game but you'll need a lot of effort because as someone has already said it's a game language not a game engine. However, people have made various add-on modules that can help you and there's tons of free code floating around esp. in the archives. As for making it standard, hmm, yeah that would be a bad idea as people need to make things differently, however I'll be making a scrolling platform game ingine in Bmax soon which people can either a) use or b) use and modify or c) use as inspiration for their own engine.


tonyg(Posted 2006) [#17]
Check Mappy, TileStudio, UME, WorldArtist, FishED and many other TileMap Editors with BlitzMax modules.


zamfir(Posted 2006) [#18]
I found JazzieB's stuff here: http://www.blitz.sos-software.co.uk/code.htm, and it does a pretty good job (except for rotation, but hey, you can't have everything.)

Nice work, JazzieB!


H&K(Posted 2006) [#19]
@Grey

Im Impressed you didnt try and sell your framework.

@Zamfir,

Starting again, I totaly understand your problem, that Bmax does come with a lot of "Missing Functionality", that you may have expected. However, the object nature of the language means that once you have either written or cut/pasted these objects once you will be able to use them again and again.
What Bmax does lack is a good prepackaged tutorial to show you how to do this, but the tutorials on these boards will almost certainly help.
Now to your oringinal post. That was not a good way to start, basicaly the package didnt do exactly what you wanted straight out of the Box, but as has been stated this is due to the lower level of the langauge as a whole. (As an asside you will find that a lot of ppl dont even use the functionality there and go to an even lower level, ignoring the functions and going straight to the objects)
It was not a good thing to do within your first dozen posts, on any board language. On TGC, people do the same and say things like, "Dark AI wont let me make an AI to play chess properly" or "Why isnt there a jetpack in FPSC, without it I cannot make my mega whatever".

If you have chosen to buy Bmax, then you realy should have looked at what the language could and couldnt do. If you get the hang of it , and (Which is probably more important), think that its the level that you want to program, then you will quite quickly come to see that being able to have your own code to do these things is a lot lot better than being stuck with someone elses.

If your "Right Brain" creativity, (That is going to come back and haunt you), means that you cannot get a grip on this level of programing, then simply move upwards on the programing ladder, until you find one that you like. This would include Modding, which athough looked down apon by some is a level that requies a very High level of creativity to make different from what you are modding, but it means that the full engine is already there.


zamfir(Posted 2006) [#20]
H&K,

While I appreciate your improved civility, once again you have taken a great deal of time to say absolutely nothing. Please move on to another thread where you can be of some use.

Thanks.


BlackSp1der(Posted 2006) [#21]

I found JazzieB's stuff here: www.blitz.sos-software.co.uk/code.htm, and it does a pretty good job (except for rotation, but hey, you can't have everything.)


If you want a background rotation effect like -SNES Contra game-, use angle and distance instead x,y coords.


Tyler(Posted 2006) [#22]
The only reason I can agree with parts of this is because, right now, I'm searching franticly for what I believe to be a required functionality that was in BlitzPlus that I'm missing dearly (ImageBuffer). If I could figure that out, though, all the problems in my life would be solved. As for the physics, collisions, AI and stuff like that, I enjoy those challenges, because although it requires me to reach deep and pull out my best foresight and problem solving skills, I know the ability to make it happen is there (even if it's on a very simple scale compared to major physics/ai engines). What I'm getting right now is that something I could've done easily with BlitzPlus is going to beat me about the head and shoulders with BMax (and in my opinion, it shouldn't be that difficult ... because my opinion is based on being spoiled by the simplicity of how it WAS), if I can do it at all. Yay.


zamfir(Posted 2006) [#23]
BlackSp1der,

I will try that, along with the other suggestions posted here, and see if that doesn't sort me out.

BTW, I've been looking pretty hard at Torque (the 2D version) and it looks pretty cool. Has anybody tried it?


Dreamora(Posted 2006) [#24]
Tyler: Indiepaths Render2Texture will help you do what you want. Another way isn't there.


T2D is nice but that damned bugged on the physics side that it is a good joke. The rigid collision response is that bugged that they removed it from editor and it is now only usable through script to make sure only "advanced users" (ie those that are able to work around all its bugs) use it.

I own it since early EA because I hoped it would give me the opportunity of fast prototyping ... result: skip it, DX driver is as broken as with any Torque, OpenGL one requires OpenGL 2 compliant hardware to work usefully (ie bye bye intel)


tonyg(Posted 2006) [#25]
GameMaker has come on a lot since 6.1... it has, really!
Physics, TileMaps, scripting, particles all available.
I don't (and didn't) expect 2D sub-engines to be included with Bmax BUT there's a few odd omissions : imagebuffers (again!!??!!),rotating viewports (I thought somebody had done this?), drawimagerect (I know people have done this : draw a rectangular section of an image), rect collisions (easy to implement), textured polygons (again others have done it). I was hoping these would be added over time but BRL seemed to refuse to comment on additions to the 2D engine.


Dreamora(Posted 2006) [#26]
Rect collision is in as default since day one but only for the optimized collision system not the "destructive" way (ie using the old blitz like commands that internal wrap to the layer system and clear the layer all the time?!)

But you are right, beside ImageBuffers, I expected the stuff to be in as well. Thats one of the reasons I implemented the DrawImageArea command quite fast because it is needed for some optimized things (tilemap for example with "binding" textures all the time is suicide. Doing it with batching is horror for pseudo depth sorting as BM does not support a depth)


Image buffers are a problem because of the OpenGL side, at least theoretically. It is not part of OpenGL 1.2 which is what BM set as base although it is that stone aged that it definitely would benefit of getting 1.3 (4) / DX9 as base instead of become more and more incompatible to current gen cards and systems.


dmaz(Posted 2006) [#27]
rotating viewports (I thought somebody had done this?)
fredborg did.
http://www.blitzbasic.com/Community/posts.php?topic=42799#478997


zamfir(Posted 2006) [#28]
now we're getting somewhere...


Steve Elliott(Posted 2006) [#29]

These things should not be "standard", in a game language, they should be standard in a game "engine" which is not the same thing.



Exactly! In BlitzMax you have do do some more work - but that way you can optimize to a particular game and you get much better results. Plus BRL can produce a more efficient compiler because it's not cluttered-up with lots of additional code.

Having said that, BlitzMax has lots of built-in functions that would take time and much more effort to produce in C++ and DirectX/OpenGL.