Psh ill aboose it if i have to
Mutant aboose… This is how the Xmen sentinel future happened… Mutant aboobs… Hm… Mutant boobs…
What were we talking about?
Your 5 votes behind the leader sadly
Curious what’s the leader now?
- DAY 1 -
goal: Create a global settings controller, that will store settings like resolution, difficulty settings, UI scaling, etc etc…
So I made that and I immediately moved to the next goal - resolution change. So I was struggling for about an hour with that, cause I wasn’t really looking up how am I supposed to do it properly.
The hour is gone.
So the goal for day 2 is to make the thing change resolutions. I’m not entirely sure how I will do that, but still…
PS: I remember having the same issue long time ago - it changes the resolution, it changes everything, but the window size on the screen. And I can’t quite recall how to fix that.
I just checked it out and apparently in this version they have made it way easier than before. They just added a new variable that wasn’t here before, so after work tonight I may try it out…
Hmm so why not play a programming game?
Something without much writing, like:
Post your solutions.
Fucking hell, did I really just forgot I had my devember thing while reading other people’s devember things? Fuck me sideways… I have 3 days to catch up… So let’s do that…
Goal: Change resolution…
For now I decided I don’t want to make all possible resolutions. I’ll make 2 resolutions and just make sure the resolution change works. Adding more of them will be easy enough once the thing works.
So I set the two resolutions:
And then I set up two buttons to change the resolution:
//setrting the camera view
view_wview = w_1080;
view_hview = h_1080;
view_wport = view_wview;
view_hport = view_hview;
//Resize Application Surface surface_resize(application_surface, view_wview, view_hview); window_set_size(view_wview, view_hview); display_set_gui_size(view_wview, view_hview); break; case ord("O"): //setrting the camera view view_wview = w_768; view_hview = h_768; view_wport = view_wview; view_hport = view_hview; //Resize Application Surface surface_resize(application_surface, view_wview, view_hview); window_set_size(view_wview, view_hview); display_set_gui_size(view_wview, view_hview); break; }
It’s a large switch statement, that works nicely in those cases.
There is a nice little bug on 1080p resolution and I can’t quite figure it out. It outstretches it way larger than 1920px width and I have no idea why.
That’s actually a look into the forest my dude is walking in
Goal - complete.
Now with that out the way:
Goal: resize the banner of the boy. At larger resolution that banner will be so tiny.
Right. I had a plan, that backfired, so I made it way way easier.
Added a simple scale variable.
Added this line to the drawing event:
The forum is sh… for posting mathematical calculations. Using * makes the font “Italic” and that wasn’t the goal. Not quite sure how to post code properly TBH…
Anyways, after a lot of tweaking I found this to be pretty nice scaling code:
//change the banner size
case ord (“K”):
case ord (“L”):
Goal - Complete.
Goal: Build a couple more dungeons…
Mkay, so currently I just have the forest.
What I want to do is build up let’s say 2 extra for now and make a basic system where the charager physically walks into a specific dungeon, so when later on I fill the dungeons with random encounters and events it will literally “clear” them up from the world.
Honestly I’ve been working for 2 hours and I am planing on letting this rest for tomorrow.
So Day 5 I will be doing this and I will be doing multilevel dungeons as well… Extra mechanic in the game I want to set up now so I don’t have to shift everything later on.
That resolution thing is bugging me …
You know what, I’m going to completely rework the resolution system.
Basically I’m going to make a whole main menu screen. It will save me a lot of work later on since I’m gonna do it now.
So goal for day 5 is to make main menu screen and try to set resolution and banner size scaling so it doesn’t look blurry.
DAY 5 & DAY 6
Fuck me I’m so rusty…
Goal: Make a main menu and fix the resolution change bug…
I’m actually used to make those kinds of things. It’s actually the thing I am best at - connecting variables to button presses. Now it took me about half an hour to just remember how to do a stupid color shift on mouseover…
Next up - resolution change algorithm, that will save the settings in an external file so when I boot the game again, it will read the settings from the file and not reset every time.
So I made kinda step by step menu creation and… Well…
//resizing the game window
view_wview = 1920;
view_hview = 1080;
view_wport = 1920;
view_hport = 1080;
surface_resize(application_surface, 1920, 1080);
If I press “new game” I just go into the already existing room where all the gameplay will happen. All I have to do now is carry the resolution changes from the main menu to the game room itself.
So I wrote this:
surface_resize(application_surface, ini_read_real(“resolution”,“horisontal”,1280), ini_read_real(“resolution”,“vertical”,768));
And bam - it works…
I also added a debug text, that shows me what the resolution, written inside the file is, so…
It actually centered itself on the main monitor, and I am OK with that…
Goal - complete.
It took me way more than an hour, and honestly it shouldn’t have. And today is 6-th, so I will cheat a bit and add that as DAY 6 as well…
Tomorrow I will try and add an algorithm for dungeon generation. Basically scale the world, so the dungeons doesn’t show up if you play 1440p for example.
How’d the dungeon generation go?
Just got home from work… Warming up my dinner, and when I’m done with that I will jump into the project…
Then I will write a summary. Basically in about 4-5 hours there will be an update…
It’s 9-th today so I have to keep up…
Day 7 (and 8)
Goal: Create a system, that will generate dungeons out of sight of the camera no matter the resolution. If the resolution changes that system should just shift the dungeons away from the camera, so the “trick” stays out of sight and it’s still magic god damn it…
So my general idea is to make a dungeon controller object.
This one will create other dungeon objects. Those secondary dungeon objects will be responsible for creating the backgrounds (the idea is to have modular backgrounds, so I can mix and match, but for now I’m gonna use a single image just to make sure it works), later on the loot chests, the encounters, etc etc.
For this to work properly I have to start with some setup… A 2D array is required. So…
//dungeon setup in an array
//generating dungeon locations on the world map
This basically creates the 3 dungeons at random locations in the bottom half of the map.
SUXASS… I mean success… I just want them in the lower half, so I will payed a bit with the generation code and replaced one line with this:
Right, that’s OK, it just looks like it’s generating them at the same locations, and I used the random function to “spread them out” a bit…
the 720p resolution just generates them at the same locations… Hmmmm…
I don’t understand what’s going on with that…
Will pause now and do my most favorite thing of all - research…
PS: This is not really a big issue, since I am going to generate precise locations based on a seed later on, so I won’t use random function for that. Still I am curious what’s wrong with it…
Right… Good… I see where the issue is. It’s an engine quirk…
To help out:
NOTE: This function will return the same value every time the game is run afresh due to the fact that GameMaker: Studio generates the same initial random seed every time to make debugging code a far easier task. To avoid this behaviour use randomize at the start of your game.
So the random function gives me the same numbers. Now that’s logical…
Seems like adding
at the beginning of the game should fix the issue. Let’s test and see…
YES… FUCK ME YES… OK, don’t fuck me…
Moving right along…
I have one background sprite atm. I shall create couple more, so I have one for each dungeon. Just to make sure the algorithms and systems I am making are working properly.
So I made that. Added them as element 3 of the array, so I can just call them from every object no matter what.
Then I did this in the draw_event:
Right… I also added a line to help me show the locations of each dungeon in the overall room.
So… It’s all fine. It’s drawing them where they should be, since there is a background behind the guy walking around. But it’s also drawing them on the screen and I don’t know why.
Hard coding 100 extra to the Y location shifted it outside the view. That is perfect. I also thought of a way to simplify the entire code, since it’s extremely wrong and I have easier ways to check for stuff…
So for a start I won’t try and draw 3 layers. I’ll try drawing one and finding out what’s going on with that…
Right, it’s working so far…
My framerate dropped from 2700 to 1600 so I don’t think that’s the best implementation.
Maybe I should physically build the dungeons and not just draw them. That way the system shouldn’t stress about drawing stuff constantly.
Right… I started about 3 hours ago… Let’s say I made 2 hours of work, so that covers my Day 8 as well. Bending the rules to fit my thing.
Tomorrow I will fix a SMALL bug that’s bugging me… Then I will do a couple changes to the algorithm and try to pass 2K fps. I still haven’t put any mechanics and heavy shit into the game. Once those are in, the framerate will start dropping like nobody’s business… I need to keep it as high as possible.
Then I will make a small changes to a couple places and actually make the guy walk the actual dungeons and not just somewhere… The idea is he should walk where the background is drawn, so it looks like he is walking in the dungeon.
C U all tomorrow.
That’s pseudo-random number generators for you.
You could randomize with a particular seed and get the same map every time, stuff like that?
The goal of giving the same random numbers is to ease up the debugging process. Basically you know the random numbers are always the same, so the issue is somewhere else, not in the randomness. I get their idea, but I just want random numbers.
Oh yeah, I will do that later on, but for now I need to be sure the basics are working properly before I jump into the procedural generation.
There is a small bug in the drag and drop system of the banner. The camera view, drawn in the middle of it seems to be a dead zone negating any mouse clicks. So I am not going to rely on the built in mouse click functionality as much and just make sure when I’m clicking my mouse is in the boundaries of the banner and then activate dragging no matter if the game agrees or not.
I tried using the Mouseover function, but the view seems to negate that as well.
However I found another function, that seems to be working with the mouse and views combo, which is exactly what I want.
It will make it even simpler, cause I can remove quite a lot of code and use just a couple lines to deal with the drag and drop functionality.
Nope, it’s not working at all. I will do some “research” by which I mean I will ask in the GameMaker forums for help.
Currently I have no idea how to fix the issue.
Right. After some extra thinking and nobody answering my questions in the game maker forums I have decided to go as low level as possible and start dealing with basic X and Y coordinates. The engine is supposed to have functionality to deal with that for me, but the entire premise of the “window into the life of a character” is negating the built-in functions. So I have to write my own.
The good thing is this way I have extreme control over what’s going on.
The bad thing is I will have to go back and do some re-programing to make it easier for myself later on.
So tonight after I finish work I will see what I can do about it.
Nevermind it’s actually 11-th…
Goal: clean up the drag and drop system.
I removed everything, that’s even remotely connected to the old drag and drop system and did all the coding a new.
And this doesn’t work either.
I may have to try and code outside the object I want to move, which is beyond awful solution…
I will try first to mask an invisible object just to try and trick the mouse…
I really have absolutely no idea how to deal with that issue…
PS: hm… I have a weird Idea… Going to work now so I will try it out tomorrow…
PS2: noo… This won’t work either. The game just moves my mouse location into the view coordinates, so I have to take the view coordinates into account next time.
The formula will be larger than my big fat ass, but the important thing is, I want it to work.
I have to deal with the view on top of dealing with the banner the view is projected onto. So I need 2 drag and drop systems…
For fucks sake…