Join us on Discord!
You can help CodeWalrus stay online by donating here.

nKaruga, PC demake of Ikaruga (ported from TI-Nspire)

Started by matrefeytontias, September 15, 2015, 05:35:07 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

matrefeytontias

TODO : write this when the PC port is 100% fixed and to the level of the Nspire version

[spoiler][/spoiler]
  • Calculators owned: TI-83+.fr, TI-Nspire CAS prototype, TI-84+ CSE, TI-Nspire CX
My TI games (some got their own article on non-calc websites !) : http://www.ticalc.org/archives/files/authors/112/11202.html

My moozik (100% free metal) : http://www.soundcloud.com/matrefeytontias

Dream of Omnimaga

The entire game now just shows a Trollface O.O?

Just kidding, I would be very interested into playing a nKaruga version for PC. Will music (if any) have a retro feel like Sega Mega Drive? Also will graphics remain the same, scaled up for those who wants to play Full screen?

Good luck! (Also I am cloning this topic in the non-calc section so it shows in both :walrii: )
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

matrefeytontias

All of the graphics (and the UI) will remain the same. Actually, the screen itself will still be 320x240, but scaled up twice so that it shows pixels and stuff, just like a retro console would :)
  • Calculators owned: TI-83+.fr, TI-Nspire CAS prototype, TI-84+ CSE, TI-Nspire CX
My TI games (some got their own article on non-calc websites !) : http://www.ticalc.org/archives/files/authors/112/11202.html

My moozik (100% free metal) : http://www.soundcloud.com/matrefeytontias

Dream of Omnimaga

Awesome to hear. And yeah I noticed. I am amazed so far by the result and there is a news coming up. Some suggestions :)

-Key detection on title screen options is quite laggy. Sometimes it won't respond then it registers keypresses twice. It's perfectly fine inside the game
-Some text seems a bit cut off. For example the 1 digit misses some outlines at the top. Is that normal?
-An option to play at 1x, 3x, 4x or 5x scaling would be nice for people with different resolutions, perhaps also with an option to maximize the window while still having the game in the center with a black frame. That way we can play close to how we play SNES/NES emulator games :)
-Music, but it would need to sound old school or like video game stuff. Not necessarily chiptune-like but at least limited or with some electronic sounds. Maybe covers of my songs? :P
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

matrefeytontias

<yeah I posted a demo on IRC>

- the way I did it in the menus is just reducing the framerate to 10 FPS :P I was basically being a lazy ass, of course I'll switch to proper key-repeat handling in the (near) future.
- it appears that it's just because it reached the top of the window, thus having a line of pixels outside the screen. I'll fix that eventually.
- honestly, 1x is super tiny and over 3x is super huge ... I mean, the window is always a multiple of 320x240, so it gets insanely huge pretty fast. I'll eventually add a full-screen mode though, just to see what it looks like.
- Yeah well that's planned, but won't come anytime soon :P
  • Calculators owned: TI-83+.fr, TI-Nspire CAS prototype, TI-84+ CSE, TI-Nspire CX
My TI games (some got their own article on non-calc websites !) : http://www.ticalc.org/archives/files/authors/112/11202.html

My moozik (100% free metal) : http://www.soundcloud.com/matrefeytontias

Dream of Omnimaga

Aah I see now. Reducing menu frame rate is definitively a good way to save on computer resources. ANd I see about the text.

As for 1x, it's more if for example someone has a small resolution on a very old computer, so it's not really that necessary. But 3x and 4x would be nice to have because on my 1920x1080 screen, 640x480 is very small. 4x would make it 1440x960 IIRC. Even 4x would be small on 4K. If you add a full screen mode, though, keep in mind that some video cards blurs images at low resolution.


Do you plan to put the demo and screenshots in the first post?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

matrefeytontias

#6
4x is 1280x960 actually. But yeah, I see your point, I'll implement that then.

Download the game on GameJolt : http://gamejolt.com/games/nkaruga-2d-ikaruga-demake/92026

Don't forget to read the instructions !
  • Calculators owned: TI-83+.fr, TI-Nspire CAS prototype, TI-84+ CSE, TI-Nspire CX
My TI games (some got their own article on non-calc websites !) : http://www.ticalc.org/archives/files/authors/112/11202.html

My moozik (100% free metal) : http://www.soundcloud.com/matrefeytontias

Dream of Omnimaga

Is it an update of the demo you posted on IRC? Just wondering in case I need to update.

EDIT: Aw, shame that your Gamejolt description makes absolutely zero mention of TI calculators :(
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

gameblabla

#8
Matref, there's a reason why things like SDL2 or SDL_gfx exists :
Use them for screen scaling !

For SDL_gfx, it works like this :
You detect the resolution with SDL_GetVideoInfo.
You store the detected resolution somewhere and you tell SDL_SetVideoMode to take all the screen.
Next, you create a RGB Surface with the game's native resolution.
Make sure that your game draws to the RGB Surface instead of the screen.

That's how i do it (the game's native resolution here is 320x240) :

#ifdef SCALING
const SDL_VideoInfo* info = SDL_GetVideoInfo();
scale_w = info->current_w / 320;
scale_h = info->current_h / 240;
 
scale_w_total = scale_w * 320;
scale_h_total = scale_h * 240;

screen_position.x = (info->current_w - scale_w_total)/2;
screen_position.y = (info->current_h - scale_h_total)/2;

real_screen = SDL_SetVideoMode(info->current_w, info->current_h, info->vfmt->BitsPerPixel, SDL_HWSURFACE | SDL_NOFRAME);
screen = SDL_CreateRGBSurface(SDL_HWSURFACE, 320, 240, info->vfmt->BitsPerPixel, 0,0,0,0);
#else
screen = SDL_SetVideoMode(320, 240, 16, SDL_HWSURFACE);
#endif


Then for drawing everything on-screen :


#ifdef SCALING
SDL_Surface* doble;
doble = zoomSurface(screen,scale_w,scale_h,0);
SDL_BlitSurface(doble,NULL,real_screen,&screen_position);
SDL_Flip(real_screen);
SDL_FreeSurface(doble);
#else
SDL_Flip(screen);
#endif


EDIT: My solution here works with all screens but if you like your upscale code better,
it's up to you really.
  • Calculators owned: None (used to own an Nspire and TI-89)

Dream of Omnimaga

Would those routines allow him to use actual full screen modes?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

gameblabla

#10
Quote from: DJ Omnimaga on September 16, 2015, 01:11:28 AM
Would those routines allow him to use actual full screen modes?
It' works with fullscreen modes with no issues but fullscreen is evil, especially on Linux.
This code has no need for fullscreen and my code here actually runs on a window without borders,
which works better on operating systems like most linux distributions.

EDIT: Also matref, i forgot to tell you that but you need to get the bpp using SDL_GetVideoInfo
and you need to use the detected bpp for your RGB Surface and screen surface or else SDL will have to do some conversion,
wasting a lot of cpu cycles.
  • Calculators owned: None (used to own an Nspire and TI-89)

Dream of Omnimaga

I guess it's fine if it's simulated full screen, as in the game just stretched to fit everything on screen without changing the resolution. However, it has to be optimized a lot because in the past I saw 2D games or emulators lag like mad when the window was stretched up to high resolutions.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

novenary

#12
Quote from: gameblabla on September 16, 2015, 01:19:46 AM
It's works with fullscreen modes with no problems but fullscreen is evil, especially on Linux.
Wait what ? On Linux, full screen = borderless extended to the whole screen. It's just a flag that tells the window manager to do that. There's nothing wrong with this, if it doesn't work for you then your window manager is broken. You smoked too much Windows man. :P

Dream of Omnimaga

Actually on Windows it's not that bad either unless you use Visual Basic 6.0 or downloaded stuff from Limewire at least once.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

matrefeytontias

#14
Alright, level 2 is now able to progress pretty fast (weird sentence huh). I'm done writing the props engine (which is actually embedded in the enemies engine) and the camera paths handling, which I'm pretty proud of. Nearly everything in nKaruga works with callbacks, making everything pretty modular.

Anyway, now that that's out of the way, I should be able to work fast on level 2. It's actually pretty good already !



As always, if you want to help with sprites, I need that, so please tell me. Thanks in advance !
  • Calculators owned: TI-83+.fr, TI-Nspire CAS prototype, TI-84+ CSE, TI-Nspire CX
My TI games (some got their own article on non-calc websites !) : http://www.ticalc.org/archives/files/authors/112/11202.html

My moozik (100% free metal) : http://www.soundcloud.com/matrefeytontias

Powered by EzPortal