Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.

Is This Project A Good Idea?
Yes
 80%  [ 8 ]
No
 0%  [ 0 ]
Terrible.
 0%  [ 0 ]
Amazing!
 20%  [ 2 ]
It's going to fail.
 0%  [ 0 ]
Total Votes : 10

You set up the tilemap structure wrong. Fix it.
What do you mean by 'wrong'? I thought you just need to export the .csv.
I believe you need to show us what parameters you are supplying in ICE to create the tilemap. I think it is part of the DefineTilemap function.

Posting that here would help a lot.
Here's a new release of convpng that may fix your issue? However, without knowing what palette and options you are giving your tilemap, it is really difficult to diagnose.

https://github.com/mateoconlechuga/convpng/releases/latest
Sorry for posting late, I had to help my sister with her schoolwork. My code is

Code:
LoadData("TILES",0,192->A
DefineTilemap(8,8,16,20,8,8,20,50,0,0,A,"<MAP_DATA>"

(MAP_DATA being the actual string of map data in Scroll.txt, but I'll load that from an appvar later)
I also am not setting a custom palette anywhere, so I'm sure that's not affecting it in any way...
I hope this is all you need to see what I'm doing wrong.
So just to make sure, your tiles are 8 pixels by 8 pixels? I don't think that's what you had in your convpng.ini file...
*facepalm* That's it. I thought those arguments were the size of the Tileset. Then again, that's what I get for being a bad reader and not paying attention. It worked now (yes!) and I can finally resume progress on this project! Thank you!
Btw how would you display a tile at twice the scale of the original? (I have 8x8 but want to display 16x16)
I'm probably not going to be able to finish in time for CC23, but I'll try anyway. I'm using this as more of a learning opportunity, rather than a contest.
Anyway, I have another TileMap question. Why does the x_Offset and y_Offset in DisplayTileMap round to the nearest tile width? (I think that's what's happening at least)

(the top int is x_offset and the bottom is y_offset)
How can I get the offset to be exactly what I write?
Your x_offset and y_offsets are negative? Those values should only be unsigned values. Are you sure you specified the full dimensions of the tilemap in DefineTilemap()?
My code is

Code:
DefineTilemap(8,8,20,50,16,16,20,50,0,0,A,"DATA"

and the dimensions of the tilemap are 20x50, so I'm sure it's right...
You really, really need to read the documentation for the DefineTilemap command: https://htmlpreview.github.io/?https://github.com/PeterTillema/ICE/blob/master/documentation/commands.html#memory

I'll let you figure out what is wrong Wink Feel free to ask questions if you are unsure what value to put for an argument. Don't just guess.
MateoConLechuga wrote:
Feel free to ask questions if you are unsure what value to put for an argument. Don't just guess.

Ok. Sounds good. I guess maybe I can ask too many questions I could probably figure out on my own...
Found the problem. I feel really stupid now. It was in plain sight the whole time.
I might just have to postpone this project for a little. I decided to do something challenging for my high school science fair, and I decided on making something pretty complex, but easy enough to be able to get done. I am making a robotic glove, capable of enhancing movements for people with disabilities. I haven't done much on this project yet other than the basic design and browsing for parts, but I'm gonna really get started on it now! As for my contest entry, I will be working on it in the background, so I will be updating on it as soon as I have extra time.
(P.S. Do y'all think I should start a separate forum for my glove project?)
Ok I made a very large amount of progress today. I got the player to move and implemented collision:


But there is a slight glitch with 1 block collisions:

I'm not sure why this is happening, but here is my code (SCROLSRC.8xp)
https://drive.google.com/open?id=1l5MKa58uRB5uKisTZqxhB4TaaoEweEsj
I also can't figure out a way to implement jumping. All the methods I tried sucked and I scrapped them all, so I'd appreciate some help with that as well.
That's all for now!
Wow. Canít wait to see some more progress on this!
Looking at the source briefly I couldn't find anything specific that would be causing the problem. For the jumping implementation, a good way to start at it is to have a variable for yVelocity, a constant gravity, and a boolean landed. When someone presses the jump button, you would set yVelocity to some amount that makes a good jump height and set landed to false. Then just change yPosition by yVelocity and then yVelocity by the gravity constant. If you look up 'simulating gravity in (language you somewhat know)' you can probably find an example of how to add it to yours.
This is what I tried at first, but my implementation didn't seem to work very well. The only other issue I had with this was "clearing" the screen from where the player moved from slowed down a lot, as I had to extend the size of the tilemap being redrawn. I'll try doing this method again, but I'll need to figure something new out for redrawing the screen... Thanks for the suggestion though! I never did know what the fastest method was...

Edit: I can't seem to get this to work out the way I want... My main issue is the falling speed of the character. I want the character to keep falling until they hit a tile, but since yVelocity isn't always the same, the character doesn't exactly land on a tile, just a few pixels below. I want to know how I can always get it to land exactly on a tile, without going through.
I'm going to set jumping aside for a while, at least until I get the map fully functional. What I mean by this is when the player moves to the right or left, I change the display offset of the tilemap and redraw the whole map. This is obviously very slow, and I don't know how to speed it up. If anyone has any suggestions, please comment.
Redrawing the tilemap isn't slow, otherwise Oiram wouldn't work. Something else in your code is very slow.
Update on my progress:
I believe I can no longer finish this in time for CC23, so I'll just have to complete it later...
However, this does not mean I am quitting! I had a backup BASIC program all along, just in case, which I will be completing before the deadline. It is called "HUNT", and RPG where you have to complete certain tasks before time runs out (hunting for objects and such.) I am almost done with this, and plan to be updating on it soon. What I have left is:

New Game Checklist:
Idea - 100%
Engine - 100%
Menu - 100%
Quest System - 40%
Stealth (enemies) - 100%
Boss Fight - 10%
Map Design - 25%

Update 1:
I have added doors and signs/people and they are fully functional. I decreased the map loading time from 2 secs to .5 secs. Beautified the code. More real soon!

I working on this as I write this post, and will probably have some more stuff by tonight. That's all!

P.S. Mateo, the source code is in this folder: https://drive.google.com/drive/folders/1l5MKa58uRB5uKisTZqxhB4TaaoEweEsj?usp=sharing
Thanks!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 3
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement