Alternatively, join us on Discord.

Dragon Warrior (-ish thing) CE

Started by Pieman7373, April 27, 2017, 07:39:07 am

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

DJ Omnimaga

Good to hear. :D

I'll check my Cemetech PM's when I have a chance.

c4ooo

Quote from: Pieman7373 on May 26, 2017, 12:47:15 am
Adding the rooms themselves is super simple... hard-coding the transitions and the collision detection is what sucks :banghead:
Also @DJ Omnimaga can you check your Cemetech PM's ? (it has to do with this game)

Hardcodeing? This is how you should do it: :_)
Create an array of boolean values, one for each block, and set false if the block can be passed through and true if its solid. When you collide with a block, get the block's value from the array and prevent the player from moving in that direction if it is true.

mazhat

@c4ooo I personally use the following method, it's less efficient speed-wise,
but it saves space so you don't have to make a collision array and a map array:

I create an array with integer values.
Each value corresponds to a tile-type.
You check if the tile is passable or not (but now it's not boolean, you have to check every tile-type).
Both systems seem to work swell enough :^)
Sketti

c4ooo

Quote from: mazhat on May 26, 2017, 08:07:25 pm
@c4ooo I personally use the following method, it's less efficient speed-wise,
but it saves space so you don't have to make a collision array and a map array:

I create an array with integer values.
Each value corresponds to a tile-type.
You check if the tile is passable or not (but now it's not boolean, you have to check every tile-type).
Both systems seem to work swell enough :^)

I didnt mean collision array ;) I mean one boolean value for each tile. Then if you have a tile with ID 5, you check if the 5th element is true / false. This is the fastest / most efficient method possible.

Pieman7373

May 27, 2017, 01:53:51 am #34 Last Edit: May 27, 2017, 02:15:26 am by Pieman7373
Quote from: c4ooo on May 26, 2017, 10:13:52 pm
I didnt mean collision array ;) I mean one boolean value for each tile. Then if you have a tile with ID 5, you check if the 5th element is true / false. This is the fastest / most efficient method possible.

The tilemap data cant even be checked while i am moving around, so i have to hardcode boundaries and  actions based on coordinates (a good 1/3 of my code is just that)


PROGRESS!!!!!!!!!!!!

Some pretty sexy progress, if i do say so myself :3

To-do List:
*Make a way to draw the 16x16 sprites on-calc (luv ya CalcMeister)
*Devise a method for drawing each screen and the transitions
*Add opening menu with option to either continue game or start new game
*game wont try to load a save if it is empty
*Implement saving (DONE! loading works on-calc, but not in CEmu for some reason)
*Add Player stats (i capped the gold at 5 digits, just for you, Kerm :3 )
*add function menus
*make quitting the game be a menu option, not pressing [clear]

*add the first town (60% done)
*Add the whole map (like 5% done)
*hardcode the boundaries for each screen (5% done)
*finish the menu menu (F4)
*add encounters, 1 in 30 chance per step, they just dont do anything important yet :P
(encounter chance will go up and down depending on the section of the world you are in)

*add items
*add fighting


(BTW, the numbers show up fine, CEmu is just weird with the screenshots sometimes, also, you arent gonna be able to change your stats like that in the game, that is just for debugging :) )

DJ Omnimaga

Wait, you can't access Ice tilemap data for collision detection? O.O

Unicorn

Wowie! thats lookin quite awesome, lots of progress!



??? ??? ??? ??? ???

Switchblade

Quote from: Pieman7373 on May 27, 2017, 01:53:51 am
Quote from: c4ooo on May 26, 2017, 10:13:52 pm
I didnt mean collision array ;) I mean one boolean value for each tile. Then if you have a tile with ID 5, you check if the 5th element is true / false. This is the fastest / most efficient method possible.

The tilemap data cant even be checked while i am moving around, so i have to hardcode boundaries and  actions based on coordinates (a good 1/3 of my code is just that)


If ICE is anything like Axe you should be able to check the tilemap data. If it is like Axe, you should check out the rpg example program that comes packaged with Axe.

c4ooo

Quote from: Switchblade on May 28, 2017, 01:45:04 am
Quote from: Pieman7373 on May 27, 2017, 01:53:51 am
Quote from: c4ooo on May 26, 2017, 10:13:52 pm
I didnt mean collision array ;) I mean one boolean value for each tile. Then if you have a tile with ID 5, you check if the 5th element is true / false. This is the fastest / most efficient method possible.

The tilemap data cant even be checked while i am moving around, so i have to hardcode boundaries and  actions based on coordinates (a good 1/3 of my code is just that)


If ICE is anything like Axe you should be able to check the tilemap data. If it is like Axe, you should check out the rpg example program that comes packaged with Axe.

I dont think ICE has direct memory access. At least not the last time i talked to PT_

Switchblade

So you can't do something like this?

{pointer + 1}

c4ooo

Quote from: Switchblade on May 28, 2017, 01:51:28 am
So you can't do something like this?

{pointer + 1}


I dont think so, ask PT_. He did say he was going to add a command to read an address or something.

DJ Omnimaga


Pieman7373

May 29, 2017, 03:14:56 pm #42 Last Edit: May 29, 2017, 03:17:10 pm by Pieman7373
Yeah, i have been working quite closely with @PT_  to make this  and i have helped him find many bugs and prompted the additions of new features. As of right now, i am pretty sure that i am doing it in the most efficient way possible...
But that is NOT very efficient at all  :crazy: 417 of my 888 lines of code are used to make the boundaries in just the 12 rooms that i have so far... there are 26 rooms in the first castle alone, and at least 6 or 7 more castles/towns... and that is not including the humongous overworld (@DJ Omnimaga) so... unless a more efficient way emerges, i will likely run out of space (or my program will become too large for ICE to hendle)

PT_

Why don't you ask me for a small ASM snippet to check boundaries, instead of having 466 lines of code? :P

Pieman7373

Hey, @PT_, Can i have a small asm snippet to check boundaries?

***Pieman7373 hides

Powered by EzPortal