Windows World Engine

H

HorrellTech

Guest
Hey guys,

I have been working on a basic chunking engine in the last couple of days, just to get my Game Maker juices flowing(been a while since I've used it).

I "accidentally" came up with an awesome system that allows for a 2D, massive worlds, with seamless world wrapping(in other words, keep moving in one direction, and you will end up back at the same point).

I have been playing around with this engine, and have come up with a method to take an image, and turn it into the world. Have a play around. The example map used is 4000x2000 in pixel size, so thats 4000x2000 tiles in the world!

Welcome to the future of 2D RPG's!

**UPDATE**
Have added a script to convert an RPG Maker style character sheet into a full working character, and added basic tree generation.

Have also added a Water Mask so the world can tell where water is positioned on the map, and the trees wont spawn in the water due to this(Will be useful for fishing, boats etc.

If you are interested in helping with this project, then by all means, contact me. I am looking for:
*Sound/Music Artists
*RPG Maker Style Pixel Art Artists
*Someone who can help me optimise the engine

Here are some screen shots:
screenshot107.png screenshot100.png screenshot102.png screenshot103.png

Here is a download:
http://www.mediafire.com/file/6hv7yn0tx6ayzaa/engine_.zip

CONTROLS:
Arrow Keys - Movement
Hold Shift - Show the world map
1 & 2 number keys to switch between world maps

Let me know if the FPS drops too much. Optimisation for the game engine is very important in early stages!
 
Last edited by a moderator:
H

HorrellTech

Guest
Bump.

Have updated it to load the world from an image.

Please try it out and let me know how it performs on your PC's!
 
H

HorrellTech

Guest
**UPDATE**
Have added a script to convert an RPG Maker style character sheet into a full working character, and added basic tree generation.

Have also added a Water Mask so the world can tell where water is positioned on the map, and the trees wont spawn in the water due to this(Will be useful for fishing, boats etc.
 
L

Lockwork

Guest
this looks great! i'll have to give it a try! what kind of fps do you normally get?
 
H

HorrellTech

Guest
I have the room speed locked to 30 at the moment. I really need to add an FPS counter so people can tell me if it drops lol.

But when it is loading chunks, it drops to about 15 for about 500ms.
 
L

Lockwork

Guest
i got about the same performance as you.

gtx 970
i7 [email protected]
16gb ram

i like the idea!
i'll watch the post. cant wait to see what you can do with it.
 

YanBG

Member
Very interesting project! Few days ago i turned my game into loading chunks as well(because of the initial lag when i create large procedural maps as a whole) and i'm still polishing it.

I see that you've added the FPS counter and it's capped at 60 for me? But i'd advice you to reduce the chunk size(from 4kb to about 1kb), because the loading will lag a lot on older PCs.
You can use show_debug_overlay(true) to see the parameters on your PC too and when optimized you might notice the reduction.

I spawned in the middle of the forest and walking to the east revealed the same terrain, some water nearby would be more interesting.
 
H

HorrellTech

Guest
I have capped the room speed to 120 but it seems to stop at 60, so I think it is at its peak. The chunk system using the text files seems fine, but the surface being used to retrieve the chunk of the position on the world map from the image seems to cause a bit of a lag(As when I remove this line of code, the lag is gone).

As you mentioned, it revealed the same terrain, but you can hold down the "SHIFT" key to reveal the world map, and see a wee green dot signifying where you are on the map. Bare in mind, the map is big so it may take a while to get to the water.

EDIT: Oh, and the map is based off a flat image of the earth map. Textures are all generated based of the map image(So you could use any image if you want your own map). Just replace map.png/map.jpg in the "Planet/Earth" directory
 

woodsmoke

Member
Do you have v-sync on? Maybe that's the reason for the 60fps cap?

You said you are looking for artists, but haven't said much about the game. Do you plan on making this a game, or an engine? Any ways, I like what you are doing here!
 
H

HorrellTech

Guest
V-Sync is on, so yes, that would explain the cap lol.

Ok guys, anyone have a faster method to get pixels from an image than "surface_getpixel()"? It seems, using the process of elimination, that's what is lagging the Engine out.

I am using Game Maker 8.0 for it as it has execute_file() etc which makes saving/loading objects to and from files just so much easier.

Any dll's would be accepted for this task. I am tempted to see if I can't make a basic dll for this, but I don't know how effective it would be lol.

EDIT: The engine has so much potential, that with out the pause to load chunks, it would make the base of really great games!

Also @melerski, I am looking for an artist to help with making RPG maker styled character sheets, and objects, as this engine is going to be the base for a game i'm wanting to make.
 

CMAllen

Member
I don't know what all GM8 supports, nor can I say if it's faster, but you could drop the surface into a buffer and buffer_seek to the pixel's position in the buffer (same as reading from a book, left to right, top to bottom -- so pixX + pixY*surf_width). I forget the exact order of the channels (I do know it's not RGBA), but it's just 32-bits arranged in 1-byte chunks for each channel. Nothing fancy.
 

GMWolf

aka fel666
Ok guys, anyone have a faster method to get pixels from an image than "surface_getpixel()"? It seems, using the process of elimination, that's what is lagging the Engine out.

I am using Game Maker 8.0 for it as it has execute_file() etc which makes saving/loading objects to and from files just so much easier.
Use GMS with buffers for saving and loading.

For getting pixels, get the buffer from a surface and iterate through it to get the pixel data at lightning speeds.
 

zbox

Member
GMC Elder
I don't know what all GM8 supports, nor can I say if it's faster, but you could drop the surface into a buffer and buffer_seek to the pixel's position in the buffer (same as reading from a book, left to right, top to bottom -- so pixX + pixY*surf_width). I forget the exact order of the channels (I do know it's not RGBA), but it's just 32-bits arranged in 1-byte chunks for each channel. Nothing fancy.
a guy did this on the old gmc, called samplers. have a google i use it all the time

BGRA too
 
H

HorrellTech

Guest
Thanks for the replies guys. It's as I thought. I'm going to need to use Studio for this so I can use buffers. Unless someone knows of a way to use buffers in 8?
 

GMWolf

aka fel666
Thanks for the replies guys. It's as I thought. I'm going to need to use Studio for this so I can use buffers. Unless someone knows of a way to use buffers in 8?
GM 8 does not have buffers, unless you use a DLL.
I don't believe there is a of train to stick with gm8, when GMs had so many more features and yyc.
 
H

HorrellTech

Guest
Ok, the only issue I have with studio is, the file management. Makes it harder to do what i'm trying to do.

But anyway, *UPDATE* I have altered it, used buffers for the surface_getpixel, compiled in GMs and boom, no more lag. Thanks for the advice guys. Works like a charm.

I have updated the download link to the installer for the engine. I average about 200 - 250 fps, so i'd like to see what you all get.

Also, using the number keys(1 & 2 atm), you can switch between the moon and earth :D
 
Top