10.03.2019 - Round 1 results of our "A Love Letter For FreeBASIC" game dev competition have been published. Please be sure to check the results thread: http://games.freebasic.net/forum/index.php?topic=629.0. Don't forget that the competition is continuing with a round 2, lasting till 29th of April, 300 USD first prize. Stay tuned!

Author Topic: A screen by screen scrolling engine with a map editor (ver. 0.4.2) - 10.02.08  (Read 20209 times)

Lachie Dazdarian

  • Double dipper
  • Administrator
  • Forum Sage
  • *****
  • Posts: 1307
    • Yahoo Instant Messenger - lachie13
    • View Profile
    • The Maker Of Stuff
    • Email
This is something I've been working on during past few days. It was developing slower than I expected.







Download: http://lachie.phatcode.net/scrn_by_scrn_engine_v042.zip (updated on 10.02.2008)


Check readme for new planned features.

Yeah, code cleaneup is something I forgot to mention there too.

P.S.

I'm not making a GOD DAMN game!
« Last Edit: February 10, 2008, 10:14:32 AM by Lachie Dazdarian »
"Things like Basic and Free Basic provide much-needed therapy and a return to sanity and a correct appreciation of people. The arrogant folk really hate a word like 'Basic' - fine, and good riddance." ~ pragmatist

BadMrBox

  • Forum Sage
  • *****
  • Posts: 411
    • View Profile
    • BadMrBox.com
Re: A screen by screen scrolling engine with a map editor (ver. 0.1)
« Reply #1 on: December 27, 2007, 12:16:11 AM »
Why are you not making a game?

The character moves much faster in the scenebyscene exe than in the scenebyscene_small. I havent looked in the code but is that on purpouse?
There is also a little problem with portal number3. If you are quick on the keys you can move your character outside the house.

Still, it looks like an interesting engine. What are you going to do with it if you are not making a game?

notthecheatr

  • Global Moderator
  • Forum Sage
  • *****
  • Posts: 351
  • Who's the guy from 21 Jump Street?
    • AOL Instant Messenger - notthecheatr
    • Yahoo Instant Messenger - TheMysteriousStrangerFromMars
    • View Profile
    • notthecheatr Home
    • Email
Re: A screen by screen scrolling engine with a map editor (ver. 0.1)
« Reply #2 on: December 27, 2007, 10:59:23 AM »
Not bad at all, except that the tiles are pretty bad  :P

The character does run around a lot faster than I'd expect;  I don't mind, since in a demo I don't like going slowly anyways, but you might want some sort of fps limiter or something.  And yeah, Portal 3 is impossible to get into unless you do some weird thing running around really fast into the portal.

One thing that would be really nice is if you get pp collision implemented.  Foreground layers would also help, so you can walk under the trees, but I see that's already on your list.
The funniest thing happened yesterday.

Pritchard

  • Global Moderator
  • Forum Howler
  • *****
  • Posts: 160
    • View Profile
    • Email
Re: A screen by screen scrolling engine with a map editor (ver. 0.1)
« Reply #3 on: December 27, 2007, 11:25:32 AM »
Ahahah this reminds me of QB :P

Lachie Dazdarian

  • Double dipper
  • Administrator
  • Forum Sage
  • *****
  • Posts: 1307
    • Yahoo Instant Messenger - lachie13
    • View Profile
    • The Maker Of Stuff
    • Email
Re: A screen by screen scrolling engine with a map editor (ver. 0.1)
« Reply #4 on: December 27, 2007, 02:07:02 PM »
Quote
There is also a little problem with portal number3. If you are quick on the keys you can move your character outside the house.

Still, it looks like an interesting engine. What are you going to do with it if you are not making a game?

Thanks for reporting this bug. There seems to be a problem with coherence of map edge collision and tile collision. Actually, I think it's one pixel of space in tile collision that allows you to do this. Will fix that.

I will most likely make a game in it eventually. But I want to complete this engine properly so that making a game in it doesn’t end up being a nightmare. And I don't want for my future possible game to be judged on the engine placeholder graphics.

Quote
Not bad at all, except that the tiles are pretty bad :P

The character does run around a lot faster than I'd expect;  I don't mind, since in a demo I don't like going slowly anyways, but you might want some sort of fps limiter or something.  And yeah, Portal 3 is impossible to get into unless you do some weird thing running around really fast into the portal.

I did these graphics in about 1 and a half, and I think it's pretty good having that in mind. No offense, but majority of FB programmers can't handle something like that. At least I didn't resort to using non-original tiles. It's all my original work. RESPEKT!

The difference in running speed is the result of one character moving in environment consisted of 20*20 pixel tiles, and the other in environment consisted of 40*40 pixel tiles. I kinda tried to adjust the speeds, but was too lazy to do it properly.

It is not near impossible to enter portal 3. I just made the tile collision box too big so you need to be very...hmm...precise. Just kiss one side of the castle wall and more toward the door (hold up and right or left). That should do the trick.

I guess I will have to finishing this properly in a higher resolution, with spiced up graphics, for it to stop reminding people on QB.

Oh yeah, PP collision is considered, but then colliding objects will have to be in a separate layer, pasted with TRANS.

Got a lot of work to do. *sigh*
"Things like Basic and Free Basic provide much-needed therapy and a return to sanity and a correct appreciation of people. The arrogant folk really hate a word like 'Basic' - fine, and good riddance." ~ pragmatist

BadMrBox

  • Forum Sage
  • *****
  • Posts: 411
    • View Profile
    • BadMrBox.com
Re: A screen by screen scrolling engine with a map editor (ver. 0.1)
« Reply #5 on: December 27, 2007, 03:39:45 PM »
Quote
I guess I will have to finishing this properly in a higher resolution, with spiced up graphics, for it to stop reminding people on QB.
Hey, reminding people of qb isn't all bad. I like low-res.

notthecheatr

  • Global Moderator
  • Forum Sage
  • *****
  • Posts: 351
  • Who's the guy from 21 Jump Street?
    • AOL Instant Messenger - notthecheatr
    • Yahoo Instant Messenger - TheMysteriousStrangerFromMars
    • View Profile
    • notthecheatr Home
    • Email
Re: A screen by screen scrolling engine with a map editor (ver. 0.1)
« Reply #6 on: December 27, 2007, 10:00:09 PM »
Well I guess it's better to use your own tiles than resort to a pre-made set like you said.  Probably the worst one is the grass.  If you made it look better, the rest wouldn't be terribly bad.  Don't worry about it too much - especially if you aren't making a game anyways!

But umm... like he said.  Why make an engine if you aren't making a game?
The funniest thing happened yesterday.

Lachie Dazdarian

  • Double dipper
  • Administrator
  • Forum Sage
  • *****
  • Posts: 1307
    • Yahoo Instant Messenger - lachie13
    • View Profile
    • The Maker Of Stuff
    • Email
Ok, I'm posting a new version of my engine.

Changes? Foreground layer fully implemented, added tiles file browser in the map editor, save game script option, save Y/N messages, and the implemented screen resolutions have been changed (now they are 320*240 and 640*480)..

Both codes cleaned up.

Things to do: Finish map editor interface, change map files format (make a single map for the entire location), add pixel perfect collision object layer.
"Things like Basic and Free Basic provide much-needed therapy and a return to sanity and a correct appreciation of people. The arrogant folk really hate a word like 'Basic' - fine, and good riddance." ~ pragmatist

notthecheatr

  • Global Moderator
  • Forum Sage
  • *****
  • Posts: 351
  • Who's the guy from 21 Jump Street?
    • AOL Instant Messenger - notthecheatr
    • Yahoo Instant Messenger - TheMysteriousStrangerFromMars
    • View Profile
    • notthecheatr Home
    • Email
Err... in the library the trees outside have pink in them (the transparency is wrong, since when you darkened them you darkened the pink as well so it's not &hFF00FF any more).

Other than that, not bad.  Pixel perfect collision is a must, I'm looking forward to it.  Right now you still can't walk very close to the base of the tree, and you can't walk "behind" the fences at all.
The funniest thing happened yesterday.

BadMrBox

  • Forum Sage
  • *****
  • Posts: 411
    • View Profile
    • BadMrBox.com
Meh, pixelperfect collision is overkill. Just add some different collisionboxes to make it look better.

I noticed when walking out on the left from the castlemap that I ended up on a map that wasn't connected with the castlemap at all but that is just details.

Lachie Dazdarian

  • Double dipper
  • Administrator
  • Forum Sage
  • *****
  • Posts: 1307
    • Yahoo Instant Messenger - lachie13
    • View Profile
    • The Maker Of Stuff
    • Email
Re: A screen by screen scrolling engine with a map editor (ver. 0.2) - updated!
« Reply #10 on: December 31, 2007, 12:39:06 PM »
It's an error in game1_script.txt that I omitted. 640*480 example doesn't have this bug. I left the location exit definitions in the first script by mistake, and as I said previously, this feature (world/location exits) didn't turn out to function as I expected it would. I might leave it out in the next version.

I will try to implement an colliding objects layer, and since it will be a layer users will have an option to use it or not.
"Things like Basic and Free Basic provide much-needed therapy and a return to sanity and a correct appreciation of people. The arrogant folk really hate a word like 'Basic' - fine, and good riddance." ~ pragmatist

notthecheatr

  • Global Moderator
  • Forum Sage
  • *****
  • Posts: 351
  • Who's the guy from 21 Jump Street?
    • AOL Instant Messenger - notthecheatr
    • Yahoo Instant Messenger - TheMysteriousStrangerFromMars
    • View Profile
    • notthecheatr Home
    • Email
Re: A screen by screen scrolling engine with a map editor (ver. 0.2) - updated!
« Reply #11 on: December 31, 2007, 03:19:57 PM »
Meh, pixelperfect collision is overkill. Just add some different collisionboxes to make it look better.

You may be right, I never thought of that.  Perhaps I should experiment with that in my own code...
The funniest thing happened yesterday.

BadMrBox

  • Forum Sage
  • *****
  • Posts: 411
    • View Profile
    • BadMrBox.com
Re: A screen by screen scrolling engine with a map editor (ver. 0.2) - updated!
« Reply #12 on: December 31, 2007, 06:40:50 PM »
Yeah, seriously (whatever spelling you feel comfortable with, im drunk). You can come along way without pxp colllision.

Jonge

  • Novice
  • ***
  • Posts: 78
    • View Profile
    • codeheim.NET
Nice start! Good to see more rpg projects(or maybe it wont be an rpg?)

Some things I've noticed:
- the character is in a terrible hurry..
- maybe his walk animation should stop when his colliding with objects?
- the graphics are a bit bright for my taste

Also the pink tree's when your inside the castle.


Anything in a lower resolution then 640x480 can remind people about qbasic so thats not a bad thing =) I see you have dropped the old palette and started to use 24bit colors, thats what I've done to. Haven't missed the palette yet  :D
codeheim.NET - Homemade game madness!

notthecheatr

  • Global Moderator
  • Forum Sage
  • *****
  • Posts: 351
  • Who's the guy from 21 Jump Street?
    • AOL Instant Messenger - notthecheatr
    • Yahoo Instant Messenger - TheMysteriousStrangerFromMars
    • View Profile
    • notthecheatr Home
    • Email
By the way, you can make your character's speed based on the fps.  I don't bother with fps limiting, I just do it this way:

Code: [Select]
charSpeedX = speedConst/fps
charSpeedY = speedConst/fps

where speedConst is some value you'll have to experiment with to get the speed just right.

It's easy to do and it will make your character keep a consistent speed no matter the fps (you can experiment for example in different resolutions and you'll see that as the fps changes, the speed doesn't seem to.
The funniest thing happened yesterday.