|
Post by n00b on Aug 2, 2018 23:56:42 GMT -6
I still don't have a playable demo yet but I thought I would atleast show what my engine is capable of in its current state. You can just run the editor.bat file to start the editor on windows or type "rcbasic editor.cbc" to run the editor in linux. I included a demo level to show some of the basic features. Just goto load and select demo. You can download it here: www.rcbasic.com/downloads/n00b_engine_v0.1a.zip
|
|
|
Post by tbird on Aug 3, 2018 15:06:39 GMT -6
Awesome I will check this out tonight.
|
|
|
Post by tbird on Aug 3, 2018 20:34:40 GMT -6
That is pretty good, way more than I would be able to put into it. Your pixel art is actually pretty nice, the character looks cool.
|
|
|
Post by n00b on Aug 3, 2018 20:43:32 GMT -6
That character sprite I included with the demo level is actually one of the character sprites from dominiques adventure on the rcbasic website. Its not actually in the game I am currently working on. I just wanted a sprite to put in the test level to show that the engine can currently handle sprites.
I think that the editor does show what the gui library is capable of though. The complete source code for the editor is in the src folder. It uses that gui library I posted previously.
|
|
|
Post by n00b on Aug 3, 2018 20:45:18 GMT -6
Also I just realized I never explained how to move around the level but if you put the mouse of the level in the editor you can use the arrow keys to move around.
|
|
|
Post by tbird on Aug 4, 2018 9:43:27 GMT -6
Well I am very interested to see where you take this, after reviewing some of your code in the GUI library, I am going to write my own, but much simpler lol. You are a real programmer and you have created a very diverse and general library, I am going to make a very tiny specific case by case lib. I see I would definitely not have the time (or the know-how) to make a full blown editor. I am impressed and a little intimidated haha. Oh well as the minions say "Back to work, back to work!"
|
|
|
Post by n00b on Aug 4, 2018 10:01:54 GMT -6
I don't plan on trying to expand my engine much further unless I need to for the game I am making. I was originally going to use tiled myself but I just wanted to have more control over my workflow. I also try to show what RCBasic is capable of in the process.
I am just working on the basic mechanics right now so hopefully I will have an actual playable demo of my game next week. I am also still looking forward to playing your demo whenever you have one.
And I mentioned it before but if there is something you don't feel the manual explains clearly or something you want some tutorial or explanation on, just ask.
|
|
|
Post by tbird on Aug 4, 2018 10:22:15 GMT -6
Yeah I am working away at it. Most importantly, I am enjoying myself.
Quick question, I was thinking of using Stacks for organizing the draw order of my entities, for top down with depth, or isometric I would need to organize on the fly. Would stacks be a good way to go, or would having to through the list be too much, even if a guy only processed say what was on the main camera. From what I understand, please correct me if I am wrong, is that to reorganize I would have to push out every value till I received the entity ID that matched the one I need to change.....Hmm actually I guess there is no way of accessing values inbetween, I think I may have answered my own question, stack would not be a good way to go? I cannot reorganize a stack? I guess a little reading goes a long way FILO right lol. Disregard this as a amateur question...oh boy.
So taking the ID array through a for loop with another drawOrder array would be my best bet.
|
|
|
Post by n00b on Aug 4, 2018 11:01:04 GMT -6
For an isometric game I would just think of it like a top down game like zelda or final fantasy. The draw order in games like that is based on the sprites Y position. Basically sprites are drawn from the top of the screen to the bottom of the screen in that order. And there may be little tricks here and there to speed this up but I don't believe that is going to be neccessary unless you are making some game with thousands of sprites on screen being moved each frame. I actually made a video with an older version of RCBasic years ago where I was able to render hundreds of sprites moving on the screen with out much slow down. Look at this example: For y = 0 to screen_h For sprite_num = 0 to num_sprites - 1 If sprite_y[sprite_num] = y Then Draw Sprite Here End If Next Next
A good speed hack that will drastically increase rendering speed for higher resolution games is to not check every single y position on screen. Look at this: For y = 0 to screen_height step 10 'This will shorten the amount of time this loop runs but it won't check every y position possible y_plus_10 = y + 10 'we are calculating y + 10 here so we don't have to do this math on every sprite we are checking For sprite_num = 0 to num_sprites - 1 If sprite_y[sprite_num] >= y And sprite_y[sprite_num] < y_plus_10 Then Draw Sprite Here End If Next Next And if you want to get really ridiculous with speed hacks then you could do this (note that unless you are making an insane japanese bullet hell game that this is kinda overkill): spr_start = 0
'Inside render loop spr_start = not spr_start For y = 0 to screen_height step 10 'This will shorten the amount of time this loop runs but it won't check every y position possible y_plus_10 = y + 10 'we are calculating y + 10 here so we don't have to do this math on every sprite we are checking For sprite_num = spr_start to num_sprites - 1 step 2 'Only check every other sprite each frame If sprite_y[sprite_num] >= y And sprite_y[sprite_num] < y_plus_10 Then Draw Sprite Here End If Next Next
|
|
|
Post by n00b on Aug 4, 2018 11:06:42 GMT -6
Also just sorting your sprites by Y and then drawing will probably work better for you depending on your game.
|
|
|
Post by tbird on Aug 4, 2018 11:14:19 GMT -6
Ah awesome I was thinking way more complicated then that, I was just writing a function for going through every entity then increasing a draw counter based on there "z" value, but this looks much easier lol. Thank you!
|
|